//
// DSO_convert_filename from 0xd8b104 to 0xd8b1ec (232 bytes)
//
// 3 xrefs:
// > sub_E2C49C @ 0xe2c4b4
// > sub_E5D098 @ 0xe5d634
// > ??> @ 0x695e8
//
// 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_convert_filename(__int64 a1, __int64 a2)
{
__int64 v2; // x20
__int64 (__fastcall *v3)(__int64, __int64); // x2
__int64 result; // x0
__int64 v5; // x19
v2 = a2;
if ( a1 )
{
if ( a2 || (v2 = *(_QWORD *)(a1 + 48)) != 0 )
{
if ( (*(_DWORD *)(a1 + 20) & 1) != 0
|| (v3 = *(__int64 (__fastcall **)(__int64, __int64))(a1 + 32)) == nullptr
&& (v3 = *(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 40LL)) == nullptr
|| (result = v3(a1, v2)) == 0 )
{
v5 = CRYPTO_strdup(v2, "crypto/dso/dso_lib.c", 300);
if ( !v5 )
ERR_put_error(37, 126, 65, "crypto/dso/dso_lib.c", 302);
return v5;
}
}
else
{
ERR_put_error(37, 126, 111, "crypto/dso/dso_lib.c", 290);
return 0;
}
}
else
{
ERR_put_error(37, 126, 67, "crypto/dso/dso_lib.c", 284);
return 0;
}
return result;
}