// // sub_BA4F44 from 0xba4f44 to 0xba511c (472 bytes) // // 6 xrefs: // > sub_BA5378 @ 0xba5394 // > sub_BA5378 @ 0xba53a4 // > sub_BA5958 @ 0xba5e20 // > sub_BA5958 @ 0xba5f98 // > sub_BA67C0 @ 0xba6b68 // > sub_BA67C0 @ 0xba6b78 // // 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 // char *__fastcall sub_BA4F44(char *a1, char a2) { const char *v2; // x20 int v3; // w3 __int64 v4; // x21 int v5; // w19 __int64 v6; // x22 int v7; // w2 __int64 *v8; // x4 bool v9; // zf int v10; // t1 int v11; // t1 size_t v12; // x21 char *result; // x0 char *v14; // x2 int v15; // w1 int v16; // t1 char *v17; // x2 int v18; // t1 int v19; // t1 int v20; // t1 size_t v21; // x19 __int64 v22; // [xsp+40h] [xbp+40h] BYREF v2 = a1; strcpy((char *)&v22, "(){ %*]"); if ( !a1 ) return nullptr; v3 = (unsigned __int8)*a1; if ( !*a1 ) return off_1231018(v2); v4 = 0; v5 = 0; v6 = 0; do { while ( 1 ) { while ( v3 == 92 ) { v19 = (unsigned __int8)*++a1; v3 = v19; ++v6; if ( !v19 ) goto LABEL_16; } if ( v3 != 34 ) break; v20 = (unsigned __int8)*++a1; v3 = v20; ++v4; if ( !v20 ) goto LABEL_16; } if ( !a2 && (_BYTE)v22 && !v5 ) { v7 = (unsigned __int8)v22; v8 = &v22; do { v9 = v3 == v7; v10 = *((unsigned __int8 *)v8 + 1); v8 = (__int64 *)((char *)v8 + 1); v7 = v10; v5 = v9; } while ( v7 && !v5 ); } v11 = (unsigned __int8)*++a1; v3 = v11; } while ( v11 ); LABEL_16: if ( !(v6 | v4) ) { if ( v5 ) { v21 = strlen(v2); goto LABEL_32; } return off_1231018(v2); } v12 = v6 + v4 + strlen(v2); if ( v5 ) { v21 = v12; LABEL_32: v12 = v21 + 2; result = (char *)off_1231000(v21 + 3); if ( result ) { *result = 34; v14 = result + 1; result[v21 + 1] = 34; goto LABEL_19; } return nullptr; } result = (char *)off_1231000(v12 + 1); v14 = result; if ( !result ) return nullptr; LABEL_19: v15 = *(unsigned __int8 *)v2; if ( *v2 ) { do { while ( v15 != 34 && v15 != 92 ) { *v14++ = *v2; v16 = *(unsigned __int8 *)++v2; v15 = v16; if ( !v16 ) goto LABEL_25; } *v14 = 92; v17 = v14 + 1; *v17 = *v2; v14 = v17 + 1; v18 = *(unsigned __int8 *)++v2; v15 = v18; } while ( v18 ); } LABEL_25: result[v12] = 0; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source