//
// sub_92DE98 from 0x92de98 to 0x92df38 (160 bytes)
//
// 2 xrefs:
// > sub_92E8CC @ 0x92ebe2
// > sub_92E8CC @ 0x92ec28
//
// 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:04:49 +0000
//
int __fastcall sub_92DE98(int result, _DWORD *a2)
{
int v2; // r11
_DWORD *v3; // r6
int v4; // r4
int v5; // r10
int v6; // r7
int v7; // r3
bool v8; // cc
int v9; // r5
_BOOL4 v10; // r2
v2 = result;
v3 = a2;
if ( a2 )
{
v4 = a2[1];
v5 = v4 + 8 * a2[2];
}
else
{
v5 = 0;
v4 = 0;
}
v6 = result - 7;
LABEL_4:
while ( v4 )
{
while ( 1 )
{
if ( *(_BYTE *)v4 == 2 )
{
result = *(_DWORD *)(v4 + 4) / v2;
v7 = *(_DWORD *)(v4 + 4) % v2;
v8 = v7 <= 8;
if ( v7 <= 8 )
v8 = result <= 7;
if ( v8 )
{
v9 = byte_C46178[16 * result - v7 + 8] + 1;
}
else
{
v9 = *(_DWORD *)(v4 + 4) + 120;
v10 = v7 >= v6;
if ( result > 6 )
v10 = 0;
if ( v10 )
{
result = (int)&byte_C46178[16 * result + 16];
v9 = *(unsigned __int8 *)(v2 - v7 + result + 8) + 1;
}
}
*(_DWORD *)(v4 + 4) = v9;
}
v4 += 8;
if ( v5 != v4 )
break;
v3 = (_DWORD *)*v3;
if ( !v3 )
{
v4 = 0;
v5 = 0;
goto LABEL_4;
}
v4 = v3[1];
v5 = v4 + 8 * v3[2];
if ( !v4 )
return result;
}
}
return result;
}