//
// sub_D6F75C from 0xd6f75c to 0xd6f800 (164 bytes)
//
// 4 xrefs:
// > sub_D6F800 @ 0xd6fb98
// > sub_D6F800 @ 0xd6fbc0
// > ASN1_item_ex_new @ 0xd6ff04
// > ASN1_item_ex_new @ 0xd6ff88
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_DWORD *__fastcall sub_D6F75C(_DWORD *result, __int64 a2)
{
__int64 v2; // x2
__int64 (*v3)(void); // x2
__int64 v4; // x2
_QWORD *v5; // x3
while ( 2 )
{
switch ( *(_BYTE *)a2 )
{
case 0:
v5 = *(_QWORD **)(a2 + 16);
if ( v5 )
{
if ( (*v5 & 0x306LL) != 0 )
goto LABEL_4;
a2 = v5[4];
continue;
}
v2 = *(_QWORD *)(a2 + 32);
if ( v2 )
goto LABEL_3;
if ( (unsigned int)*(_QWORD *)(a2 + 8) != 1 )
goto LABEL_4;
*result = *(_QWORD *)(a2 + 40);
return result;
case 1:
case 2:
case 6:
goto LABEL_4;
case 4:
v4 = *(_QWORD *)(a2 + 32);
if ( v4 )
{
v3 = *(__int64 (**)(void))(v4 + 24);
if ( v3 )
return (_DWORD *)v3();
}
goto LABEL_4;
case 5:
v2 = *(_QWORD *)(a2 + 32);
if ( !v2 )
goto LABEL_4;
LABEL_3:
v3 = *(__int64 (**)(void))(v2 + 32);
if ( v3 )
return (_DWORD *)v3();
LABEL_4:
*(_QWORD *)result = 0;
return result;
default:
return result;
}
}
}