// // sub_1402F0FC0 from 0x1402f0fc0 to 0x1402f115b (411 bytes) // // 4 xrefs: // > sub_1402F0910 @ 0x1402f0ab7 // > @ 0x14068fb3c // > @ 0x14068fb80 // > @ 0x1406d3a10 // // 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 // __int64 __fastcall sub_1402F0FC0(_QWORD *a1, unsigned __int64 a2) { unsigned __int64 v3; // rcx __int64 v4; // rbp unsigned __int64 v5; // rcx __int64 v6; // rbx _QWORD *v7; // rcx _QWORD *v8; // rdi __int64 result; // rax _QWORD *v10; // rdi _QWORD *v11; // rbx __int64 *v12; // r9 __int64 v13; // r8 int v14; // r10d __int64 v15; // r8 _QWORD *v16; // rdx _QWORD *v17; // r8 __int64 *v18; // rdx __int64 v19; // r8 _QWORD *v20; // rdx _BitScanReverse64(&v3, 0xFFFFFFFFFFFFFFFuLL); if ( a2 > 1LL << v3 ) std::_Xlength_error("invalid hash bucket count"); v4 = a1[1]; _BitScanReverse64(&v5, (a2 - 1) | 1); v6 = 1LL << ((unsigned __int8)v5 + 1); sub_14005EE00(a1 + 3, 2 * v6, v4); v8 = (_QWORD *)a1[1]; result = v6 - 1; a1[6] = v6 - 1; a1[7] = v6; v10 = (_QWORD *)*v8; if ( v10 != (_QWORD *)v4 ) { v11 = v10; do { v10 = (_QWORD *)*v10; result = 16 * (a1[6] & sub_1402F1550(v7, v11 + 2)); v12 = (__int64 *)(result + a1[3]); v13 = *v12; if ( *v12 == v4 ) { *v12 = (__int64)v11; v12[1] = (__int64)v11; } else { result = v12[1]; v14 = *((_DWORD *)v11 + 4); if ( v14 == *(_DWORD *)(result + 16) && (v7 = *(_QWORD **)(result + 24), (_QWORD *)v11[3] == v7) ) { v15 = *(_QWORD *)result; if ( *(_QWORD **)result != v11 ) { v16 = (_QWORD *)v11[1]; *v16 = v10; v7 = (_QWORD *)v10[1]; *v7 = v15; result = *(_QWORD *)(v15 + 8); *(_QWORD *)result = v11; *(_QWORD *)(v15 + 8) = v7; v10[1] = v16; v11[1] = result; } v12[1] = (__int64)v11; } else if ( v13 == result ) { LABEL_16: v17 = (_QWORD *)v11[1]; *v17 = v10; v18 = (__int64 *)v10[1]; *v18 = result; v7 = *(_QWORD **)(result + 8); *v7 = v11; *(_QWORD *)(result + 8) = v18; v10[1] = v17; v11[1] = v7; *v12 = (__int64)v11; } else { while ( 1 ) { result = *(_QWORD *)(result + 8); if ( v14 == *(_DWORD *)(result + 16) && v11[3] == *(_QWORD *)(result + 24) ) break; if ( v13 == result ) goto LABEL_16; } v19 = *(_QWORD *)result; v20 = (_QWORD *)v11[1]; *v20 = v10; v7 = (_QWORD *)v10[1]; *v7 = v19; result = *(_QWORD *)(v19 + 8); *(_QWORD *)result = v11; *(_QWORD *)(v19 + 8) = v7; v10[1] = v20; v11[1] = result; } } v11 = v10; } while ( v10 != (_QWORD *)v4 ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source