{"type": "func", "start": 4297112688, "end": 4297112870, "name": "GJColorSetupLayer::onColor", "pseudocode": "// \n// GJColorSetupLayer::onColor from 0x10020bc70 to 0x10020bd26 (182 bytes)\n// \n// 1 xrefs:\n// > GJColorSetupLayer::init @ 0x10020b8b9\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 GJColorSetupLayer::onColor(GJColorSetupLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // r14d\n  int v4; // eax\n  ColorSetupDelegate *m_delegate; // rdi\n  ColorAction *ColorAction; // rax\n  ColorSelectPopup *v7; // rax\n\n  v3 = a1->m_page * a1->m_colorsPerPage;\n  v4 = v3 + ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  if ( a1->m_closeOnSelect )\n  {\n    a1->m_colorID = v4;\n    m_delegate = a1->m_delegate;\n    if ( m_delegate )\n    {\n      if ( v4 > 0 )\n        ((void (__fastcall *)(ColorSetupDelegate *, _QWORD))m_delegate->colorSetupClosed)(m_delegate, (unsigned int)v4);\n    }\n    ((void (__fastcall *)(GJColorSetupLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n    ((void (__fastcall *)(GJColorSetupLayer *, __int64))a1->removeFromParentAndCleanup)(a1, 1);\n  }\n  else\n  {\n    ColorAction = GJEffectManager::getColorAction(a1->m_settingsObject->m_effectManager, v4);\n    v7 = ColorSelectPopup::create_3(ColorAction);\n    v7->m_delegate = &a1->ColorSelectDelegate;\n    v7->m_ZOrder = 106;\n    ((void (__fastcall *)(ColorSelectPopup *))v7->show)(v7);\n  }\n}", "assembly": "; \n; GJColorSetupLayer::onColor from 0x10020bc70 to 0x10020bd26 (182 bytes)\n; \n; 1 xrefs:\n; > GJColorSetupLayer::init @ 0x10020b8b9\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, 0x10020bc70\nmov     rbp, rsp                                                       ; +0x1, 0x10020bc71\npush    r14                                                            ; +0x4, 0x10020bc74\npush    rbx                                                            ; +0x6, 0x10020bc76\nmov     rbx, rdi                                                       ; +0x7, 0x10020bc77\nmov     r14d, [rdi+2B4h]                                               ; +0xa, 0x10020bc7a\nimul    r14d, [rdi+2B0h]                                               ; +0x11, 0x10020bc81\nmov     rax, [rsi]                                                     ; +0x19, 0x10020bc89\nmov     rdi, rsi                                                       ; +0x1c, 0x10020bc8c\ncall    qword ptr [rax+40h]                                            ; +0x1f, 0x10020bc8f\nadd     eax, r14d                                                      ; +0x22, 0x10020bc92\ncmp     byte ptr [rbx+2D0h], 1                                         ; +0x25, 0x10020bc95\njnz     short loc_10020BCE1                                            ; +0x2c, 0x10020bc9c\nmov     [rbx+2E0h], eax                                                ; +0x2e, 0x10020bc9e\nmov     rdi, [rbx+2D8h]                                                ; +0x34, 0x10020bca4\ntest    rdi, rdi                                                       ; +0x3b, 0x10020bcab\njz      short loc_10020BCBB                                            ; +0x3e, 0x10020bcae\ntest    eax, eax                                                       ; +0x40, 0x10020bcb0\njle     short loc_10020BCBB                                            ; +0x42, 0x10020bcb2\nmov     rcx, [rdi]                                                     ; +0x44, 0x10020bcb4\nmov     esi, eax                                                       ; +0x47, 0x10020bcb7\ncall    qword ptr [rcx]                                                ; +0x49, 0x10020bcb9\nmov     rax, [rbx]                                                     ; +0x4b, 0x10020bcbb\nmov     rdi, rbx                                                       ; +0x4e, 0x10020bcbe\nxor     esi, esi                                                       ; +0x51, 0x10020bcc1\ncall    qword ptr [rax+420h]                                           ; +0x53, 0x10020bcc3\nmov     rax, [rbx]                                                     ; +0x59, 0x10020bcc9\nmov     rax, [rax+200h]                                                ; +0x5c, 0x10020bccc\nmov     rdi, rbx                                                       ; +0x63, 0x10020bcd3\nmov     esi, 1                                                         ; +0x66, 0x10020bcd6\npop     rbx                                                            ; +0x6b, 0x10020bcdb\npop     r14                                                            ; +0x6c, 0x10020bcdc\npop     rbp                                                            ; +0x6e, 0x10020bcde\njmp     rax                                                            ; +0x6f, 0x10020bcdf\nmov     rcx, [rbx+288h]                                                ; +0x71, 0x10020bce1\nmov     rdi, [rcx+140h]                                                ; +0x78, 0x10020bce8\nmov     esi, eax                                                       ; +0x7f, 0x10020bcef\ncall    GJEffectManager__getColorAction                                ; +0x81, 0x10020bcf1\nmov     rdi, rax                                                       ; +0x86, 0x10020bcf6\ncall    ColorSelectPopup__create_3                                     ; +0x89, 0x10020bcf9\nadd     rbx, 278h                                                      ; +0x8e, 0x10020bcfe\nmov     [rax+418h], rbx                                                ; +0x95, 0x10020bd05\nmov     dword ptr [rax+248h], 6Ah ; 'j'                                ; +0x9c, 0x10020bd0c\nmov     rcx, [rax]                                                     ; +0xa6, 0x10020bd16\nmov     rdi, rax                                                       ; +0xa9, 0x10020bd19\npop     rbx                                                            ; +0xac, 0x10020bd1c\npop     r14                                                            ; +0xad, 0x10020bd1d\npop     rbp                                                            ; +0xaf, 0x10020bd1f\njmp     qword ptr [rcx+508h]                                           ; +0xb0, 0x10020bd20", "xrefs": ["GJColorSetupLayer::init @ 0x10020b8b9"], "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"}