//
// DSO_ctrl from 0xd8abcc to 0xd8ac8c (192 bytes)
//
// 3 xrefs:
// > DSO_load @ 0xd8af10
// > sub_E5D098 @ 0xe5d628
// > ??> @ 0x59e20
//
// 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
//
__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;
}
}