//
// sub_180010640 from 0x180010640 to 0x180010675 (53 bytes)
//
// 2 xrefs:
// > ??> @ 0x18016c6e8
// > ??> @ 0x18016c960
//
// 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 10:52:44 +0000
//
__int64 __fastcall sub_180010640(__int64 *a1, __int64 a2)
{
int v2; // r8d
unsigned int v4; // eax
__int64 v5; // r8
__int64 v6; // rax
v2 = *((_DWORD *)a1 + 18);
if ( (_BYTE)a2 == ((v2 & 2) != 0) )
return 0;
v4 = v2 & 0xFFFFFFFD;
v5 = v2 | 2u;
if ( !(_BYTE)a2 )
v5 = v4;
v6 = *a1;
*((_DWORD *)a1 + 18) = v5;
LOBYTE(v5) = 1;
return (*(__int64 (__fastcall **)(__int64 *, __int64, __int64))(v6 + 32))(a1, a2, v5);
}