//
// sub_1004BE1C0 from 0x1004be1c0 to 0x1004be28d (205 bytes)
//
// 4 xrefs:
// > sub_1004BE130 @ 0x1004be19a
// > sub_1004BE900 @ 0x1004be961
// > sub_1004BEB10 @ 0x1004beb99
// > sub_1004BEF90 @ 0x1004befef
//
// 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:31:04 +0000
//
void __fastcall sub_1004BE1C0(void (__fastcall **block)(_QWORD), double a2)
{
id v2; // r14
__int64 v3; // rax
_QWORD *v4; // rbx
NSProcessInfo *v5; // rax
if ( +[NSThread isMainThread](&OBJC_CLASS___NSThread, "isMainThread") )
{
block[2](block);
}
else
{
v2 = +[EAGLView sharedEGLView](&OBJC_CLASS___EAGLView, "sharedEGLView");
objc_msgSend(v2, "unlockOpenGLContext");
dispatch_sync(&_dispatch_main_q, block);
objc_msgSend(v2, "lockOpenGLContext");
}
v3 = cocos2d::CCDirector::sharedDirector();
v4 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 192LL))(v3);
v5 = +[NSProcessInfo processInfo](&OBJC_CLASS___NSProcessInfo, "processInfo");
-[NSProcessInfo systemUptime](v5, "systemUptime");
sub_1001E6870(v4, a2);
cocos2d::CCKeyboardDispatcher::updateModifierKeys((__int64)v4, 0, 0, 0, 0);
}