{"type": "func", "start": 5373316272, "end": 5373316453, "name": "SetupTouchTogglePopup::onControlMode", "pseudocode": "// \n// SetupTouchTogglePopup::onControlMode from 0x140464cb0 to 0x140464d65 (181 bytes)\n// \n// 3 xrefs:\n// > SetupTouchTogglePopup::init @ 0x140464835\n// > SetupTouchTogglePopup::init @ 0x1404648eb\n// > <???> @ 0x1406db018\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid SetupTouchTogglePopup::onControlMode(SetupTouchTogglePopup *a1, cocos2d::CCObject *a2)\n{\n  int v3; // eax\n  EffectGameObject *m_gameObject; // rcx\n  unsigned int v5; // edi\n  cocos2d::CCArray *m_gameObjects; // rcx\n  struct cocos2d::CCObject *v7; // rax\n\n  v3 = a2->getTag(a2);\n  m_gameObject = a1->m_gameObject;\n  v5 = 0;\n  if ( a1->m_playerMode == v3 )\n    v3 = 0;\n  a1->m_playerMode = v3;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_touchPlayerMode = v3;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects && cocos2d::CCArray::count(m_gameObjects) )\n    {\n      do\n      {\n        v7 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v5++);\n        v7[29].m_uUnknown = a1->m_playerMode;\n      }\n      while ( v5 < cocos2d::CCArray::count(a1->m_gameObjects) );\n    }\n  }\n  CCMenuItemToggler::toggle(a1->m_p1OnlyToggler, a1->m_playerMode == 1);\n  CCMenuItemToggler::toggle(a1->m_p2OnlyToggler, a1->m_playerMode == 2);\n}", "assembly": "; \n; SetupTouchTogglePopup::onControlMode from 0x140464cb0 to 0x140464d65 (181 bytes)\n; \n; 3 xrefs:\n; > SetupTouchTogglePopup::init @ 0x140464835\n; > SetupTouchTogglePopup::init @ 0x1404648eb\n; > <???> @ 0x1406db018\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140464cb0\npush    rdi                                                            ; +0x5, 0x140464cb5\nsub     rsp, 20h                                                       ; +0x6, 0x140464cb6\nmov     rax, [rdx]                                                     ; +0xa, 0x140464cba\nmov     rbx, rcx                                                       ; +0xd, 0x140464cbd\nmov     rcx, rdx                                                       ; +0x10, 0x140464cc0\ncall    qword ptr [rax+38h]                                            ; +0x13, 0x140464cc3\nmov     rcx, [rbx+290h]                                                ; +0x16, 0x140464cc6\nxor     edi, edi                                                       ; +0x1d, 0x140464ccd\ncmp     [rbx+3BCh], eax                                                ; +0x1f, 0x140464ccf\ncmovz   eax, edi                                                       ; +0x25, 0x140464cd5\nmov     [rbx+3BCh], eax                                                ; +0x28, 0x140464cd8\ntest    rcx, rcx                                                       ; +0x2e, 0x140464cde\njz      short loc_140464CEB                                            ; +0x31, 0x140464ce1\nmov     [rcx+67Ch], eax                                                ; +0x33, 0x140464ce3\njmp     short loc_140464D2F                                            ; +0x39, 0x140464ce9\nmov     rcx, [rbx+298h]                                                ; +0x3b, 0x140464ceb\ntest    rcx, rcx                                                       ; +0x42, 0x140464cf2\njz      short loc_140464D2F                                            ; +0x45, 0x140464cf5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x47, 0x140464cf7\ntest    eax, eax                                                       ; +0x4d, 0x140464cfd\njz      short loc_140464D2F                                            ; +0x4f, 0x140464cff\nmov     rcx, [rbx+298h]                                                ; +0x51, 0x140464d01\nmov     edx, edi                                                       ; +0x58, 0x140464d08\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x5a, 0x140464d0a\nmov     ecx, [rbx+3BCh]                                                ; +0x60, 0x140464d10\ninc     edi                                                            ; +0x66, 0x140464d16\nmov     [rax+67Ch], ecx                                                ; +0x68, 0x140464d18\nmov     rcx, [rbx+298h]                                                ; +0x6e, 0x140464d1e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x75, 0x140464d25\ncmp     edi, eax                                                       ; +0x7b, 0x140464d2b\njb      short loc_140464D01                                            ; +0x7d, 0x140464d2d\ncmp     dword ptr [rbx+3BCh], 1                                        ; +0x7f, 0x140464d2f\nmov     rcx, [rbx+3D8h]                                                ; +0x86, 0x140464d36\nsetz    dl                                                             ; +0x8d, 0x140464d3d\ncall    CCMenuItemToggler__toggle                                      ; +0x90, 0x140464d40\ncmp     dword ptr [rbx+3BCh], 2                                        ; +0x95, 0x140464d45\nmov     rcx, [rbx+3E0h]                                                ; +0x9c, 0x140464d4c\nsetz    dl                                                             ; +0xa3, 0x140464d53\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa6, 0x140464d56\nadd     rsp, 20h                                                       ; +0xab, 0x140464d5b\npop     rdi                                                            ; +0xaf, 0x140464d5f\njmp     CCMenuItemToggler__toggle                                      ; +0xb0, 0x140464d60", "xrefs": ["SetupTouchTogglePopup::init @ 0x140464835", "SetupTouchTogglePopup::init @ 0x1404648eb", "<???> @ 0x1406db018"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}