//
// sub_BE840 from 0xbe840 to 0xbe88c (76 bytes)
//
// 2 xrefs:
// > sub_465BC @ 0x465ca
// > sub_BBE18 @ 0xbbe30
//
// 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:41:47 +0000
//
int __fastcall sub_BE840(int a1, int a2, int a3, int a4)
{
int v5; // r1
int v6; // r2
int v7; // r2
int v8; // r3
int v10; // [sp+4h] [bp-Ch] BYREF
v10 = a4;
sub_C02FC(&v10);
v5 = 0;
while ( v5 != 13 )
{
v6 = *(_DWORD *)(a1 + 4 * v5++);
if ( v10 == v6 )
return 1;
}
if ( v10 == *(_DWORD *)((char *)&word_30 + (_DWORD)off_E8000) )
return 1;
v7 = 0;
while ( v7 != 5 )
{
v8 = *((_DWORD *)off_E8000 + v7++ + 69);
if ( v10 == v8 )
return 1;
}
return 0;
}