//
// sub_1040160 from 0x1040160 to 0x10401bc (92 bytes)
//
// 1 xrefs:
// > sub_103FBE8 @ 0x103fd04
//
// This function is hookable on this platform (idp: arm, 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 13:16:29 +0000
//
__int64 __fastcall sub_1040160(__int64 a1, unsigned int *a2)
{
unsigned int v2; // w2
char **v3; // x1
v2 = *(_DWORD *)(*(_QWORD *)a1 + 20LL);
v3 = &off_1402BE0[5 * *a2 + 2];
if ( v2 == *((_DWORD *)v3 + 1) )
{
if ( v2 )
return memcmp(*(const void **)(*(_QWORD *)a1 + 24LL), v3[1], (int)v2);
}
else
{
v2 -= *((_DWORD *)v3 + 1);
}
return v2;
}