//
// sub_635DB4 from 0x635db4 to 0x635e78 (196 bytes)
//
// 1 xrefs:
// > sub_635E88 @ 0x635f22
//
// 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
//
void **__fastcall sub_635DB4(int a1, char **a2, const char *a3, unsigned __int16 a4)
{
char **v8; // r4
char *v9; // r0
char *v10; // r9
char *v11; // r3
char *v12; // lr
int v13; // r2
char *v14; // r0
char *v15; // r1
void **v16; // r6
v8 = (char **)off_ABAEAC(0x2Cu);
if ( !v8 )
return nullptr;
v9 = off_ABAEB8(a3);
v10 = v9;
if ( v9 )
{
if ( a1 == 2 )
{
v11 = (char *)(v8 + 5);
v13 = 4;
v8[5] = *a2;
goto LABEL_6;
}
if ( a1 == 10 )
{
v11 = (char *)(v8 + 5);
v12 = a2[1];
v13 = 16;
v14 = a2[2];
v15 = a2[3];
v8[5] = *a2;
v8[6] = v12;
v8[7] = v14;
v8[8] = v15;
LABEL_6:
v8[3] = (char *)v13;
v8[9] = v11;
v8[1] = nullptr;
v8[10] = nullptr;
v8[4] = (char *)(v8 + 9);
v8[2] = (char *)(__int16)a1;
*v8 = v10;
v16 = sub_635C50((int)v8, a4);
off_ABAEB0(v10);
off_ABAEB0(v8);
return v16;
}
off_ABAEB0(v9);
off_ABAEB0(v8);
return nullptr;
}
off_ABAEB0(v8);
return nullptr;
}