//
// sub_7564E8 from 0x7564e8 to 0x75660e (294 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
//
int __fastcall sub_7564E8(int a1, int a2)
{
int v2; // r8
int v3; // r9
const char *v4; // r4
_DWORD *v7; // r5
_DWORD *v8; // r7
size_t v9; // r2
char *v10; // r0
char *v11; // r0
unsigned int *v13; // r5
int v14; // r3
unsigned int *v15; // r7
int v16; // r5
void *v17; // [sp+10h] [bp-Ch] BYREF
void *v18; // [sp+14h] [bp-8h] BYREF
if ( *(_DWORD *)a1 == *(_DWORD *)a2 )
return 1;
v2 = *(_DWORD *)(*(_DWORD *)a1 + 16);
if ( !*(_DWORD *)v2 )
return 0;
v3 = *(_DWORD *)(*(_DWORD *)a2 + 16);
v4 = *(const char **)v3;
if ( !*(_DWORD *)v3 )
return (int)v4;
if ( strcmp(*(const char **)v2, *(const char **)v3) )
return 0;
if ( *(_DWORD *)(v2 + 4) || *(_DWORD *)(v3 + 4) )
{
sub_7562D0((int *)&v17, a1);
sub_7562D0((int *)&v18, a2);
v7 = v17;
v8 = v18;
v9 = *((_DWORD *)v17 - 3);
v4 = (const char *)(v9 == *((_DWORD *)v18 - 3) && memcmp(v17, v18, v9) == 0);
v10 = (char *)(v8 - 3);
if ( v8 - 3 != &dword_ACDD9C )
{
if ( &pthread_create )
{
v15 = v8 - 1;
__dmb(0xFu);
do
v16 = __ldrex(v15);
while ( __strex(v16 - 1, v15) );
__dmb(0xFu);
}
else
{
v16 = *(v8 - 1);
*(v8 - 1) = v16 - 1;
}
if ( v16 <= 0 )
operator delete(v10);
v7 = v17;
}
v11 = (char *)(v7 - 3);
if ( v7 - 3 != &dword_ACDD9C )
{
if ( &pthread_create )
{
v13 = v7 - 1;
__dmb(0xFu);
do
v14 = __ldrex(v13);
while ( __strex(v14 - 1, v13) );
__dmb(0xFu);
}
else
{
v14 = *(v7 - 1);
*(v7 - 1) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v11);
}
return (int)v4;
}
return 1;
}