31 lines
798 B
C
31 lines
798 B
C
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
|
* Ghidra 12.1.2 decompiler output for 0x1401e1d90 FUN_1401e1d90
|
|
* Pseudocode, not original source. */
|
|
|
|
ulonglong FUN_1401e1d90(longlong param_1)
|
|
|
|
{
|
|
int *piVar1;
|
|
int iVar2;
|
|
ulonglong uVar3;
|
|
int iVar4;
|
|
LPVOID pvVar5;
|
|
|
|
if (*(int *)(param_1 + 0x14) == 0) {
|
|
return 0;
|
|
}
|
|
pvVar5 = TlsGetValue(DAT_14034f238);
|
|
iVar4 = DAT_14034f230;
|
|
if (pvVar5 == (LPVOID)0x0) {
|
|
LOCK();
|
|
piVar1 = (int *)(param_1 + 0x40);
|
|
iVar2 = *piVar1;
|
|
*piVar1 = *piVar1 + 1;
|
|
UNLOCK();
|
|
uVar3 = (longlong)(iVar2 + 1) % (longlong)iVar4;
|
|
TlsSetValue(DAT_14034f238,(LPVOID)((longlong)(int)uVar3 + 1));
|
|
return uVar3 & 0xffffffff;
|
|
}
|
|
return (longlong)pvVar5 - 1U & 0xffffffff;
|
|
}
|
|
|