// // sub_10058AF50 from 0x10058af50 to 0x10058b268 (792 bytes) // // 12 xrefs: // > sub_10058B8EC @ 0x10058b8fc // > sub_1005F9900 @ 0x1005f9d48 // > sub_100602AFC @ 0x100602b3c // > sub_1006062DC @ 0x100606334 // > sub_100609B80 @ 0x100609d38 // > sub_100609B80 @ 0x100609dd8 // > sub_10060AC34 @ 0x10060afd0 // > sub_10060AC34 @ 0x10060b0b4 // > sub_10060DA0C @ 0x10060db14 // > sub_10060E1F8 @ 0x10060e264 // > sub_10060E1F8 @ 0x10060e274 // > sub_10060F33C @ 0x10060f424 // // 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_10058AF50(char *a1, int a2) { __int64 v3; // x0 char **v4; // x8 int v5; // w22 int v6; // w0 unsigned int *v7; // x21 __int64 v8; // x24 __int64 v9; // x27 unsigned int v10; // w8 __int64 v11; // x0 char **v12; // x8 int v13; // w22 int v14; // w0 unsigned int *v15; // x21 __int64 v16; // x24 __int64 v17; // x27 __int64 v18; // x22 __int64 v19; // x20 __int64 v20; // x0 int v21; // w22 _BYTE *v22; // x0 void *v23; // x21 __int64 v24; // x0 __int64 v25; // x4 void *v27; // [xsp+8h] [xbp-98h] BYREF int v28[2]; // [xsp+10h] [xbp-90h] BYREF char *__s1; // [xsp+18h] [xbp-88h] BYREF char *v30; // [xsp+20h] [xbp-80h] unsigned int v31; // [xsp+28h] [xbp-78h] int v32; // [xsp+40h] [xbp-60h] BYREF char **p_s1; // [xsp+48h] [xbp-58h] if ( a2 ) goto LABEL_31; __s1 = a1; if ( qword_100882CB8 ) { v32 = 1; p_s1 = &__s1; v3 = sub_1005DF1B8(qword_100882CB8, &v32); if ( v3 ) { v4 = *(char ***)(v3 + 8); goto LABEL_14; } } v5 = 0; v6 = 0; v7 = nullptr; v8 = 951; LABEL_6: v9 = v8; while ( 1 ) { v8 = v9; if ( v5 >= (int)v9 ) break; v9 = (unsigned int)(((int)v9 + v5) / 2); v7 = (unsigned int *)((char *)&unk_10066BB34 + 4 * (int)v9); v6 = strcmp(__s1, off_10082EF78[5 * *v7]); if ( (v6 & 0x80000000) == 0 ) { v5 = v9 + 1; if ( v6 > 0 ) goto LABEL_6; goto LABEL_12; } } if ( v6 ) goto LABEL_15; LABEL_12: if ( v7 ) { v4 = &off_10082EF78[5 * *v7]; LABEL_14: v10 = *((_DWORD *)v4 + 4); if ( v10 ) goto LABEL_28; } LABEL_15: v30 = a1; if ( qword_100882CB8 && (v32 = 2, p_s1 = &__s1, (v11 = sub_1005DF1B8(qword_100882CB8, &v32)) != 0) ) { v12 = *(char ***)(v11 + 8); } else { v13 = 0; v14 = 0; v15 = nullptr; v16 = 951; LABEL_19: v17 = v16; while ( 1 ) { v16 = v17; if ( v13 >= (int)v17 ) break; v17 = (unsigned int)(((int)v17 + v13) / 2); v15 = (unsigned int *)((char *)&unk_10066AC58 + 4 * (int)v17); v14 = strcmp(v30, off_10082EF78[5 * *v15 + 1]); if ( (v14 & 0x80000000) == 0 ) { v13 = v17 + 1; if ( v14 > 0 ) goto LABEL_19; goto LABEL_25; } } if ( v14 ) goto LABEL_31; LABEL_25: if ( !v15 ) goto LABEL_31; v12 = &off_10082EF78[5 * *v15]; } v10 = *((_DWORD *)v12 + 4); if ( v10 ) { LABEL_28: if ( v10 > 0x3BD ) { if ( !qword_100882CB8 ) return nullptr; v32 = 3; p_s1 = &__s1; v31 = v10; v24 = sub_1005DF1B8(qword_100882CB8, &v32); if ( v24 ) return *(char ***)(v24 + 8); v25 = 334; } else { if ( LODWORD(off_10082EF78[5 * (int)v10 + 2]) ) return &off_10082EF78[5 * (int)v10]; v25 = 320; } sub_1005E0E48(8, 103, 101, "obj_dat.c", v25); return nullptr; } LABEL_31: v19 = sub_1005EDCBC(0, 0, a1); v18 = 0; if ( (int)v19 >= 1 ) { v20 = sub_1005FB650(0, v19, 6); v21 = v20; v22 = sub_100588710(v20, (__int64)"obj_dat.c", 470); v23 = v22; if ( v22 ) { *(_QWORD *)v28 = v22; sub_1005FB508(v28, 0, v19, 6, 0); sub_1005EDCBC(v28[0], v19, a1); v27 = v23; v18 = sub_1005EE390(0, &v27, v21); sub_100588C44(v23); } else { return nullptr; } } return (char **)v18; }
GD Web Decomp Icon

GD Web Decomp

Raw Source