//
// sub_10056A790 from 0x10056a790 to 0x10056a8aa (282 bytes)
//
// 1 xrefs:
// > sub_10056A660 @ 0x10056a730
//
// 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
//
bool __fastcall sub_10056A790(__int64 a1, __int64 a2, int a3)
{
__int64 v3; // rax
bool result; // al
bool v6; // r13
cocos2d::CCDirector *v7; // rax
cocos2d::CCTouchDispatcher *v8; // rax
unsigned int v9; // r15d
float v10; // xmm0_4
__int64 v11; // rax
_QWORD v12[6]; // [rsp+0h] [rbp-30h] BYREF
v12[0] = v3;
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( result )
{
v6 = result;
v7 = cocos2d::CCDirector::sharedDirector();
v8 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v7->getTouchDispatcher)(v7);
v9 = 0;
cocos2d::CCTouchDispatcher::addTargetedDelegate(v8, (cocos2d::CCTouchDelegate *)(a1 + 320), 0, 1);
*(_DWORD *)(a1 + 404) = 1;
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v12);
*(float *)(a1 + 412) = (float)((int)*(float *)v12 - a3);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v12);
v10 = _mm_cvtepi32_ps(_mm_cvttps_epi32((__m128)HIDWORD(v12[0]))).f32[0];
*(float *)(a1 + 416) = v10;
*(_DWORD *)(a1 + 420) = *(_DWORD *)(a1 + 412);
*(float *)(a1 + 424) = v10;
if ( (unsigned int)sub_100720070(a2) )
{
do
{
v11 = sub_1007200C0(a2, v9);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 440LL))(a1, v11);
++v9;
}
while ( v9 < (unsigned int)sub_100720070(a2) );
}
*(_DWORD *)(a1 + 408) = sub_100720070(a2);
return v6;
}
return result;
}