{"type": "func", "start": 4302471296, "end": 4302471486, "name": "ColorSelectPopup::onPlayerColor2", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor2 from 0x100728080 to 0x10072813e (190 bytes)\n// \n// 1 xrefs:\n// > ColorSelectPopup::init @ 0x100725ab1\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 __fastcall ColorSelectPopup::onPlayerColor2(ColorSelectPopup *a1, cocos2d::CCObject *a2)\n{\n  int m_playerColor; // ecx\n  int v4; // eax\n  EffectGameObject *m_gameObject; // rdx\n  cocos2d::CCArray *m_gameObjects; // rdi\n  unsigned int v7; // r14d\n  __int64 v8; // rax\n  ColorAction *m_colorAction; // rcx\n\n  CCMenuItemToggler::toggle(a1->m_playerColor1Toggle, 0);\n  m_playerColor = a1->m_playerColor;\n  v4 = 2 * (m_playerColor != 2);\n  a1->m_playerColor = v4;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_usesPlayerColor2 = m_playerColor != 2;\n    m_gameObject->m_usesPlayerColor1 = 0;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects )\n    {\n      if ( (unsigned int)sub_100720070((__int64)m_gameObjects) )\n      {\n        v7 = 0;\n        do\n        {\n          v8 = sub_1007200C0((__int64)a1->m_gameObjects, v7);\n          *(_BYTE *)(v8 + 1486) = a1->m_playerColor == 2;\n          *(_BYTE *)(v8 + 1485) = 0;\n          ++v7;\n        }\n        while ( v7 < (unsigned int)sub_100720070((__int64)a1->m_gameObjects) );\n      }\n    }\n    else\n    {\n      m_colorAction = a1->m_colorAction;\n      if ( m_colorAction )\n        m_colorAction->m_playerColor = v4;\n    }\n  }\n}", "assembly": "; \n; ColorSelectPopup::onPlayerColor2 from 0x100728080 to 0x10072813e (190 bytes)\n; \n; 1 xrefs:\n; > ColorSelectPopup::init @ 0x100725ab1\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\npush    rbp                                                            ; +0x0, 0x100728080\nmov     rbp, rsp                                                       ; +0x1, 0x100728081\npush    r14                                                            ; +0x4, 0x100728084\npush    rbx                                                            ; +0x6, 0x100728086\nmov     rbx, rdi                                                       ; +0x7, 0x100728087\nmov     rdi, [rdi+3E8h]                                                ; +0xa, 0x10072808a\nxor     esi, esi                                                       ; +0x11, 0x100728091\ncall    CCMenuItemToggler__toggle                                      ; +0x13, 0x100728093\nmov     ecx, [rbx+424h]                                                ; +0x18, 0x100728098\nxor     eax, eax                                                       ; +0x1e, 0x10072809e\ncmp     ecx, 2                                                         ; +0x20, 0x1007280a0\nsetnz   al                                                             ; +0x23, 0x1007280a3\nadd     eax, eax                                                       ; +0x26, 0x1007280a6\nmov     [rbx+424h], eax                                                ; +0x28, 0x1007280a8\nmov     rdx, [rbx+290h]                                                ; +0x2e, 0x1007280ae\ntest    rdx, rdx                                                       ; +0x35, 0x1007280b5\njz      short loc_1007280D0                                            ; +0x38, 0x1007280b8\ncmp     ecx, 2                                                         ; +0x3a, 0x1007280ba\nsetnz   byte ptr [rdx+5CEh]                                            ; +0x3d, 0x1007280bd\nmov     byte ptr [rdx+5CDh], 0                                         ; +0x44, 0x1007280c4\npop     rbx                                                            ; +0x4b, 0x1007280cb\npop     r14                                                            ; +0x4c, 0x1007280cc\npop     rbp                                                            ; +0x4e, 0x1007280ce\nretn                                                                   ; +0x4f, 0x1007280cf\nmov     rdi, [rbx+298h]                                                ; +0x50, 0x1007280d0\ntest    rdi, rdi                                                       ; +0x57, 0x1007280d7\njz      short loc_10072812A                                            ; +0x5a, 0x1007280da\ncall    sub_100720070                                                  ; +0x5c, 0x1007280dc\ntest    eax, eax                                                       ; +0x61, 0x1007280e1\njz      short loc_1007280CB                                            ; +0x63, 0x1007280e3\nxor     r14d, r14d                                                     ; +0x65, 0x1007280e5\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x68, 0x1007280e8\nmov     rdi, [rbx+298h]                                                ; +0x70, 0x1007280f0\nmov     esi, r14d                                                      ; +0x77, 0x1007280f7\ncall    sub_1007200C0                                                  ; +0x7a, 0x1007280fa\ncmp     dword ptr [rbx+424h], 2                                        ; +0x7f, 0x1007280ff\nsetz    byte ptr [rax+5CEh]                                            ; +0x86, 0x100728106\nmov     byte ptr [rax+5CDh], 0                                         ; +0x8d, 0x10072810d\ninc     r14d                                                           ; +0x94, 0x100728114\nmov     rdi, [rbx+298h]                                                ; +0x97, 0x100728117\ncall    sub_100720070                                                  ; +0x9e, 0x10072811e\ncmp     r14d, eax                                                      ; +0xa3, 0x100728123\njb      short loc_1007280F0                                            ; +0xa6, 0x100728126\njmp     short loc_1007280CB                                            ; +0xa8, 0x100728128\nmov     rcx, [rbx+430h]                                                ; +0xaa, 0x10072812a\ntest    rcx, rcx                                                       ; +0xb1, 0x100728131\njz      short loc_1007280CB                                            ; +0xb4, 0x100728134\nmov     [rcx+58h], eax                                                 ; +0xb6, 0x100728136\npop     rbx                                                            ; +0xb9, 0x100728139\npop     r14                                                            ; +0xba, 0x10072813a\npop     rbp                                                            ; +0xbc, 0x10072813c\nretn                                                                   ; +0xbd, 0x10072813d", "xrefs": ["ColorSelectPopup::init @ 0x100725ab1"], "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"}