//
// sub_75E5A0 from 0x75e5a0 to 0x75e69e (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_75E5A0(_DWORD *a1, int *a2)
{
char *v3; // r3
_BYTE *v4; // r2
_BYTE *v5; // r7
_BYTE *v6; // r0
_BOOL4 v7; // r3
char *v8; // r3
char *v9; // r0
unsigned int *v11; // r3
int v12; // r2
unsigned int *v13; // r3
char v14[4]; // [sp+4h] [bp-10h] BYREF
char *v15; // [sp+Ch] [bp-8h] BYREF
v3 = (char *)&unk_ACDDA8;
*a1 = &unk_ACDDA8;
v4 = (_BYTE *)a2[6];
if ( !v4 )
{
sub_775C88(a1, a2 + 10);
return a1;
}
v5 = (_BYTE *)a2[4];
v6 = (_BYTE *)a2[5];
if ( v4 > v5 )
{
if ( v4 != v6 )
{
if ( !v6 )
sub_773044("basic_string::_S_construct null not valid");
v3 = (char *)sub_75C2D4(v6, a2[6], (int)v14);
}
v15 = v3;
sub_775C88(a1, &v15);
v8 = v15;
v9 = v15 - 12;
if ( v15 - 12 == (char *)&dword_ACDD9C )
return a1;
if ( &pthread_create )
{
v13 = (unsigned int *)(v15 - 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_75C2D4(v6, a2[4], (int)v14);
}
v15 = v3;
sub_775C88(a1, &v15);
v8 = v15;
v9 = v15 - 12;
if ( v15 - 12 != (char *)&dword_ACDD9C )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v15 - 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;
}