// // sub_BB0420 from 0xbb0420 to 0xbb0740 (800 bytes) // // 1 xrefs: // > sub_B87DB4 @ 0xb885c0 // // 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_BB0420(const char *a1) { size_t v3; // x0 char *result; // x0 char *v5; // x21 char *v6; // x0 char *v7; // x24 char *v8; // x0 char *v9; // x23 char *v10; // x28 char *v11; // x19 int v12; // w2 size_t v13; // x0 int v14; // w2 char *v15; // x2 int v16; // t1 int v17; // w2 char *v18; // x2 int v19; // t1 int v20; // w2 v3 = strlen(a1); result = (char *)off_1231000(v3 + 1); v5 = result; if ( !result ) return result; v6 = off_1231018(a1); v7 = v6; if ( !v6 || !*v6 ) { off_1231008(v5); return v7; } v8 = strchr(v6, 63); v9 = v8; if ( v8 ) *v8 = 0; v10 = v5; v11 = v7; while ( 1 ) { while ( 1 ) { while ( 1 ) { while ( 1 ) { while ( 1 ) { while ( !strncmp("./", v11, 2u) ) { LABEL_14: v14 = (unsigned __int8)v11[2]; v11 += 2; if ( !v14 ) goto LABEL_10; } if ( strncmp("../", v11, 3u) ) break; v12 = (unsigned __int8)v11[3]; v11 += 3; if ( !v12 ) goto LABEL_10; } if ( !strncmp("/./", v11, 3u) ) goto LABEL_14; if ( strcmp("/.", v11) ) break; *++v11 = 47; } if ( strncmp("/../", v11, 4u) ) break; if ( v10 > v5 ) { v15 = v10 - 1; if ( *(v10 - 1) == 47 ) { LABEL_47: v10 = v15; *v15 = 0; v17 = (unsigned __int8)v11[3]; v11 += 3; goto LABEL_27; } while ( v15 != v5 ) { v16 = (unsigned __int8)*--v15; if ( v16 == 47 ) goto LABEL_47; } v10 = v5; } *v10 = 0; v17 = (unsigned __int8)v11[3]; v11 += 3; LABEL_27: if ( !v17 ) goto LABEL_10; } if ( strcmp("/..", v11) ) break; v11[2] = 47; if ( v10 > v5 ) { v18 = v10 - 1; if ( *(v10 - 1) == 47 ) { LABEL_48: v10 = v18; } else { while ( v18 != v5 ) { v19 = (unsigned __int8)*--v18; if ( v19 == 47 ) goto LABEL_48; } v10 = v5; } } *v10 = 0; v20 = (unsigned __int8)v11[2]; v11 += 2; if ( !v20 ) goto LABEL_10; } if ( !strcmp(&byte_EEFB80, v11) || !strcmp("..", v11) ) break; while ( 1 ) { *v10 = *v11; if ( v11[1] == 47 || !v11[1] ) break; ++v10; ++v11; } *++v10 = 0; if ( !*++v11 ) goto LABEL_10; } *v11 = 0; LABEL_10: if ( v9 ) { v13 = strlen(&a1[v9 - v7]); memcpy(v10, &a1[v9 - v7], v13 + 1); } off_1231008(v7); return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source