//
// sub_9DE204 from 0x9de204 to 0x9de2bc (184 bytes)
//
// 5 xrefs:
// > sub_9DE204 @ 0x9de278
// > sub_9DE2C0 @ 0x9de654
// > sub_9DE2C0 @ 0x9de680
// > ASN1_item_ex_new @ 0x9dea44
// > ASN1_item_ex_new @ 0x9deaac
//
// 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:07:18 +0000
//
_DWORD *__fastcall sub_9DE204(_DWORD *result, int a2)
{
int v2; // r3
int (*v3)(void); // r3
_DWORD *v4; // r2
int v5; // r3
while ( 2 )
{
switch ( *(_BYTE *)a2 )
{
case 0:
v4 = *(_DWORD **)(a2 + 8);
if ( v4 )
{
if ( (*v4 & 0x306) != 0 )
goto LABEL_4;
a2 = v4[4];
continue;
}
v5 = *(_DWORD *)(a2 + 16);
if ( v5 )
goto LABEL_9;
if ( *(_DWORD *)(a2 + 4) != 1 )
goto LABEL_4;
*result = *(_DWORD *)(a2 + 20);
return result;
case 1:
case 2:
case 6:
goto LABEL_4;
case 4:
v2 = *(_DWORD *)(a2 + 16);
if ( !v2 )
goto LABEL_4;
v3 = *(int (**)(void))(v2 + 12);
if ( !v3 )
goto LABEL_4;
return (_DWORD *)v3();
case 5:
v5 = *(_DWORD *)(a2 + 16);
if ( !v5 )
goto LABEL_4;
LABEL_9:
v3 = *(int (**)(void))(v5 + 16);
if ( v3 )
return (_DWORD *)v3();
LABEL_4:
*result = 0;
return result;
default:
return result;
}
}
}