//
// sub_881F2C from 0x881f2c to 0x882030 (260 bytes)
//
// 1 xrefs:
// > ??> @ 0xac12fc
//
// 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
//
char *__fastcall sub_881F2C(int a1, char *a2)
{
size_t v4; // r4
char *v5; // r0
char *v6; // r4
char v8; // r0
void *v9; // r3
char *v10; // r4
v4 = strlen(a2);
if ( strchr(a2, 47) )
{
v5 = (char *)CRYPTO_malloc((void *)(v4 + 1), (int)"crypto/dso/dso_dlfcn.c", 257);
v6 = v5;
if ( v5 )
{
strcpy(v5, a2);
return v6;
}
goto LABEL_11;
}
v8 = DSO_flags(a1);
v9 = (void *)(v4 + 4);
if ( (v8 & 2) == 0 )
v9 = (void *)(v4 + 7);
v10 = (char *)CRYPTO_malloc(v9, (int)"crypto/dso/dso_dlfcn.c", 257);
if ( !v10 )
{
LABEL_11:
ERR_put_error(37, 123, 109, (int)"crypto/dso/dso_dlfcn.c", 259);
return nullptr;
}
if ( (DSO_flags(a1) & 2) != 0 )
sprintf(v10, "%s.so", a2);
else
sprintf(v10, "lib%s.so", a2);
return v10;
}