//
// sub_6B782 from 0x6b782 to 0x6b828 (166 bytes)
//
// 1 xrefs:
// > sub_52286 @ 0x522ca
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:40:58 +0000
//
bool __fastcall sub_6B782(int a1, unsigned __int8 *a2)
{
int v3; // r4
int v5; // lr
int v6; // r12
int v7; // r3
_BOOL4 v8; // r6
int v9; // r6
int v11; // [sp+4h] [bp-14h] BYREF
v3 = 0;
if ( !*(_BYTE *)(a1 + 624) )
{
sub_BFFC4(&v11);
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
if ( v3 == 512 )
return 0;
v7 = a1 + v3;
v8 = *(unsigned __int8 *)(a1 + v3 + 628) == v5
&& (*(unsigned __int8 *)(v7 + 629) == 255 || *(unsigned __int8 *)(v7 + 629) == v6);
if ( v8
&& (*(_DWORD *)(v7 + 636) == 0
|| v11 - *(_DWORD *)(v7 + 636) > *(_DWORD *)(v7 + 632)
|| *(_DWORD *)(v7 + 632) == -1) )
{
break;
}
v3 += 16;
}
v9 = *(_DWORD *)(v7 + 640);
return sub_6AF7C(a1 + 1140) >= v9;
}
return v3;
}