{"type": "func", "start": 5371161552, "end": 5371161752, "name": "GJColorSetupLayer::onColor", "pseudocode": "// \n// GJColorSetupLayer::onColor from 0x140256bd0 to 0x140256c98 (200 bytes)\n// \n// 2 xrefs:\n// > GJColorSetupLayer::init @ 0x140256319\n// > <???> @ 0x1406cf99c\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 GJColorSetupLayer::onColor(GJColorSetupLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // ebx\n  int v4; // edx\n  ColorSetupDelegate *m_delegate; // rcx\n  _BOOL8 v6; // rdx\n  ColorAction *ColorAction; // rax\n  ColorSelectPopup *v8; // rax\n  ColorSelectDelegate *v9; // rcx\n  ColorSelectPopup_vtbl *v10; // rdx\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    m_delegate = a1->m_delegate;\n    a1->m_colorID = v4;\n    if ( m_delegate )\n    {\n      if ( v4 > 0 )\n        ((void (__fastcall *)(ColorSetupDelegate *))m_delegate->colorSetupClosed)(m_delegate);\n    }\n    a1->setKeypadEnabled(a1, 0);\n    LOBYTE(v6) = 1;\n    a1->removeFromParentAndCleanup(a1, v6);\n  }\n  else\n  {\n    ColorAction = GJEffectManager::getColorAction(a1->m_settingsObject->m_effectManager, v4);\n    v8 = ColorSelectPopup::create(nullptr, nullptr, ColorAction);\n    v9 = &a1->ColorSelectDelegate;\n    if ( !a1 )\n      v9 = nullptr;\n    v8->m_ZOrder = 106;\n    v10 = v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v8->m_delegate = v9;\n    v10->show(v8);\n  }\n}", "assembly": "; \n; GJColorSetupLayer::onColor from 0x140256bd0 to 0x140256c98 (200 bytes)\n; \n; 2 xrefs:\n; > GJColorSetupLayer::init @ 0x140256319\n; > <???> @ 0x1406cf99c\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, 0x140256bd0\npush    rdi                                                            ; +0x5, 0x140256bd5\nsub     rsp, 20h                                                       ; +0x6, 0x140256bd6\nmov     ebx, [rcx+2B4h]                                                ; +0xa, 0x140256bda\nmov     rdi, rcx                                                       ; +0x10, 0x140256be0\nimul    ebx, [rcx+2B0h]                                                ; +0x13, 0x140256be3\nmov     rcx, rdx                                                       ; +0x1a, 0x140256bea\nmov     rax, [rdx]                                                     ; +0x1d, 0x140256bed\ncall    qword ptr [rax+38h]                                            ; +0x20, 0x140256bf0\ncmp     byte ptr [rdi+2D0h], 0                                         ; +0x23, 0x140256bf3\nlea     edx, [rbx+rax]                                                 ; +0x2a, 0x140256bfa\njz      short loc_140256C41                                            ; +0x2d, 0x140256bfd\nmov     rcx, [rdi+2D8h]                                                ; +0x2f, 0x140256bff\nmov     [rdi+2E0h], edx                                                ; +0x36, 0x140256c06\ntest    rcx, rcx                                                       ; +0x3c, 0x140256c0c\njz      short loc_140256C1A                                            ; +0x3f, 0x140256c0f\ntest    edx, edx                                                       ; +0x41, 0x140256c11\njle     short loc_140256C1A                                            ; +0x43, 0x140256c13\nmov     rax, [rcx]                                                     ; +0x45, 0x140256c15\ncall    qword ptr [rax]                                                ; +0x48, 0x140256c18\nmov     rax, [rdi]                                                     ; +0x4a, 0x140256c1a\nxor     edx, edx                                                       ; +0x4d, 0x140256c1d\nmov     rcx, rdi                                                       ; +0x4f, 0x140256c1f\ncall    qword ptr [rax+3D0h]                                           ; +0x52, 0x140256c22\nmov     rax, [rdi]                                                     ; +0x58, 0x140256c28\nmov     dl, 1                                                          ; +0x5b, 0x140256c2b\nmov     rcx, rdi                                                       ; +0x5d, 0x140256c2d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x60, 0x140256c30\nadd     rsp, 20h                                                       ; +0x65, 0x140256c35\npop     rdi                                                            ; +0x69, 0x140256c39\njmp     qword ptr [rax+1F8h]                                           ; +0x6a, 0x140256c3a\nmov     rcx, [rdi+288h]                                                ; +0x71, 0x140256c41\nmov     rcx, [rcx+140h]                                                ; +0x78, 0x140256c48\ncall    GJEffectManager__getColorAction                                ; +0x7f, 0x140256c4f\nmov     r8, rax                                                        ; +0x84, 0x140256c54\nxor     edx, edx                                                       ; +0x87, 0x140256c57\nxor     ecx, ecx                                                       ; +0x89, 0x140256c59\ncall    ColorSelectPopup__create                                       ; +0x8b, 0x140256c5b\nxor     edx, edx                                                       ; +0x90, 0x140256c60\nlea     rcx, [rdi+278h]                                                ; +0x92, 0x140256c62\ntest    rdi, rdi                                                       ; +0x99, 0x140256c69\ncmovz   rcx, rdx                                                       ; +0x9c, 0x140256c6c\nmov     dword ptr [rax+248h], 6Ah ; 'j'                                ; +0xa0, 0x140256c70\nmov     rdx, [rax]                                                     ; +0xaa, 0x140256c7a\nmov     [rax+410h], rcx                                                ; +0xad, 0x140256c7d\nmov     rcx, rax                                                       ; +0xb4, 0x140256c84\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xb7, 0x140256c87\nadd     rsp, 20h                                                       ; +0xbc, 0x140256c8c\npop     rdi                                                            ; +0xc0, 0x140256c90\njmp     qword ptr [rdx+410h]                                           ; +0xc1, 0x140256c91", "xrefs": ["GJColorSetupLayer::init @ 0x140256319", "<???> @ 0x1406cf99c"], "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"}