{"type": "func", "start": 4296598348, "end": 4296598636, "name": "GJColorSetupLayer::updateSpriteColors", "pseudocode": "// \n// GJColorSetupLayer::updateSpriteColors from 0x10018e34c to 0x10018e46c (288 bytes)\n// \n// 4 xrefs:\n// > GJColorSetupLayer::init @ 0x10018e040\n// > GJColorSetupLayer::showPage @ 0x10018e584\n// > GJColorSetupLayer::colorSelectClosed @ 0x10018e61c\n// > sub_10018E620 @ 0x10018e624\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::updateSpriteColors(GJColorSetupLayer *a1)\n{\n  int m_page; // w21\n  int m_colorsPerPage; // w22\n  __int64 v4; // x20\n  int v5; // w23\n  ColorChannelSprite *v6; // x21\n  cocos2d::CCLabelBMFont *v7; // x22\n  __int64 v8; // x0\n\n  m_page = a1->m_page;\n  m_colorsPerPage = a1->m_colorsPerPage;\n  if ( (unsigned int)sub_10024A36C(a1->m_colorSprites) )\n  {\n    v4 = 0;\n    v5 = m_colorsPerPage * m_page;\n    do\n    {\n      v6 = (ColorChannelSprite *)sub_10024A388(a1->m_colorSprites, v4);\n      v7 = (cocos2d::CCLabelBMFont *)sub_10024A388(a1->m_colorLabels, v4);\n      v8 = ((__int64 (__fastcall *)(ColorChannelSprite *))v6->getParent)(v6);\n      if ( v5 + (int)v4 > 998 )\n      {\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 1040LL))(v8, 0);\n        ((void (__fastcall *)(ColorChannelSprite *, _QWORD))v6->setVisible)(v6, 0);\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))v7->setVisible)(v7, 0);\n      }\n      else\n      {\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1040LL))(v8, 1);\n        ((void (__fastcall *)(ColorChannelSprite *, __int64))v6->setVisible)(v6, 1);\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v7->setVisible)(v7, 1);\n        GJColorSetupLayer::updateSpriteColor(a1, v6, v7, v5 + v4 + 1);\n      }\n      v4 = (unsigned int)(v4 + 1);\n    }\n    while ( (unsigned int)v4 < (unsigned int)sub_10024A36C(a1->m_colorSprites) );\n  }\n}", "assembly": "; \n; GJColorSetupLayer::updateSpriteColors from 0x10018e34c to 0x10018e46c (288 bytes)\n; \n; 4 xrefs:\n; > GJColorSetupLayer::init @ 0x10018e040\n; > GJColorSetupLayer::showPage @ 0x10018e584\n; > GJColorSetupLayer::colorSelectClosed @ 0x10018e61c\n; > sub_10018E620 @ 0x10018e624\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\nSTP             X24, X23, [SP,#-0x10+var_30]!                          ; +0x0, 0x10018e34c\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x10018e350\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x10018e354\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x10018e358\nADD             X29, SP, #0x30                                         ; +0x10, 0x10018e35c\nMOV             X19, X0                                                ; +0x14, 0x10018e360\nLDR             W21, [X0,#0x2B0]                                       ; +0x18, 0x10018e364\nLDR             W22, [X0,#0x2B4]                                       ; +0x1c, 0x10018e368\nLDR             X0, [X0,#0x2A8]                                        ; +0x20, 0x10018e36c\nBL              sub_10024A36C                                          ; +0x24, 0x10018e370\nCBZ             W0, loc_10018E458                                      ; +0x28, 0x10018e374\nMOV             W20, #0                                                ; +0x2c, 0x10018e378\nMUL             W23, W22, W21                                          ; +0x30, 0x10018e37c\nLDR             X0, [X19,#0x2A8]                                       ; +0x34, 0x10018e380\nMOV             X1, X20                                                ; +0x38, 0x10018e384\nBL              sub_10024A388                                          ; +0x3c, 0x10018e388\nMOV             X21, X0                                                ; +0x40, 0x10018e38c\nLDR             X0, [X19,#0x2A0]                                       ; +0x44, 0x10018e390\nMOV             X1, X20                                                ; +0x48, 0x10018e394\nBL              sub_10024A388                                          ; +0x4c, 0x10018e398\nMOV             X22, X0                                                ; +0x50, 0x10018e39c\nLDR             X8, [X21]                                              ; +0x54, 0x10018e3a0\nLDR             X8, [X8,#0x1F0]                                        ; +0x58, 0x10018e3a4\nMOV             X0, X21                                                ; +0x5c, 0x10018e3a8\nBLR             X8                                                     ; +0x60, 0x10018e3ac\nADD             W24, W23, W20                                          ; +0x64, 0x10018e3b0\nCMP             W24, #0x3E6                                            ; +0x68, 0x10018e3b4\nB.GT            loc_10018E40C                                          ; +0x6c, 0x10018e3b8\nLDR             X8, [X0]                                               ; +0x70, 0x10018e3bc\nLDR             X8, [X8,#0x410]                                        ; +0x74, 0x10018e3c0\nMOV             W1, #1                                                 ; +0x78, 0x10018e3c4\nBLR             X8                                                     ; +0x7c, 0x10018e3c8\nLDR             X8, [X21]                                              ; +0x80, 0x10018e3cc\nLDR             X8, [X8,#0x148]                                        ; +0x84, 0x10018e3d0\nMOV             X0, X21                                                ; +0x88, 0x10018e3d4\nMOV             W1, #1                                                 ; +0x8c, 0x10018e3d8\nBLR             X8                                                     ; +0x90, 0x10018e3dc\nLDR             X8, [X22]                                              ; +0x94, 0x10018e3e0\nLDR             X8, [X8,#0x148]                                        ; +0x98, 0x10018e3e4\nMOV             X0, X22                                                ; +0x9c, 0x10018e3e8\nMOV             W1, #1                                                 ; +0xa0, 0x10018e3ec\nBLR             X8                                                     ; +0xa4, 0x10018e3f0\nADD             W3, W24, #1                                            ; +0xa8, 0x10018e3f4\nMOV             X0, X19                                                ; +0xac, 0x10018e3f8\nMOV             X1, X21                                                ; +0xb0, 0x10018e3fc\nMOV             X2, X22                                                ; +0xb4, 0x10018e400\nBL              GJColorSetupLayer__updateSpriteColor                   ; +0xb8, 0x10018e404\nB               loc_10018E444                                          ; +0xbc, 0x10018e408\nLDR             X8, [X0]                                               ; +0xc0, 0x10018e40c\nLDR             X8, [X8,#0x410]                                        ; +0xc4, 0x10018e410\nMOV             W1, #0                                                 ; +0xc8, 0x10018e414\nBLR             X8                                                     ; +0xcc, 0x10018e418\nLDR             X8, [X21]                                              ; +0xd0, 0x10018e41c\nLDR             X8, [X8,#0x148]                                        ; +0xd4, 0x10018e420\nMOV             X0, X21                                                ; +0xd8, 0x10018e424\nMOV             W1, #0                                                 ; +0xdc, 0x10018e428\nBLR             X8                                                     ; +0xe0, 0x10018e42c\nLDR             X8, [X22]                                              ; +0xe4, 0x10018e430\nLDR             X8, [X8,#0x148]                                        ; +0xe8, 0x10018e434\nMOV             X0, X22                                                ; +0xec, 0x10018e438\nMOV             W1, #0                                                 ; +0xf0, 0x10018e43c\nBLR             X8                                                     ; +0xf4, 0x10018e440\nADD             W20, W20, #1                                           ; +0xf8, 0x10018e444\nLDR             X0, [X19,#0x2A8]                                       ; +0xfc, 0x10018e448\nBL              sub_10024A36C                                          ; +0x100, 0x10018e44c\nCMP             W20, W0                                                ; +0x104, 0x10018e450\nB.CC            loc_10018E380                                          ; +0x108, 0x10018e454\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x10c, 0x10018e458\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x110, 0x10018e45c\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x114, 0x10018e460\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0x118, 0x10018e464\nRET                                                                    ; +0x11c, 0x10018e468", "xrefs": ["GJColorSetupLayer::init @ 0x10018e040", "GJColorSetupLayer::showPage @ 0x10018e584", "GJColorSetupLayer::colorSelectClosed @ 0x10018e61c", "sub_10018E620 @ 0x10018e624"], "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"}