//
// sub_1001E6620 from 0x1001e6620 to 0x1001e670d (237 bytes)
//
// 0 xrefs:
//
// 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:26:30 +0000
//
__int64 __fastcall sub_1001E6620(__int64 a1, unsigned int a2, unsigned __int8 a3, __int64 *a4, double a5)
{
unsigned int v7; // ebx
__int64 result; // rax
__int64 Delegate; // r12
__int64 v10; // rcx
unsigned __int64 v11; // rbx
unsigned int v12; // r13d
char v13; // r14
__int64 v14; // rsi
bool v15; // zf
unsigned __int8 v17; // [rsp+14h] [rbp-2Ch]
v7 = a2;
result = sub_1007FEF90(*(_QWORD *)(a1 + 56));
if ( (_DWORD)result )
{
result = sub_1007FF000(*(_QWORD *)(a1 + 56));
if ( result )
{
Delegate = cocos2d::CCKeyboardHandler::getDelegate(result);
result = *a4;
v10 = a4[1];
if ( v10 == *a4 )
return (*(__int64 (__fastcall **)(__int64, _QWORD, double))(*(_QWORD *)Delegate + 8LL * (a3 ^ 1u)))(
Delegate,
v7,
a5);
v11 = 0;
v17 = a3;
v12 = a3;
v13 = 0;
do
{
v14 = *(unsigned int *)(result + 4 * v11);
if ( (_DWORD)v14 )
{
v13 |= (*(__int64 (__fastcall **)(__int64, __int64, _QWORD, double))(*(_QWORD *)Delegate + 16LL))(
Delegate,
v14,
v12,
a5);
result = *a4;
v10 = a4[1];
}
++v11;
}
while ( v11 < (v10 - result) >> 2 );
v15 = (v13 & 1) == 0;
v7 = a2;
a3 = v17;
if ( v15 )
return (*(__int64 (__fastcall **)(__int64, _QWORD, double))(*(_QWORD *)Delegate + 8LL * (a3 ^ 1u)))(
Delegate,
v7,
a5);
}
}
return result;
}