//
// sub_140676FB0 from 0x140676fb0 to 0x140677036 (134 bytes)
//
// 2 xrefs:
// > sub_1406765E0 @ 0x140676903
// > ??> @ 0x140932600
//
// 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 11:35:59 +0000
//
char __fastcall sub_140676FB0(__int64 a1, unsigned int a2)
{
const __m128i **v3; // r14
const __m128i *v4; // rbp
unsigned int v5; // edi
const __m128i *v6; // rbx
__m128i v7; // xmm0
unsigned int v9; // [rsp+48h] [rbp+10h] BYREF
v9 = a2;
if ( !a2 )
return 0;
v3 = *(const __m128i ***)a1;
v4 = **(const __m128i ***)a1;
while ( 1 )
{
_BitScanReverse(&v5, a2);
v6 = v4;
if ( !v5
|| (v6 = (const __m128i *)((char *)v4 + v5),
v7 = (__m128i)_mm_xor_ps((__m128)_mm_loadu_si128(v6), *(__m128 *)(a1 + 16)),
_mm_testz_si128(v7, v7)) )
{
if ( !memcmp(&v6[1], *(const void **)(a1 + 32), *(_QWORD *)(a1 + 40) - 16LL) )
break;
}
_bittestandreset((signed __int32 *)&v9, v5);
a2 = v9;
if ( !v9 )
return 0;
}
*v3 = v6;
return 1;
}