//
// sub_1402E1D50 from 0x1402e1d50 to 0x1402e1de5 (149 bytes)
//
// 3 xrefs:
// > sub_1402E2370 @ 0x1402e2838
// > sub_1402E2370 @ 0x1402e2ae2
// > sub_1402E2370 @ 0x1402e2b0a
//
// 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_1402E1D50(unsigned int a1, _QWORD *a2)
{
__int64 v2; // r8
__int64 *v3; // rdx
__int64 v4; // rax
__int64 v5; // rdx
v2 = a2[1];
v3 = (__int64 *)(a2[3]
+ 16
* ((0x100000001B3LL
* (HIBYTE(a1)
^ (0x100000001B3LL
* (BYTE2(a1)
^ (0x100000001B3LL
* (BYTE1(a1) ^ (0x100000001B3LL * ((unsigned __int8)a1 ^ 0xCBF29CE484222325uLL))))))))
& a2[6]));
v4 = v3[1];
if ( v4 != v2 )
{
v5 = *v3;
if ( a1 == *(_DWORD *)(v4 + 16) )
goto LABEL_7;
while ( v4 != v5 )
{
v4 = *(_QWORD *)(v4 + 8);
if ( a1 == *(_DWORD *)(v4 + 16) )
goto LABEL_7;
}
}
v4 = 0;
LABEL_7:
if ( !v4 )
v4 = v2;
if ( v4 == v2 )
return a1;
else
return *(unsigned int *)(v4 + 20);
}