//
// sub_75EE20 from 0x75ee20 to 0x75ef1e (254 bytes)
//
// 0 xrefs:
//
// 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
//
_DWORD *__fastcall sub_75EE20(_DWORD *a1, int *a2)
{
char *v3; // r3
const wchar_t *v4; // r2
const wchar_t *v5; // r7
const wchar_t *v6; // r0
_BOOL4 v7; // r3
char *v8; // r3
char *v9; // r0
unsigned int *v11; // r3
int v12; // r2
unsigned int *v13; // r3
char *v14; // [sp+Ch] [bp-8h] BYREF
v3 = (char *)&unk_ACDDB8;
*a1 = &unk_ACDDB8;
v4 = (const wchar_t *)a2[5];
if ( !v4 )
{
((void (*)(void))sub_778A68)();
return a1;
}
v5 = (const wchar_t *)a2[3];
v6 = (const wchar_t *)a2[4];
if ( v4 > v5 )
{
if ( v4 != v6 )
{
if ( !v6 )
sub_773044("basic_string::_S_construct null not valid");
v3 = (char *)sub_75C31C(v6, a2[5]);
}
v14 = v3;
sub_778A68(a1, &v14);
v8 = v14;
v9 = v14 - 12;
if ( v14 - 12 == (char *)&unk_ACDDAC )
return a1;
if ( &pthread_create )
{
v13 = (unsigned int *)(v14 - 4);
__dmb(0xFu);
do
v12 = __ldrex(v13);
while ( __strex(v12 - 1, v13) );
LABEL_19:
__dmb(0xFu);
goto LABEL_20;
}
goto LABEL_27;
}
if ( v5 != v6 )
{
v7 = v6 == nullptr;
if ( !v5 )
v7 = 0;
if ( v7 )
sub_773044("basic_string::_S_construct null not valid");
v3 = (char *)sub_75C31C(v6, a2[3]);
}
v14 = v3;
sub_778A68(a1, &v14);
v8 = v14;
v9 = v14 - 12;
if ( v14 - 12 != (char *)&unk_ACDDAC )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v14 - 4);
__dmb(0xFu);
do
v12 = __ldrex(v11);
while ( __strex(v12 - 1, v11) );
goto LABEL_19;
}
LABEL_27:
v12 = *((_DWORD *)v8 - 1);
*((_DWORD *)v8 - 1) = v12 - 1;
LABEL_20:
if ( v12 <= 0 )
operator delete(v9);
}
return a1;
}