67 lines
2.1 KiB
C
67 lines
2.1 KiB
C
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
|
* Ghidra 12.1.2 decompiler output for 0x1400a7320 FUN_1400a7320
|
|
* Pseudocode, not original source. */
|
|
|
|
/* WARNING: Function: __chkstk replaced with injection: alloca_probe */
|
|
|
|
undefined8 FUN_1400a7320(int param_1,longlong param_2)
|
|
|
|
{
|
|
char cVar1;
|
|
DWORD DVar2;
|
|
_invalid_parameter_handler _Handler;
|
|
HANDLE *ppvVar3;
|
|
ulonglong uVar4;
|
|
undefined4 local_res18 [2];
|
|
undefined1 local_res20 [8];
|
|
HANDLE local_2018;
|
|
undefined1 local_2010 [8192];
|
|
undefined8 uStack_10;
|
|
|
|
uStack_10 = 0x1400a732c;
|
|
DAT_140352f60 = timeGetTime();
|
|
setlocale(0,(char *)0x0);
|
|
printf("Locale is: %s\n");
|
|
FUN_140160d30(local_res20);
|
|
cVar1 = FUN_140160d70(local_res20);
|
|
if (cVar1 != '\0') {
|
|
FUN_140160de0();
|
|
FUN_1400a74e0();
|
|
FUN_1400a6fe0(DAT_1403531a8);
|
|
if (1 < param_1) {
|
|
PTR_s_option_dbc_serveroption_xml_140349cb8 = *(undefined **)(param_2 + 8);
|
|
}
|
|
local_2018 = (HANDLE)0x0;
|
|
memset(local_2010,0,0x2000);
|
|
DVar2 = GetProcessHeaps(0x400,&local_2018);
|
|
if (DVar2 != 0) {
|
|
ppvVar3 = &local_2018;
|
|
uVar4 = (ulonglong)DVar2;
|
|
do {
|
|
local_res18[0] = 2;
|
|
HeapSetInformation(*ppvVar3,HeapCompatibilityInformation,local_res18,4);
|
|
ppvVar3 = ppvVar3 + 1;
|
|
uVar4 = uVar4 - 1;
|
|
} while (uVar4 != 0);
|
|
}
|
|
_Handler = _set_invalid_parameter_handler(FUN_1400a7270);
|
|
if ((DAT_14039d158 & 1) == 0) {
|
|
DAT_14039d158 = DAT_14039d158 | 1;
|
|
FUN_140042810();
|
|
atexit((_func_5014 *)&LAB_1402740e0);
|
|
}
|
|
printf("----------------------------------------------------------------------------\n");
|
|
printf(" DBC server has been initialized successfully.\n");
|
|
printf("----------------------------------------------------------------------------\n");
|
|
FUN_140042cf0(DAT_140353178);
|
|
FUN_140043780(DAT_140353178);
|
|
FUN_140043290(DAT_140353178);
|
|
if (DAT_1403531a8 != (undefined8 *)0x0) {
|
|
(**(code **)*DAT_1403531a8)(DAT_1403531a8,1);
|
|
}
|
|
_set_invalid_parameter_handler(_Handler);
|
|
}
|
|
FUN_140160d40(local_res20);
|
|
return 0;
|
|
}
|
|
|