//
// sub_82440C from 0x82440c to 0x824472 (102 bytes)
//
// 2 xrefs:
// > sub_8400E4 @ 0x8406f6
// > sub_84AC54 @ 0x84ac5a
//
// 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 12:01:53 +0000
//
int __fastcall sub_82440C(int a1, _BYTE *a2)
{
int result; // r0
int v5; // r4
sub_83E124(a1, 0);
result = sub_84C410(a1, 0);
if ( !result )
{
if ( *(_DWORD *)(a1 + 248) != 2 || *(_BYTE *)(a1 + 645) )
{
if ( *(_DWORD *)(a1 + 1252) == 1 )
{
return 0;
}
else if ( (*(_DWORD *)(*(_DWORD *)(a1 + 668) + 64) & 1) != 0 )
{
result = sub_855568(a1, 0, a2);
v5 = result;
if ( result )
{
sub_83E124(a1, 1);
return v5;
}
}
else
{
*a2 = 1;
return 0;
}
}
else
{
return *(unsigned __int8 *)(a1 + 645);
}
}
return result;
}