//
// sub_83A25C from 0x83a25c to 0x83a2d4 (120 bytes)
//
// 2 xrefs:
// > sub_83E978 @ 0x83e9c8
// > ??> @ 0x83f188
//
// 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:02:15 +0000
//
int (*__fastcall sub_83A25C(int (*result)(void), _DWORD *a2, int a3))(void)
{
int (*v3)(void); // r4
int v4; // r5
int (*v5)(void); // r3
int v6; // r2
bool v8; // zf
int v9; // r1
int v10; // r5
int v11; // r2
v3 = result;
v4 = *(_DWORD *)result;
v5 = *(int (**)(void))(*((_DWORD *)result + 166) + 44);
if ( v5 )
return (int (*)(void))v5();
if ( a3 <= 1 )
return v5;
v6 = *(_DWORD *)(v4 + 304);
v8 = (v6 & 0x15) == 1;
if ( (v6 & 0x15) == 1 )
{
v6 = *((_DWORD *)result + 169);
result = (int (*)(void))((char *)&stru_1FFFC.st_value + 1);
v5 = (int (*)(void))(&dword_0 + 1);
v9 = 65537;
}
else
{
v9 = 0x10000;
}
if ( (*(_DWORD *)(v4 + 304) & 0x15) == 1 )
*a2 = v6;
else
result = (int (*)(void))(&stru_1FFFC + 4);
if ( v8 )
v6 = *(_DWORD *)(v4 + 304);
if ( (v6 & 0x2A) != 2 )
return v5;
v10 = *((_DWORD *)v3 + 170);
v11 = *((_DWORD *)v3 + 169);
if ( v11 != v10 )
{
if ( v5 )
v11 = 4;
else
result = (int (*)(void))v9;
if ( !v5 )
v11 = 0;
goto LABEL_21;
}
result = (int (*)(void))v9;
if ( !v5 )
{
v11 = 0;
LABEL_21:
*(_DWORD *)((char *)a2 + v11) = v10;
}
return result;
}