//
// cocos2d::extension::CCControlButton::ccTouchMoved from 0x100340790 to 0x1003408a9 (281 bytes)
//
// 3 xrefs:
// > sub_1003408B0 @ 0x1003408bc
// > ??> @ 0x100b1de00
// > ??> @ 0x100b524e8
//
// 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:28:43 +0000
//
__int64 __fastcall cocos2d::extension::CCControlButton::ccTouchMoved(_BYTE *a1, __int64 a2)
{
__int64 result; // rax
char v3; // r14
char v4; // al
__int64 v5; // rcx
if ( (*(unsigned __int8 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1272LL))(a1)
&& a1[524] == 1
&& !(*(unsigned __int8 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1288LL))(a1) )
{
v3 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)a1 + 1352LL))(a1, a2);
v4 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1304LL))(a1);
v5 = *(_QWORD *)a1;
if ( v3 )
{
if ( v4 )
{
result = (*(__int64 (__fastcall **)(_BYTE *))(v5 + 1304))(a1);
if ( (_BYTE)result )
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)a1 + 1320LL))(a1, 2);
}
else
{
(*(void (__fastcall **)(_BYTE *, __int64))(v5 + 1296))(a1, 1);
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)a1 + 1320LL))(a1, 8);
}
}
else if ( v4 )
{
(*(void (__fastcall **)(_BYTE *, _QWORD))(v5 + 1296))(a1, 0);
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)a1 + 1320LL))(a1, 16);
}
else
{
result = (*(__int64 (__fastcall **)(_BYTE *))(v5 + 1304))(a1);
if ( !(_BYTE)result )
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)a1 + 1320LL))(a1, 4);
}
}
else
{
result = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1304LL))(a1);
if ( (_BYTE)result )
return (*(__int64 (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 1296LL))(a1, 0);
}
return result;
}