//
// sub_1006416A0 from 0x1006416a0 to 0x10064172d (141 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b81798
//
// 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:34:43 +0000
//
__int64 __fastcall sub_1006416A0(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int64 result; // rax
__int64 v5; // r14
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rdi
v3 = *(_QWORD *)(a1 + 184);
if ( v3 )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 912LL))(v3);
*(_QWORD *)(a1 + 184) = 0;
}
else
{
result = *(unsigned int *)(a1 + 120);
if ( (_DWORD)result == *(_DWORD *)(a2 + 56) )
{
*(_QWORD *)(a1 + 184) = 0;
if ( (_DWORD)result != -1 )
{
*(_DWORD *)(a1 + 120) = -1;
v5 = *(_QWORD *)(a1 + 104);
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, "GJ_rotationControlBtn01_001.png");
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 1160LL))(v5, v7);
v8 = *(_QWORD *)(a1 + 192);
if ( v8 )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 16LL))(v8);
}
}
}
return result;
}