//
// sub_1008B5BB0 from 0x1008b5bb0 to 0x1008b5c2d (125 bytes)
//
// 1 xrefs:
// > sub_1008B5630 @ 0x1008b5884
//
// 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:37:23 +0000
//
__int64 __fastcall sub_1008B5BB0(__int64 a1, __int64 a2)
{
int v2; // r15d
__int64 result; // rax
__int64 v4; // r14
unsigned int v5; // eax
v2 = *((_DWORD *)&unk_100BAE5A0 + 8 * (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2));
*(_DWORD *)(a1 + 332) = v2;
result = sub_1008B5C30(a1);
v4 = *(_QWORD *)(a1 + 320);
if ( v4 )
{
v5 = GJKeybindManager::encodeChord((unsigned __int16)v2 + (unsigned __int8)(v2 & *(_BYTE *)(a1 + 328)), 0, 0, 0);
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 16LL))(v4, v5);
}
return result;
}