// // sub_180007120 from 0x180007120 to 0x180007405 (741 bytes) // // 3 xrefs: // > @ 0x1801a4240 // > @ 0x1801a4258 // > @ 0x1801f6354 // // 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_180007120(int *a1, __int64 a2, _DWORD *a3, char *a4) { int v9; // eax int v10; // edx int v11; // r10d int v12; // r9d int v13; // r14d int v14; // r12d __int64 v15; // r15 __int64 v16; // rcx int v17; // ebx int v18; // ebx int v20; // ecx int v21; // edi int v33; // r8d int v34; // r8d int v38; // eax int v43; // r8d int v44; // edx unsigned __int64 v49; // r8 __int64 result; // rax int v61; // [rsp+40h] [rbp+0h] BYREF _DWORD *v62; // [rsp+C0h] [rbp+80h] v62 = a3; _RBP = (int *)((unsigned __int64)&v61 & 0xFFFFFFFFFFFFFFE0uLL); _RSI = a4; v9 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 32LL) + 4LL * a1[10]) / 2; v10 = v9; *(_DWORD *)((unsigned __int64)&v61 & 0xFFFFFFFFFFFFFFE0uLL) = v9; if ( a3 ) { v11 = *a3 * *(_DWORD *)(a2 + 56); v12 = 0; v13 = 1; v14 = 0; if ( *(int *)(a2 + 52) > 1 ) { v15 = 1; do { v16 = *(char *)(*(_QWORD *)(a2 + 24) + v15); v17 = a3[v16] & 0x7FFF; if ( v17 == a3[v16] ) { v18 = *(_DWORD *)(a2 + 56) * v17; __asm { vpxor xmm1, xmm1, xmm1 } v20 = *(unsigned __int16 *)(*(_QWORD *)(a2 + 16) + 2 * v16); *(_DWORD *)(((unsigned __int64)&v61 & 0xFFFFFFFFFFFFFFE0uLL) + 4) = v20; v21 = ((v18 - v11) << 20) / (v20 - v14); __asm { vpinsrd xmm1, xmm1, edi, 1 } _R9D = 4 * v21; _R11D = (v11 << 20) + (((v18 - v11) >> 31) & 0xFF800) + 1024; __asm { vmovd xmm0, r9d } v12 = *(_DWORD *)(((unsigned __int64)&v61 & 0xFFFFFFFFFFFFFFE0uLL) + 4); __asm { vpinsrd xmm0, xmm0, edx, 1 vpinsrd xmm0, xmm0, ecx, 2 vpinsrd xmm0, xmm0, eax, 3 } _EAX = 8 * v21; __asm { vmovd xmm4, eax vpinsrd xmm1, xmm1, r10d, 2 vpinsrd xmm1, xmm1, r8d, 3 vinsertf128 ymm2, ymm1, xmm0, 1 } v33 = v12; if ( *_RBP <= v12 ) v33 = *_RBP; v34 = v33 - v14; __asm { vmovd xmm0, r11d } _RCX = &_RSI[4 * v14]; __asm { vpbroadcastd ymm0, xmm0 } v38 = v34 >> 3; _R11 = &unk_180144700; __asm { vpaddd ymm3, ymm0, ymm2 vpbroadcastd ymm4, xmm4 vmovdqu [rbp+60h+var_40], ymm3 } if ( v34 >> 3 ) { do { __asm { vpsrad ymm1, ymm3, 14h vpcmpeqb ymm0, ymm0, ymm0 vpaddd ymm3, ymm3, ymm4 vmovdqu [rbp+60h+var_40], ymm3 vgatherdps ymm2, dword ptr [r11+ymm1*4], ymm0 vmulps ymm0, ymm2, ymmword ptr [rcx] vmovups ymmword ptr [rcx], ymm0 } _RCX += 32; --v38; } while ( v38 ); } v43 = v34 & 7; if ( v43 ) { v44 = *(_DWORD *)(((unsigned __int64)&v61 & 0xFFFFFFFFFFFFFFE0uLL) + 0x20); do { _RCX += 4; _RAX = (__int64)v44 >> 20; v44 += v21; __asm { vmovss xmm0, dword ptr [r11+rax*4] vmulss xmm1, xmm0, dword ptr [rcx-4] vmovss dword ptr [rcx-4], xmm1 } --v43; } while ( v43 ); } a3 = v62; v14 = v12; v11 = v18; } ++v13; ++v15; } while ( v13 < *(_DWORD *)(a2 + 52) ); v10 = *_RBP; } _RCX = v12; if ( v12 < (__int64)v10 ) { if ( v10 - (__int64)v12 < 4 ) goto LABEL_26; _RAX = (__int64)&_RSI[4 * v12 + 8]; v49 = ((unsigned __int64)(v10 - (__int64)v12 - 4) >> 2) + 1; _RCX = v12 + 4 * v49; do { __asm { vmovss xmm0, dword ptr [rax-8] vmulss xmm1, xmm0, dword ptr [r11+rdx*4] vmovss xmm0, dword ptr [rax-4] vmovss xmm2, dword ptr [rax] vmovss dword ptr [rax-8], xmm1 } _RAX += 16; __asm { vmulss xmm1, xmm0, dword ptr [r11+rdx*4] vmovss dword ptr [rax-14h], xmm1 vmulss xmm0, xmm2, dword ptr [r11+rdx*4] vmovss xmm1, dword ptr [rax-0Ch] vmovss dword ptr [rax-10h], xmm0 vmulss xmm0, xmm1, dword ptr [r11+rdx*4] vmovss dword ptr [rax-0Ch], xmm0 } --v49; } while ( v49 ); if ( _RCX < v10 ) { LABEL_26: do { __asm { vmovss xmm0, dword ptr [rsi+rcx*4] vmulss xmm1, xmm0, dword ptr [r11+rdx*4] vmovss dword ptr [rsi+rcx*4], xmm1 } ++_RCX; } while ( _RCX < v10 ); } } result = 1; } else { memset(a4, 0, 4LL * v9); result = 0; } __asm { vzeroupper } return result; }