/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1 * Ghidra 12.1.2 decompiler output for 0x140054af0 FUN_140054af0 * Pseudocode, not original source. */ uint * FUN_140054af0(uint *param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4) { wchar_t *pwVar1; wchar_t *pwVar2; undefined8 uVar3; int *piVar4; uint *puVar5; wchar_t *_Dst; undefined8 *puVar6; undefined8 uVar7; wchar_t *_Src; undefined4 local_res8 [2]; wchar_t *local_res10; FUN_1400d9a90(param_1,param_2); uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 2) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x14) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x16) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 3) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x1c) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 4) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x24) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)(param_2 + 5) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 6) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x34) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 7) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x3c) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 8) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x44) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x2c) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)(param_2 + 9) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,1); if ((char)uVar3 != '\0') { *(undefined1 *)((longlong)param_2 + 100) = (undefined1)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,1); if ((char)uVar3 != '\0') { *(undefined1 *)((longlong)param_2 + 0x65) = (undefined1)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,1); if ((char)uVar3 != '\0') { *(undefined1 *)((longlong)param_2 + 0x66) = (undefined1)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x4c) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 10) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x54) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0xb) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x5c) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0xc) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x6c) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x6e) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0xe) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x7c) = (undefined2)local_res8[0]; } FUN_1400d9a90(param_1,param_2 + 0x10); uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0x12) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x94) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,2); if ((char)uVar3 != '\0') { *(undefined2 *)((longlong)param_2 + 0x96) = (undefined2)local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0x13) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)((longlong)param_2 + 0x9c) = local_res8[0]; } uVar3 = FUN_1400bc930(param_1,(undefined8 *)local_res8,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0x14) = local_res8[0]; } uVar7 = 4; puVar6 = (undefined8 *)local_res8; puVar5 = param_1; uVar3 = FUN_1400bc930(param_1,puVar6,4); if ((char)uVar3 != '\0') { *(undefined4 *)(param_2 + 0xd) = local_res8[0]; } FUN_14006cb70(puVar5,puVar6,uVar7,param_4); local_res10 = (wchar_t *)PTR_DAT_1401ac010; thunk_FUN_1400bda70(param_1,(longlong *)&local_res10,uVar7,param_4); _Src = local_res10; if (local_res10 == (wchar_t *)0x0) { _Src = (wchar_t *)PTR_DAT_1401ac010; } _Dst = (wchar_t *)((longlong)param_2 + 0x74); uVar3 = 4; wcscpy_s(_Dst,4,_Src); pwVar2 = local_res10; if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1401ac010)) && (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) { piVar4 = (int *)FUN_14006cb70(_Dst,uVar3,_Src,param_4); FUN_14006b350(piVar4); pwVar2 = pwVar2 + -2; *(int *)pwVar2 = *(int *)pwVar2 + -1; if (*(int *)pwVar2 == 0) { FUN_14006cc60(pwVar1); } FUN_14006b3e0((longlong)piVar4); } return param_1; }