//
// sub_1006165F4 from 0x1006165f4 to 0x100616694 (160 bytes)
//
// 1 xrefs:
// > sub_1005834D0 @ 0x100585b6c
//
// 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_1006165F4(_QWORD *a1, _DWORD *a2, _QWORD *a3, _QWORD *a4, _QWORD *a5)
{
unsigned int *v8; // x8
__int64 v9; // x19
_QWORD *v10; // x8
int *v11; // x0
if ( !a1 )
return 0xFFFFFFFFLL;
v8 = (unsigned int *)a1[1];
v9 = *v8;
if ( (_DWORD)v9 == 1 )
{
v10 = *((_QWORD **)v8 + 1);
if ( a3 )
*a3 = *v10;
if ( a2 )
{
v11 = (int *)v10[1];
if ( v11 )
*a2 = sub_1005F09B0(v11);
else
*a2 = -1;
}
}
if ( a4 )
*a4 = a1[2];
if ( a5 )
*a5 = a1[3];
return v9;
}