//
// sub_100640B50 from 0x100640b50 to 0x100640b92 (66 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100640B50(__int64 *a1)
{
__int64 result; // rax
__int64 v2; // rdx
__int64 v3; // rcx
__int64 v4; // rcx
result = *a1;
v2 = a1[1];
if ( *a1 )
{
v3 = *(_QWORD *)(result + 40);
if ( !*(_QWORD *)(v3 + 48) )
v3 = 0;
*a1 = v3;
}
else if ( v2 && (v4 = *(_QWORD *)(v2 + 32)) != 0 )
{
*a1 = *(_QWORD *)(v4 + 40);
}
else
{
*a1 = 0;
}
return result;
}