//
// sub_92E80C from 0x92e80c to 0x92e882 (118 bytes)
//
// 2 xrefs:
// > sub_92E8CC @ 0x92ef0a
// > sub_941580 @ 0x941892
//
// 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:50 +0000
//
int __fastcall sub_92E80C(int a1, _DWORD *a2)
{
_DWORD *v2; // r3
int **v3; // r5
int v4; // r4
int result; // r0
v2 = (_DWORD *)a2[3];
v3 = *(int ***)(a1 + 8);
if ( v2 )
*v2 = a2[4];
v4 = a2[2];
a2[5] = 0;
a2[3] = a2 + 2;
a2[4] = v4;
a2[2] = 0;
if ( v3 )
{
if ( !v4 )
goto LABEL_8;
LABEL_5:
a2[4] = *(_DWORD *)v4;
while ( 1 )
{
*(_DWORD *)a2[3] = v4;
a2[3] = v4;
a2[5] = v4;
*(_DWORD *)v4 = 0;
*(_DWORD *)(v4 + 8) = 0;
memcpy(*(void **)(v4 + 4), v3[1], 8 * (_DWORD)v3[2]);
*(_DWORD *)(v4 + 8) = v3[2];
v3 = (int **)*v3;
if ( !v3 )
break;
v4 = a2[4];
if ( v4 )
goto LABEL_5;
LABEL_8:
result = WebPSafeMalloc(1, 0, 8 * *a2 + 12);
v4 = result;
if ( !result )
{
a2[1] |= 1u;
return result;
}
*(_DWORD *)(result + 4) = result + 12;
}
}
return 1;
}