//
// sub_64C84C from 0x64c84c to 0x64c8b0 (100 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
//
int __fastcall sub_64C84C(int a1, int a2, int a3, int a4)
{
int v4; // lr
int v5; // r8
int v9; // r6
int v10; // r5
int result; // r0
int (__fastcall *v12)(int, int, int, int, _DWORD, int, int); // r4
int v13; // t1
int v14; // r1
v4 = *(unsigned __int8 *)(a1 + 261);
v5 = *(_DWORD *)(a1 + 184);
if ( !*(_BYTE *)(a1 + 261) )
return *(unsigned __int8 *)(a1 + 261);
v9 = a1 + 200;
v10 = 0;
do
{
v13 = *(_DWORD *)(v9 + 4);
v9 += 4;
v14 = v13;
v12 = *(int (__fastcall **)(int, int, int, int, _DWORD, int, int))(v13 + 4);
if ( v12 )
{
result = v12(v5, v14, a1, a2, *(_DWORD *)(v9 + 12), a3, a4);
v4 = *(unsigned __int8 *)(a1 + 261);
v12 = (int (__fastcall *)(int, int, int, int, _DWORD, int, int))(result == 0);
}
else
{
result = 0;
LOBYTE(v12) = 1;
}
if ( v4 <= ++v10 )
v12 = nullptr;
}
while ( v12 );
return result;
}