//
// DSO_ctrl from 0x1008f2c to 0x1008fec (192 bytes)
//
// 3 xrefs:
// > DSO_load @ 0x1009270
// > sub_10DB098 @ 0x10db628
// > ??> @ 0x7b778
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:58 +0000
//
__int64 __fastcall DSO_ctrl(_DWORD *a1, int a2, int a3)
{
__int64 (*v3)(void); // x4
if ( a1 )
{
switch ( a2 )
{
case 2:
a1[5] = a3;
return 0;
case 3:
a1[5] |= a3;
return 0;
case 1:
return (int)a1[5];
default:
if ( *(_QWORD *)a1 && (v3 = *(__int64 (**)(void))(*(_QWORD *)a1 + 32LL)) != nullptr )
{
return v3();
}
else
{
ERR_put_error(37, 110, 108, "crypto/dso/dso_lib.c", 224);
return -1;
}
}
}
else
{
ERR_put_error(37, 110, 67, "crypto/dso/dso_lib.c", 204);
return -1;
}
}