decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
136
decomp/MessageServer_Release_x64/full/functions/0x1400cf240.c
Normal file
136
decomp/MessageServer_Release_x64/full/functions/0x1400cf240.c
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1
|
||||
* Ghidra 12.1.2 decompiler output for 0x1400cf240 FUN_1400cf240
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
||||
|
||||
undefined8 FUN_1400cf240(longlong param_1,int *param_2,uint *param_3,ulonglong param_4)
|
||||
|
||||
{
|
||||
uint uVar1;
|
||||
undefined7 uVar4;
|
||||
longlong lVar2;
|
||||
undefined8 uVar3;
|
||||
int *piVar5;
|
||||
ulonglong uVar6;
|
||||
int iVar7;
|
||||
byte *pbVar8;
|
||||
uint *puVar9;
|
||||
byte *pbVar10;
|
||||
undefined1 auStackY_238 [32];
|
||||
exception local_120 [72];
|
||||
exception local_d8 [72];
|
||||
exception local_90 [72];
|
||||
uint local_48;
|
||||
byte local_44;
|
||||
undefined4 local_40;
|
||||
uint local_3c;
|
||||
ulonglong local_38;
|
||||
|
||||
local_38 = DAT_1401ac5a0 ^ (ulonglong)auStackY_238;
|
||||
if ((int)param_3[0xf0] < 1) {
|
||||
FUN_14006b700(local_120,&DAT_140145e90,param_3,param_4);
|
||||
/* WARNING: Subroutine does not return */
|
||||
_CxxThrowException(local_120,(ThrowInfo *)&DAT_1401a93e8);
|
||||
}
|
||||
lVar2 = *(longlong *)(param_1 + 8);
|
||||
if (lVar2 == 0) {
|
||||
if (*(longlong *)(param_1 + 0x10) == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_1400d1900(param_1,param_2,param_3,param_4);
|
||||
}
|
||||
uVar1 = *(uint *)(param_1 + 0x18);
|
||||
}
|
||||
else {
|
||||
uVar1 = *(uint *)(lVar2 + 0x18);
|
||||
}
|
||||
uVar6 = (ulonglong)uVar1;
|
||||
if ((int)uVar1 <= (int)param_4) {
|
||||
if (lVar2 == 0) {
|
||||
if (*(longlong *)(param_1 + 0x10) == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_1400d1900(param_1,uVar6,param_3,param_4);
|
||||
}
|
||||
param_4 = (ulonglong)*(uint *)(param_1 + 0x18);
|
||||
}
|
||||
else {
|
||||
param_4 = (ulonglong)*(uint *)(lVar2 + 0x18);
|
||||
}
|
||||
}
|
||||
if (lVar2 == 0) {
|
||||
if (*(longlong *)(param_1 + 0x10) == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_1400d1900(param_1,uVar6,param_3,param_4);
|
||||
}
|
||||
iVar7 = *(int *)(param_1 + 0x18);
|
||||
}
|
||||
else {
|
||||
iVar7 = *(int *)(lVar2 + 0x18);
|
||||
}
|
||||
iVar7 = iVar7 - (int)param_4;
|
||||
if (iVar7 == 0) {
|
||||
uVar4 = (undefined7)((ulonglong)lVar2 >> 8);
|
||||
}
|
||||
else {
|
||||
if (*(longlong *)(param_1 + 0x10) == 0) {
|
||||
if (lVar2 == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_1400d1900(param_1,uVar6,param_3,param_4);
|
||||
}
|
||||
if (*(int *)(lVar2 + 0x18) == 0) {
|
||||
lVar2 = 0;
|
||||
}
|
||||
else {
|
||||
lVar2 = *(longlong *)(lVar2 + 0x10);
|
||||
}
|
||||
}
|
||||
else {
|
||||
lVar2 = *(longlong *)(param_1 + 0x10);
|
||||
if (lVar2 == 0) {
|
||||
FUN_14006ba50(local_90,(wchar_t *)PTR_u_ArrayWithExternalBuffer_is_unini_1401ad9a0,param_3,
|
||||
param_4);
|
||||
/* WARNING: Subroutine does not return */
|
||||
_CxxThrowException(local_90,(ThrowInfo *)&DAT_1401a93e8);
|
||||
}
|
||||
}
|
||||
pbVar8 = (byte *)((int)param_4 + lVar2);
|
||||
puVar9 = param_3;
|
||||
local_3c = FUN_1400f8940(pbVar8,iVar7);
|
||||
if ((int)param_3[0xf0] < 1) {
|
||||
FUN_14006ba50(local_d8,L"aes key is not initialized",puVar9,param_4);
|
||||
/* WARNING: Subroutine does not return */
|
||||
_CxxThrowException(local_d8,(ThrowInfo *)&DAT_1401a93e8);
|
||||
}
|
||||
local_40 = 5;
|
||||
uVar6 = (longlong)(iVar7 + 5) % (longlong)(int)param_3[0xf1] & 0xffffffff;
|
||||
local_44 = (byte)uVar6;
|
||||
if (local_44 != 0) {
|
||||
local_44 = (char)param_3[0xf1] - local_44;
|
||||
uVar6 = (ulonglong)local_44;
|
||||
}
|
||||
uVar1 = (byte)uVar6 + 5 + iVar7;
|
||||
local_48 = uVar1;
|
||||
FUN_1400bc4d0((longlong)param_2,uVar6,(SIZE_T)puVar9,param_4);
|
||||
uVar6 = (ulonglong)uVar1;
|
||||
piVar5 = param_2;
|
||||
FUN_1400bcb60(param_2,uVar6,(SIZE_T)puVar9,param_4);
|
||||
pbVar10 = *(byte **)(param_2 + 4);
|
||||
if (pbVar10 == (byte *)0x0) {
|
||||
lVar2 = *(longlong *)(param_2 + 2);
|
||||
if (lVar2 == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_1400d1900(piVar5,uVar6,0,param_4);
|
||||
}
|
||||
if (*(int *)(lVar2 + 0x18) == 0) {
|
||||
pbVar10 = (byte *)0x0;
|
||||
}
|
||||
else {
|
||||
pbVar10 = *(byte **)(lVar2 + 0x10);
|
||||
}
|
||||
}
|
||||
uVar3 = FUN_1400cef50((undefined8 *)pbVar8,iVar7,pbVar10,(longlong)&local_48,param_3);
|
||||
uVar4 = (undefined7)((ulonglong)uVar3 >> 8);
|
||||
}
|
||||
return CONCAT71(uVar4,1);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue