//
// sub_1800E5AC0 from 0x1800e5ac0 to 0x1800e5b6f (175 bytes)
//
// 2 xrefs:
// > DllEntryPoint @ 0x1800e5768
// > ??> @ 0x1801c5628
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:22:38 +0000
//
__int64 sub_1800E5AC0()
{
uintptr_t v0; // rax
__int64 result; // rax
struct _FILETIME v2; // [rsp+20h] [rbp-10h] BYREF
struct _FILETIME SystemTimeAsFileTime; // [rsp+40h] [rbp+10h] BYREF
LARGE_INTEGER PerformanceCount; // [rsp+48h] [rbp+18h] BYREF
v0 = _security_cookie;
if ( _security_cookie == 0x2B992DDFA232LL )
{
SystemTimeAsFileTime = 0;
GetSystemTimeAsFileTime(&SystemTimeAsFileTime);
v2 = SystemTimeAsFileTime;
v2 = (struct _FILETIME)(GetCurrentThreadId() ^ *(unsigned __int64 *)&v2);
v2 = (struct _FILETIME)(GetCurrentProcessId() ^ *(unsigned __int64 *)&v2);
QueryPerformanceCounter(&PerformanceCount);
v0 = ((unsigned __int64)&v2
^ *(_QWORD *)&v2
^ PerformanceCount.QuadPart
^ ((unsigned __int64)PerformanceCount.LowPart << 32))
& 0xFFFFFFFFFFFFLL;
if ( v0 == 0x2B992DDFA232LL )
v0 = 0x2B992DDFA233LL;
_security_cookie = v0;
}
result = ~v0;
qword_1801AE300 = result;
return result;
}