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
109
decomp/MessageServer_Release_x64/full/functions/0x14000e190.c
Normal file
109
decomp/MessageServer_Release_x64/full/functions/0x14000e190.c
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1
|
||||
* Ghidra 12.1.2 decompiler output for 0x14000e190 FUN_14000e190
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
byte * FUN_14000e190(longlong *param_1,byte *param_2,undefined4 *param_3,int param_4)
|
||||
|
||||
{
|
||||
char cVar1;
|
||||
int iVar2;
|
||||
int iVar3;
|
||||
byte *pbVar4;
|
||||
longlong *plVar5;
|
||||
longlong lVar6;
|
||||
ulonglong uVar7;
|
||||
char *pcVar8;
|
||||
undefined4 local_48;
|
||||
undefined4 uStack_44;
|
||||
byte *local_40;
|
||||
undefined4 local_38;
|
||||
|
||||
*(undefined1 *)(param_1 + 0xb) = 0;
|
||||
*(undefined4 *)((longlong)param_1 + 0x5c) = 0;
|
||||
FUN_14000af60(param_1 + 0xc,&DAT_14015bf08,0);
|
||||
*(undefined8 *)((longlong)param_1 + 0x74) = 0;
|
||||
if ((param_2 != (byte *)0x0) && (*param_2 != 0)) {
|
||||
param_1[1] = -1;
|
||||
if (param_3 == (undefined4 *)0x0) {
|
||||
param_1[1] = 0;
|
||||
}
|
||||
else {
|
||||
*(undefined4 *)(param_1 + 1) = *param_3;
|
||||
*(undefined4 *)((longlong)param_1 + 0xc) = param_3[1];
|
||||
}
|
||||
local_38 = (undefined4)param_1[0xe];
|
||||
local_48 = (undefined4)param_1[1];
|
||||
uStack_44 = *(undefined4 *)((longlong)param_1 + 0xc);
|
||||
param_1[1] = param_1[1];
|
||||
if (((((param_4 == 0) && (*param_2 != 0)) && (*param_2 == 0xef)) &&
|
||||
((param_2[1] != 0 && (param_2[1] == 0xbb)))) && ((param_2[2] != 0 && (param_2[2] == 0xbf))))
|
||||
{
|
||||
param_4 = 1;
|
||||
*(undefined1 *)((longlong)param_1 + 0x7c) = 1;
|
||||
}
|
||||
local_40 = param_2;
|
||||
pbVar4 = FUN_14000da10(param_2,param_4);
|
||||
if (pbVar4 != (byte *)0x0) {
|
||||
do {
|
||||
if ((*pbVar4 == 0) ||
|
||||
(plVar5 = FUN_14000e4b0(param_1,pbVar4,param_4), plVar5 == (longlong *)0x0)) break;
|
||||
pbVar4 = (byte *)(**(code **)(*plVar5 + 0x10))(plVar5,pbVar4,&local_48,param_4);
|
||||
FUN_14000b8b0(param_1,plVar5);
|
||||
if ((param_4 == 0) && (lVar6 = (**(code **)(*plVar5 + 0x68))(plVar5), lVar6 != 0)) {
|
||||
lVar6 = (**(code **)(*plVar5 + 0x68))(plVar5);
|
||||
lVar6 = *(longlong *)(lVar6 + 0x68);
|
||||
if (*(char *)(lVar6 + 0x10) != '\0') {
|
||||
pcVar8 = "UTF-8";
|
||||
do {
|
||||
if (*pcVar8 == '\0') goto LAB_14000e37a;
|
||||
iVar2 = tolower((int)pcVar8[lVar6 + -0x14015c3f8]);
|
||||
iVar3 = tolower((int)*pcVar8);
|
||||
} while ((iVar2 == iVar3) && (pcVar8 = pcVar8 + 1, pcVar8[lVar6 + -0x14015c3f8] != '\0')
|
||||
);
|
||||
if (*pcVar8 != '\0') {
|
||||
pcVar8 = "UTF8";
|
||||
if (*(char *)(lVar6 + 0x10) != '\0') {
|
||||
do {
|
||||
if (*pcVar8 == '\0') goto LAB_14000e37a;
|
||||
iVar2 = tolower((int)pcVar8[lVar6 + -0x14015c400]);
|
||||
iVar3 = tolower((int)*pcVar8);
|
||||
} while ((iVar2 == iVar3) &&
|
||||
(pcVar8 = pcVar8 + 1, pcVar8[lVar6 + -0x14015c400] != '\0'));
|
||||
if (*pcVar8 == '\0') goto LAB_14000e37a;
|
||||
}
|
||||
param_4 = 2;
|
||||
goto LAB_14000e37f;
|
||||
}
|
||||
}
|
||||
LAB_14000e37a:
|
||||
param_4 = 1;
|
||||
}
|
||||
LAB_14000e37f:
|
||||
pbVar4 = FUN_14000da10(pbVar4,param_4);
|
||||
} while (pbVar4 != (byte *)0x0);
|
||||
if (param_1[5] != 0) {
|
||||
return pbVar4;
|
||||
}
|
||||
cVar1 = (char)param_1[0xb];
|
||||
goto LAB_14000e3b9;
|
||||
}
|
||||
}
|
||||
cVar1 = (char)param_1[0xb];
|
||||
LAB_14000e3b9:
|
||||
if (cVar1 == '\0') {
|
||||
uVar7 = 0xffffffffffffffff;
|
||||
*(undefined1 *)(param_1 + 0xb) = 1;
|
||||
*(undefined4 *)((longlong)param_1 + 0x5c) = 0xd;
|
||||
pcVar8 = PTR_s_Error_document_empty__1401b33c8;
|
||||
do {
|
||||
if (uVar7 == 0) break;
|
||||
uVar7 = uVar7 - 1;
|
||||
cVar1 = *pcVar8;
|
||||
pcVar8 = pcVar8 + 1;
|
||||
} while (cVar1 != '\0');
|
||||
FUN_14000af60(param_1 + 0xc,PTR_s_Error_document_empty__1401b33c8,~uVar7 - 1);
|
||||
*(undefined8 *)((longlong)param_1 + 0x74) = 0xffffffffffffffff;
|
||||
}
|
||||
return (byte *)0x0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue