// // sub_1005BBB00 from 0x1005bbb00 to 0x1005bbe5c (860 bytes) // // 2 xrefs: // > sub_1005B9E30 @ 0x1005ba369 // > sub_1005B9E30 @ 0x1005ba37b // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:32:44 +0000 // __int64 __fastcall sub_1005BBB00(float **a1, float **a2) { __int64 v2; // rbx float **v3; // r14 __int64 v4; // r13 float *v5; // r12 float *v6; // rax __int64 *v7; // r12 __int64 *v8; // rcx __int64 *v9; // rax __int64 v10; // r13 __int64 v11; // r12 float *v12; // rax float *v13; // r12 __int64 v14; // r14 __int64 v15; // r13 float *v16; // rax float **v17; // r14 float *v18; // rax __int64 *v20; // [rsp+10h] [rbp-40h] int v21; // [rsp+1Ch] [rbp-34h] float v22; // [rsp+20h] [rbp-30h] float v23; // [rsp+20h] [rbp-30h] float v24; // [rsp+20h] [rbp-30h] float v25; // [rsp+24h] [rbp-2Ch] float v26; // [rsp+24h] [rbp-2Ch] float v27; // [rsp+24h] [rbp-2Ch] float v28; // [rsp+24h] [rbp-2Ch] float v29; // [rsp+24h] [rbp-2Ch] float v30; // [rsp+24h] [rbp-2Ch] float v31; // [rsp+24h] [rbp-2Ch] float v32; // [rsp+24h] [rbp-2Ch] float v33; // [rsp+24h] [rbp-2Ch] v3 = a2; LOBYTE(v2) = 1; switch ( a2 - a1 ) { case 0LL: case 1LL: return (unsigned int)v2; case 2LL: v4 = (__int64)*(a2 - 1); v5 = *a1; v25 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4); v22 = *(float *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 192LL))(v5); v6 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4); if ( v25 == v22 ) { v33 = v6[1]; if ( *(float *)((*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 192LL))(v5) + 4) <= v33 ) return (unsigned int)v2; } else { v26 = *v6; if ( *(float *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 192LL))(v5) <= v26 ) return (unsigned int)v2; } v18 = *a1; *a1 = *(a2 - 1); *(a2 - 1) = v18; return (unsigned int)v2; case 3LL: sub_1005BB2F0(a1, a1 + 1, a2 - 1); return (unsigned int)v2; case 4LL: sub_1005BB610(a1, a1 + 1, a1 + 2, a2 - 1); return (unsigned int)v2; case 5LL: sub_1005BB830(a1, a1 + 1, a1 + 2, a1 + 3, a2 - 1); return (unsigned int)v2; default: v7 = (__int64 *)(a1 + 2); sub_1005BB2F0(a1, a1 + 1, a1 + 2); v8 = (__int64 *)(a1 + 3); if ( a1 + 3 == a2 ) return (unsigned int)v2; v21 = 0; v2 = 24; break; } do { v20 = v8; v10 = *v8; v11 = *v7; v27 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)*v8 + 192LL))(*v8); v23 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11); v12 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10); if ( v27 == v23 ) { v29 = v12[1]; if ( *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11) + 4) <= v29 ) { LABEL_9: v9 = v20; goto LABEL_10; } } else { v28 = *v12; if ( *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11) <= v28 ) goto LABEL_9; } v13 = (float *)*v20; v14 = v2; while ( 1 ) { *(float **)((char *)a1 + v14) = *(float **)((char *)a1 + v14 - 8); if ( v14 == 8 ) break; v15 = *(__int64 *)((char *)a1 + v14 - 16); v31 = *(float *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v13 + 192LL))(v13); v24 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL))(v15); v16 = (float *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v13 + 192LL))(v13); if ( v31 == v24 ) { v30 = v16[1]; v14 -= 8; if ( *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL))(v15) + 4) <= v30 ) goto LABEL_20; } else { v32 = *v16; v14 -= 8; if ( *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL))(v15) <= v32 ) { LABEL_20: v17 = (float **)((char *)a1 + v14); goto LABEL_22; } } } v17 = a1; LABEL_22: *v17 = v13; ++v21; v3 = a2; v9 = v20; if ( v21 == 8 ) { LOBYTE(v2) = v20 + 1 == (__int64 *)a2; return (unsigned int)v2; } LABEL_10: v7 = v9; v2 += 8; v8 = v9 + 1; } while ( v9 + 1 != (__int64 *)v3 ); LOBYTE(v2) = 1; return (unsigned int)v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source