//
// DSO_convert_filename from 0x7e3968 to 0x7e3a74 (268 bytes)
//
// 3 xrefs:
// > sub_88219C @ 0x8821ac
// > sub_8B3090 @ 0x8b367c
// > ??> @ 0x6103c
//
// 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
//
int __fastcall DSO_convert_filename(_DWORD *a1, int a2)
{
int v2; // r5
int v3; // r4
int result; // r0
int (__fastcall *v5)(_DWORD *, int); // r3
if ( a1 )
{
v2 = a2;
if ( a2 || (v2 = a1[7]) != 0 )
{
if ( (a1[3] & 1) != 0
|| (v5 = (int (__fastcall *)(_DWORD *, int))a1[5]) == nullptr
&& (v5 = *(int (__fastcall **)(_DWORD *, int))(*a1 + 20)) == nullptr
|| (result = v5(a1, v2)) == 0 )
{
v3 = CRYPTO_strdup(v2, "crypto/dso/dso_lib.c", 300);
if ( !v3 )
ERR_put_error(37, 126, 65, "crypto/dso/dso_lib.c", 302);
return v3;
}
}
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;
}