//
// sub_75B144 from 0x75b144 to 0x75b1d8 (148 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_75B144(int *a1, char *a2)
{
size_t v4; // r0
int v5; // r8
size_t v6; // r0
char *v7; // r0
void *v8; // r9
char *v9; // r4
int v10; // r1
char *v11; // r6
char *v12; // r7
int v13; // r0
int v14; // t1
if ( a2 )
{
v4 = strlen(a2);
v5 = v4;
if ( v4 > 0x1FC00000 )
v6 = -1;
else
v6 = 4 * v4;
v7 = (char *)operator new[](v6);
v8 = v7;
if ( v5 )
{
v9 = a2 + 1;
v10 = (unsigned __int8)*a2;
v11 = v7 - 4;
v12 = &a2[v5];
v13 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 128);
if ( !v13 )
LABEL_13:
sub_772FE4(v13);
while ( 1 )
{
*((_DWORD *)v11 + 1) = (*(int (__fastcall **)(int, int))(*(_DWORD *)v13 + 40))(v13, v10);
v11 += 4;
if ( v9 == v12 )
break;
v14 = (unsigned __int8)*v9++;
v10 = v14;
v13 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 128);
if ( !v13 )
goto LABEL_13;
}
}
sub_75AE6C(a1, (int)v8, v5);
operator delete[](v8);
}
else
{
sub_744C5C((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1);
}
return a1;
}