//
// sub_773B78 from 0x773b78 to 0x773bee (118 bytes)
//
// 1 xrefs:
// > sub_773738 @ 0x773748
//
// 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_773B78(_DWORD *a1, int a2)
{
void *v4; // r0
unsigned int *v6; // r2
int v7; // r3
int v8; // [sp+Ch] [bp-4h] BYREF
sub_776584((int)&v8, "regex_error");
sub_760EAC(a1);
v4 = (void *)(v8 - 12);
if ( (int *)(v8 - 12) != &dword_ACDD9C )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v8 - 4);
__dmb(0xFu);
do
v7 = __ldrex(v6);
while ( __strex(v7 - 1, v6) );
__dmb(0xFu);
}
else
{
v7 = *(_DWORD *)(v8 - 4);
*(_DWORD *)(v8 - 4) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v4);
}
a1[2] = a2;
*a1 = &off_AB09F8;
return a1;
}