{"type": "func", "start": 5371562240, "end": 5371562457, "name": "GJSpecialColorSelect::onSelectColor", "pseudocode": "// \n// GJSpecialColorSelect::onSelectColor from 0x1402b8900 to 0x1402b89d9 (217 bytes)\n// \n// 5 xrefs:\n// > GJSpecialColorSelect::init @ 0x1402b8799\n// > <???> @ 0x14068be80\n// > <???> @ 0x14068beb4\n// > <???> @ 0x1406d25b8\n// > <???> @ 0x1406d25c4\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 GJSpecialColorSelect::onSelectColor(GJSpecialColorSelect *a1, cocos2d::CCObject *a2)\n{\n  unsigned int v4; // edi\n  ButtonSprite *i; // rbp\n  ButtonSprite *v6; // rbx\n  int v7; // eax\n  const char *v8; // rdx\n\n  a1->m_colorID = a2->getTag(a2);\n  v4 = 0;\n  for ( i = (ButtonSprite *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].copyWithZone)(a2);\n        v4 < cocos2d::CCArray::count(a1->m_buttonSprites);\n        ++v4 )\n  {\n    v6 = (ButtonSprite *)cocos2d::CCArray::objectAtIndex(a1->m_buttonSprites, v4);\n    v7 = v6->getTag(v6);\n    v8 = \"GJ_button_05.png\";\n    if ( v7 != 1008 )\n      v8 = \"GJ_button_04.png\";\n    ButtonSprite::updateBGImage(v6, v8);\n  }\n  if ( i )\n    ButtonSprite::updateBGImage(i, \"GJ_button_02.png\");\n}", "assembly": "; \n; GJSpecialColorSelect::onSelectColor from 0x1402b8900 to 0x1402b89d9 (217 bytes)\n; \n; 5 xrefs:\n; > GJSpecialColorSelect::init @ 0x1402b8799\n; > <???> @ 0x14068be80\n; > <???> @ 0x14068beb4\n; > <???> @ 0x1406d25b8\n; > <???> @ 0x1406d25c4\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, 0x1402b8900\nsub     rsp, 20h                                                       ; +0x2, 0x1402b8902\nmov     rax, [rdx]                                                     ; +0x6, 0x1402b8906\nmov     [rsp+28h+arg_0], rbx                                           ; +0x9, 0x1402b8909\nmov     rbx, rdx                                                       ; +0xe, 0x1402b890e\nmov     [rsp+28h+arg_8], rsi                                           ; +0x11, 0x1402b8911\nmov     rsi, rcx                                                       ; +0x16, 0x1402b8916\nmov     rcx, rdx                                                       ; +0x19, 0x1402b8919\nmov     [rsp+28h+arg_10], rdi                                          ; +0x1c, 0x1402b891c\ncall    qword ptr [rax+38h]                                            ; +0x21, 0x1402b8921\nmov     [rsi+280h], eax                                                ; +0x24, 0x1402b8924\nmov     rcx, rbx                                                       ; +0x2a, 0x1402b892a\nmov     rax, [rbx]                                                     ; +0x2d, 0x1402b892d\ncall    qword ptr [rax+3A8h]                                           ; +0x30, 0x1402b8930\nmov     rcx, [rsi+288h]                                                ; +0x36, 0x1402b8936\nxor     edi, edi                                                       ; +0x3d, 0x1402b893d\nmov     rbp, rax                                                       ; +0x3f, 0x1402b893f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x42, 0x1402b8942\ntest    eax, eax                                                       ; +0x48, 0x1402b8948\njz      short loc_1402B89AB                                            ; +0x4a, 0x1402b894a\nmov     [rsp+28h+arg_18], r14                                          ; +0x4c, 0x1402b894c\nlea     r14, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x51, 0x1402b8951\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x58, 0x1402b8958\nmov     rcx, [rsi+288h]                                                ; +0x60, 0x1402b8960\nmov     edx, edi                                                       ; +0x67, 0x1402b8967\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x1402b8969\nmov     rcx, rax                                                       ; +0x6f, 0x1402b896f\nmov     rbx, rax                                                       ; +0x72, 0x1402b8972\nmov     rdx, [rax]                                                     ; +0x75, 0x1402b8975\ncall    qword ptr [rdx+38h]                                            ; +0x78, 0x1402b8978\nlea     rdx, aGjButton05Png; \"GJ_button_05.png\"                        ; +0x7b, 0x1402b897b\nmov     rcx, rbx                                                       ; +0x82, 0x1402b8982\ncmp     eax, 3F0h                                                      ; +0x85, 0x1402b8985\ncmovnz  rdx, r14                                                       ; +0x8a, 0x1402b898a\ncall    ButtonSprite__updateBGImage                                    ; +0x8e, 0x1402b898e\nmov     rcx, [rsi+288h]                                                ; +0x93, 0x1402b8993\ninc     edi                                                            ; +0x9a, 0x1402b899a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x9c, 0x1402b899c\ncmp     edi, eax                                                       ; +0xa2, 0x1402b89a2\njb      short loc_1402B8960                                            ; +0xa4, 0x1402b89a4\nmov     r14, [rsp+28h+arg_18]                                          ; +0xa6, 0x1402b89a6\nmov     rdi, [rsp+28h+arg_10]                                          ; +0xab, 0x1402b89ab\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xb0, 0x1402b89b0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xb5, 0x1402b89b5\ntest    rbp, rbp                                                       ; +0xba, 0x1402b89ba\njz      short loc_1402B89D3                                            ; +0xbd, 0x1402b89bd\nlea     rdx, aGjButton02Png; \"GJ_button_02.png\"                        ; +0xbf, 0x1402b89bf\nmov     rcx, rbp                                                       ; +0xc6, 0x1402b89c6\nadd     rsp, 20h                                                       ; +0xc9, 0x1402b89c9\npop     rbp                                                            ; +0xcd, 0x1402b89cd\njmp     ButtonSprite__updateBGImage                                    ; +0xce, 0x1402b89ce\nadd     rsp, 20h                                                       ; +0xd3, 0x1402b89d3\npop     rbp                                                            ; +0xd7, 0x1402b89d7\nretn                                                                   ; +0xd8, 0x1402b89d8", "xrefs": ["GJSpecialColorSelect::init @ 0x1402b8799", "<???> @ 0x14068be80", "<???> @ 0x14068beb4", "<???> @ 0x1406d25b8", "<???> @ 0x1406d25c4"], "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"}