{"type": "func", "start": 4302471104, "end": 4302471294, "name": "ColorSelectPopup::onPlayerColor1", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor1 from 0x100727fc0 to 0x10072807e (190 bytes)\n// \n// 1 xrefs:\n// > ColorSelectPopup::init @ 0x100725a07\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::onPlayerColor1(ColorSelectPopup *a1, cocos2d::CCObject *a2)\n{\n  int m_playerColor; // ecx\n  _BOOL8 v4; // rax\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_playerColor2Toggle, 0);\n  m_playerColor = a1->m_playerColor;\n  v4 = m_playerColor != 1;\n  a1->m_playerColor = v4;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_usesPlayerColor1 = m_playerColor != 1;\n    m_gameObject->m_usesPlayerColor2 = 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 + 1485) = a1->m_playerColor == 1;\n          *(_BYTE *)(v8 + 1486) = 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::onPlayerColor1 from 0x100727fc0 to 0x10072807e (190 bytes)\n; \n; 1 xrefs:\n; > ColorSelectPopup::init @ 0x100725a07\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, 0x100727fc0\nmov     rbp, rsp                                                       ; +0x1, 0x100727fc1\npush    r14                                                            ; +0x4, 0x100727fc4\npush    rbx                                                            ; +0x6, 0x100727fc6\nmov     rbx, rdi                                                       ; +0x7, 0x100727fc7\nmov     rdi, [rdi+3F0h]                                                ; +0xa, 0x100727fca\nxor     esi, esi                                                       ; +0x11, 0x100727fd1\ncall    CCMenuItemToggler__toggle                                      ; +0x13, 0x100727fd3\nmov     ecx, [rbx+424h]                                                ; +0x18, 0x100727fd8\nxor     eax, eax                                                       ; +0x1e, 0x100727fde\ncmp     ecx, 1                                                         ; +0x20, 0x100727fe0\nsetnz   al                                                             ; +0x23, 0x100727fe3\nmov     [rbx+424h], eax                                                ; +0x26, 0x100727fe6\nmov     rdx, [rbx+290h]                                                ; +0x2c, 0x100727fec\ntest    rdx, rdx                                                       ; +0x33, 0x100727ff3\njz      short loc_10072800E                                            ; +0x36, 0x100727ff6\ncmp     ecx, 1                                                         ; +0x38, 0x100727ff8\nsetnz   byte ptr [rdx+5CDh]                                            ; +0x3b, 0x100727ffb\nmov     byte ptr [rdx+5CEh], 0                                         ; +0x42, 0x100728002\npop     rbx                                                            ; +0x49, 0x100728009\npop     r14                                                            ; +0x4a, 0x10072800a\npop     rbp                                                            ; +0x4c, 0x10072800c\nretn                                                                   ; +0x4d, 0x10072800d\nmov     rdi, [rbx+298h]                                                ; +0x4e, 0x10072800e\ntest    rdi, rdi                                                       ; +0x55, 0x100728015\njz      short loc_10072806A                                            ; +0x58, 0x100728018\ncall    sub_100720070                                                  ; +0x5a, 0x10072801a\ntest    eax, eax                                                       ; +0x5f, 0x10072801f\njz      short loc_100728009                                            ; +0x61, 0x100728021\nxor     r14d, r14d                                                     ; +0x63, 0x100728023\nnop     word ptr [rax+rax+00000000h]                                   ; +0x66, 0x100728026\nmov     rdi, [rbx+298h]                                                ; +0x70, 0x100728030\nmov     esi, r14d                                                      ; +0x77, 0x100728037\ncall    sub_1007200C0                                                  ; +0x7a, 0x10072803a\ncmp     dword ptr [rbx+424h], 1                                        ; +0x7f, 0x10072803f\nsetz    byte ptr [rax+5CDh]                                            ; +0x86, 0x100728046\nmov     byte ptr [rax+5CEh], 0                                         ; +0x8d, 0x10072804d\ninc     r14d                                                           ; +0x94, 0x100728054\nmov     rdi, [rbx+298h]                                                ; +0x97, 0x100728057\ncall    sub_100720070                                                  ; +0x9e, 0x10072805e\ncmp     r14d, eax                                                      ; +0xa3, 0x100728063\njb      short loc_100728030                                            ; +0xa6, 0x100728066\njmp     short loc_100728009                                            ; +0xa8, 0x100728068\nmov     rcx, [rbx+430h]                                                ; +0xaa, 0x10072806a\ntest    rcx, rcx                                                       ; +0xb1, 0x100728071\njz      short loc_100728009                                            ; +0xb4, 0x100728074\nmov     [rcx+58h], eax                                                 ; +0xb6, 0x100728076\npop     rbx                                                            ; +0xb9, 0x100728079\npop     r14                                                            ; +0xba, 0x10072807a\npop     rbp                                                            ; +0xbc, 0x10072807c\nretn                                                                   ; +0xbd, 0x10072807d", "xrefs": ["ColorSelectPopup::init @ 0x100725a07"], "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"}