server-re/decomp/DBCServer_Release_x64/full/functions/0x14016ac90.c

42 lines
1.2 KiB
C

/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
* Ghidra 12.1.2 decompiler output for 0x14016ac90 FUN_14016ac90
* Pseudocode, not original source. */
void FUN_14016ac90(undefined8 *param_1,LPCWSTR param_2,UINT param_3)
{
code *pcVar1;
int iVar2;
int iVar3;
DWORD DVar4;
bool bVar5;
if (param_2 == (LPCWSTR)0x0) {
*param_1 = 0;
return;
}
iVar2 = lstrlenW(param_2);
iVar2 = iVar2 + 1;
FUN_14016aad0(param_1,iVar2 * 4,param_1 + 1,0x80);
iVar3 = WideCharToMultiByte(param_3,0,param_2,iVar2,(LPSTR)*param_1,iVar2 * 4,(LPCSTR)0x0,
(LPBOOL)0x0);
if (iVar3 == 0) {
DVar4 = GetLastError();
bVar5 = true;
if (DVar4 == 0x7a) {
iVar3 = WideCharToMultiByte(param_3,0,param_2,iVar2,(LPSTR)0x0,0,(LPCSTR)0x0,(LPBOOL)0x0);
FUN_14016aad0(param_1,iVar3,param_1 + 1,0x80);
iVar2 = WideCharToMultiByte(param_3,0,param_2,iVar2,(LPSTR)*param_1,iVar3,(LPCSTR)0x0,
(LPBOOL)0x0);
bVar5 = iVar2 == 0;
}
if (bVar5) {
FUN_14015b040();
pcVar1 = (code *)swi(3);
(*pcVar1)();
return;
}
}
return;
}