{"type": "func", "start": 5371160816, "end": 5371161101, "name": "GJColorSetupLayer::updateSpriteColors", "pseudocode": "// \n// GJColorSetupLayer::updateSpriteColors from 0x1402568f0 to 0x140256a0d (285 bytes)\n// \n// 7 xrefs:\n// > GJColorSetupLayer::init @ 0x140256508\n// > GJColorSetupLayer::init @ 0x1402568a6\n// > GJColorSetupLayer::colorSelectClosed @ 0x140256ca7\n// > GJColorSetupLayer::showPage @ 0x140256d0c\n// > <???> @ 0x1406843d0\n// > <???> @ 0x1406843e0\n// > <???> @ 0x1406cf960\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::updateSpriteColors(GJColorSetupLayer *a1)\n{\n  int v2; // esi\n  unsigned int v3; // ebx\n  int v4; // r15d\n  ColorChannelSprite *v5; // rsi\n  cocos2d::CCLabelBMFont *v6; // r14\n  __int64 v7; // rdx\n  cocos2d::CCNode *v8; // rcx\n  cocos2d::CCNode_vtbl *v9; // r8\n  _BOOL8 v10; // rdx\n  _BOOL8 v11; // rdx\n\n  v2 = a1->m_page * a1->m_colorsPerPage;\n  v3 = 0;\n  if ( cocos2d::CCArray::count(a1->m_colorSprites) )\n  {\n    v4 = v2 + 1;\n    do\n    {\n      v5 = (ColorChannelSprite *)cocos2d::CCArray::objectAtIndex(a1->m_colorSprites, v3);\n      v6 = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(a1->m_colorLabels, v3);\n      v8 = v5->getParent(v5);\n      v9 = v8->__vftable;\n      if ( (int)(v4 + v3) > 999 )\n      {\n        ((void (__fastcall *)(cocos2d::CCNode *, _QWORD))v9[1].canEncode)(v8, 0);\n        v5->setVisible(v5, 0);\n        v6->setVisible(v6, 0);\n      }\n      else\n      {\n        LOBYTE(v7) = 1;\n        ((void (__fastcall *)(cocos2d::CCNode *, __int64))v9[1].canEncode)(v8, v7);\n        LOBYTE(v10) = 1;\n        v5->setVisible(v5, v10);\n        LOBYTE(v11) = 1;\n        v6->setVisible(v6, v11);\n        GJColorSetupLayer::updateSpriteColor(a1, v5, v6, v4 + v3);\n      }\n      ++v3;\n    }\n    while ( v3 < cocos2d::CCArray::count(a1->m_colorSprites) );\n  }\n}", "assembly": "; \n; GJColorSetupLayer::updateSpriteColors from 0x1402568f0 to 0x140256a0d (285 bytes)\n; \n; 7 xrefs:\n; > GJColorSetupLayer::init @ 0x140256508\n; > GJColorSetupLayer::init @ 0x1402568a6\n; > GJColorSetupLayer::colorSelectClosed @ 0x140256ca7\n; > GJColorSetupLayer::showPage @ 0x140256d0c\n; > <???> @ 0x1406843d0\n; > <???> @ 0x1406843e0\n; > <???> @ 0x1406cf960\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    rbx                                                            ; +0x0, 0x1402568f0\npush    rsi                                                            ; +0x2, 0x1402568f2\npush    rdi                                                            ; +0x3, 0x1402568f3\nsub     rsp, 20h                                                       ; +0x4, 0x1402568f4\nmov     esi, [rcx+2B4h]                                                ; +0x8, 0x1402568f8\nmov     rdi, rcx                                                       ; +0xe, 0x1402568fe\nimul    esi, [rcx+2B0h]                                                ; +0x11, 0x140256901\nxor     ebx, ebx                                                       ; +0x18, 0x140256908\nmov     rcx, [rcx+2A8h]                                                ; +0x1a, 0x14025690a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x21, 0x140256911\ntest    eax, eax                                                       ; +0x27, 0x140256917\njz      loc_140256A05                                                  ; +0x29, 0x140256919\nmov     [rsp+38h+arg_0], rbp                                           ; +0x2f, 0x14025691f\nmov     [rsp+38h+arg_8], r14                                           ; +0x34, 0x140256924\nmov     [rsp+38h+arg_10], r15                                          ; +0x39, 0x140256929\nlea     r15d, [rsi+1]                                                  ; +0x3e, 0x14025692e\nnop     dword ptr [rax+00h]                                            ; +0x42, 0x140256932\nnop     word ptr [rax+rax+00000000h]                                   ; +0x46, 0x140256936\nmov     rcx, [rdi+2A8h]                                                ; +0x50, 0x140256940\nmov     edx, ebx                                                       ; +0x57, 0x140256947\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x59, 0x140256949\nmov     rcx, [rdi+2A0h]                                                ; +0x5f, 0x14025694f\nmov     edx, ebx                                                       ; +0x66, 0x140256956\nmov     rsi, rax                                                       ; +0x68, 0x140256958\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x6b, 0x14025695b\nmov     rdx, [rsi]                                                     ; +0x71, 0x140256961\nmov     rcx, rsi                                                       ; +0x74, 0x140256964\nmov     r14, rax                                                       ; +0x77, 0x140256967\ncall    qword ptr [rdx+1E8h]                                           ; +0x7a, 0x14025696a\nlea     ebp, [r15+rbx]                                                 ; +0x80, 0x140256970\nmov     rcx, rax                                                       ; +0x84, 0x140256974\nmov     r8, [rax]                                                      ; +0x87, 0x140256977\ncmp     ebp, 3E7h                                                      ; +0x8a, 0x14025697a\njg      short loc_1402569BA                                            ; +0x90, 0x140256980\nmov     dl, 1                                                          ; +0x92, 0x140256982\ncall    qword ptr [r8+398h]                                            ; +0x94, 0x140256984\nmov     rax, [rsi]                                                     ; +0x9b, 0x14025698b\nmov     dl, 1                                                          ; +0x9e, 0x14025698e\nmov     rcx, rsi                                                       ; +0xa0, 0x140256990\ncall    qword ptr [rax+140h]                                           ; +0xa3, 0x140256993\nmov     rax, [r14]                                                     ; +0xa9, 0x140256999\nmov     dl, 1                                                          ; +0xac, 0x14025699c\nmov     rcx, r14                                                       ; +0xae, 0x14025699e\ncall    qword ptr [rax+140h]                                           ; +0xb1, 0x1402569a1\nmov     r9d, ebp                                                       ; +0xb7, 0x1402569a7\nmov     r8, r14                                                        ; +0xba, 0x1402569aa\nmov     rdx, rsi                                                       ; +0xbd, 0x1402569ad\nmov     rcx, rdi                                                       ; +0xc0, 0x1402569b0\ncall    GJColorSetupLayer__updateSpriteColor                           ; +0xc3, 0x1402569b3\njmp     short loc_1402569DF                                            ; +0xc8, 0x1402569b8\nxor     edx, edx                                                       ; +0xca, 0x1402569ba\ncall    qword ptr [r8+398h]                                            ; +0xcc, 0x1402569bc\nmov     rax, [rsi]                                                     ; +0xd3, 0x1402569c3\nxor     edx, edx                                                       ; +0xd6, 0x1402569c6\nmov     rcx, rsi                                                       ; +0xd8, 0x1402569c8\ncall    qword ptr [rax+140h]                                           ; +0xdb, 0x1402569cb\nmov     rax, [r14]                                                     ; +0xe1, 0x1402569d1\nxor     edx, edx                                                       ; +0xe4, 0x1402569d4\nmov     rcx, r14                                                       ; +0xe6, 0x1402569d6\ncall    qword ptr [rax+140h]                                           ; +0xe9, 0x1402569d9\nmov     rcx, [rdi+2A8h]                                                ; +0xef, 0x1402569df\ninc     ebx                                                            ; +0xf6, 0x1402569e6\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xf8, 0x1402569e8\ncmp     ebx, eax                                                       ; +0xfe, 0x1402569ee\njb      loc_140256940                                                  ; +0x100, 0x1402569f0\nmov     r15, [rsp+38h+arg_10]                                          ; +0x106, 0x1402569f6\nmov     r14, [rsp+38h+arg_8]                                           ; +0x10b, 0x1402569fb\nmov     rbp, [rsp+38h+arg_0]                                           ; +0x110, 0x140256a00\nadd     rsp, 20h                                                       ; +0x115, 0x140256a05\npop     rdi                                                            ; +0x119, 0x140256a09\npop     rsi                                                            ; +0x11a, 0x140256a0a\npop     rbx                                                            ; +0x11b, 0x140256a0b\nretn                                                                   ; +0x11c, 0x140256a0c", "xrefs": ["GJColorSetupLayer::init @ 0x140256508", "GJColorSetupLayer::init @ 0x1402568a6", "GJColorSetupLayer::colorSelectClosed @ 0x140256ca7", "GJColorSetupLayer::showPage @ 0x140256d0c", "<???> @ 0x1406843d0", "<???> @ 0x1406843e0", "<???> @ 0x1406cf960"], "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"}