{"type": "func", "start": 4297112880, "end": 4297113266, "name": "GJColorSetupLayer::updateSpriteColors", "pseudocode": "// \n// GJColorSetupLayer::updateSpriteColors from 0x10020bd30 to 0x10020beb2 (386 bytes)\n// \n// 6 xrefs:\n// > GJColorSetupLayer::init @ 0x10020b967\n// > GJColorSetupLayer::init @ 0x10020bc4a\n// > GJColorSetupLayer::onPage @ 0x10020bf53\n// > GJColorSetupLayer::showPage @ 0x10020c00c\n// > GJColorSetupLayer::colorSelectClosed @ 0x10020c0c5\n// > sub_10020C0D0 @ 0x10020c0dc\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 v1; // r14d\n  unsigned int v2; // r15d\n  ColorChannelSprite *v3; // r12\n  __int64 v4; // r13\n  __int64 v5; // rax\n  int v6; // r14d\n  cocos2d::CCString *v7; // rax\n  const char *CString; // rax\n  ColorAction *ColorAction; // rsi\n  int v10; // [rsp+0h] [rbp-30h]\n\n  v1 = a1->m_page * a1->m_colorsPerPage;\n  if ( (unsigned int)sub_100720070(a1->m_colorSprites) )\n  {\n    v2 = 0;\n    LOBYTE(v10) = v1;\n    do\n    {\n      v3 = (ColorChannelSprite *)sub_1007200C0(a1->m_colorSprites, v2);\n      v4 = sub_1007200C0(a1->m_colorLabels, v2);\n      v5 = ((__int64 (__fastcall *)(ColorChannelSprite *))v3->getParent)(v3);\n      if ( (int)(v1 + v2) > 998 )\n      {\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 1040LL))(v5, 0);\n        ((void (__fastcall *)(ColorChannelSprite *, _QWORD))v3->setVisible)(v3, 0);\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 328LL))(v4, 0);\n      }\n      else\n      {\n        v6 = v2 + v1 + 1;\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 1040LL))(v5, 1);\n        ((void (__fastcall *)(ColorChannelSprite *, __int64))v3->setVisible)(v3, 1);\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 328LL))(v4, 1);\n        v7 = (cocos2d::CCString *)sub_1007AB580(\"Col %i\", v10);\n        CString = cocos2d::CCString::getCString(v7);\n        (*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v4 + 912LL))(v4, CString);\n        if ( GJEffectManager::colorExists(a1->m_settingsObject->m_effectManager, v6) )\n          ColorAction = GJEffectManager::getColorAction(a1->m_settingsObject->m_effectManager, v6);\n        else\n          ColorAction = nullptr;\n        ColorChannelSprite::updateValues(v3, ColorAction);\n        v1 = v10;\n      }\n      ++v2;\n    }\n    while ( v2 < (unsigned int)sub_100720070(a1->m_colorSprites) );\n  }\n}", "assembly": "; \n; GJColorSetupLayer::updateSpriteColors from 0x10020bd30 to 0x10020beb2 (386 bytes)\n; \n; 6 xrefs:\n; > GJColorSetupLayer::init @ 0x10020b967\n; > GJColorSetupLayer::init @ 0x10020bc4a\n; > GJColorSetupLayer::onPage @ 0x10020bf53\n; > GJColorSetupLayer::showPage @ 0x10020c00c\n; > GJColorSetupLayer::colorSelectClosed @ 0x10020c0c5\n; > sub_10020C0D0 @ 0x10020c0dc\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, 0x10020bd30\nmov     rbp, rsp                                                       ; +0x1, 0x10020bd31\npush    r15                                                            ; +0x4, 0x10020bd34\npush    r14                                                            ; +0x6, 0x10020bd36\npush    r13                                                            ; +0x8, 0x10020bd38\npush    r12                                                            ; +0xa, 0x10020bd3a\npush    rbx                                                            ; +0xc, 0x10020bd3c\npush    rax; char                                                      ; +0xd, 0x10020bd3d\nmov     rbx, rdi                                                       ; +0xe, 0x10020bd3e\nmov     r14d, [rdi+2B4h]                                               ; +0x11, 0x10020bd41\nimul    r14d, [rdi+2B0h]                                               ; +0x18, 0x10020bd48\nmov     rdi, [rdi+2A8h]                                                ; +0x20, 0x10020bd50\ncall    sub_100720070                                                  ; +0x27, 0x10020bd57\ntest    eax, eax                                                       ; +0x2c, 0x10020bd5c\njz      loc_10020BEA3                                                  ; +0x2e, 0x10020bd5e\nxor     r15d, r15d                                                     ; +0x34, 0x10020bd64\nmov     qword ptr [rbp+var_30], r14                                    ; +0x37, 0x10020bd67\njmp     short loc_10020BDB4                                            ; +0x3b, 0x10020bd6b\nalign 10h                                                              ; +0x3d, 0x10020bd6d\nmov     rcx, [rax]                                                     ; +0x40, 0x10020bd70\nmov     rdi, rax                                                       ; +0x43, 0x10020bd73\nxor     esi, esi                                                       ; +0x46, 0x10020bd76\ncall    qword ptr [rcx+410h]                                           ; +0x48, 0x10020bd78\nmov     rax, [r12]                                                     ; +0x4e, 0x10020bd7e\nmov     rdi, r12                                                       ; +0x52, 0x10020bd82\nxor     esi, esi                                                       ; +0x55, 0x10020bd85\ncall    qword ptr [rax+148h]                                           ; +0x57, 0x10020bd87\nmov     rax, [r13+0]                                                   ; +0x5d, 0x10020bd8d\nmov     rdi, r13                                                       ; +0x61, 0x10020bd91\nxor     esi, esi                                                       ; +0x64, 0x10020bd94\ncall    qword ptr [rax+148h]                                           ; +0x66, 0x10020bd96\ninc     r15d                                                           ; +0x6c, 0x10020bd9c\nmov     rdi, [rbx+2A8h]                                                ; +0x6f, 0x10020bd9f\ncall    sub_100720070                                                  ; +0x76, 0x10020bda6\ncmp     r15d, eax                                                      ; +0x7b, 0x10020bdab\njnb     loc_10020BEA3                                                  ; +0x7e, 0x10020bdae\nmov     rdi, [rbx+2A8h]                                                ; +0x84, 0x10020bdb4\nmov     esi, r15d                                                      ; +0x8b, 0x10020bdbb\ncall    sub_1007200C0                                                  ; +0x8e, 0x10020bdbe\nmov     r12, rax                                                       ; +0x93, 0x10020bdc3\nmov     rdi, [rbx+2A0h]                                                ; +0x96, 0x10020bdc6\nmov     esi, r15d                                                      ; +0x9d, 0x10020bdcd\ncall    sub_1007200C0                                                  ; +0xa0, 0x10020bdd0\nmov     r13, rax                                                       ; +0xa5, 0x10020bdd5\nmov     rax, [r12]                                                     ; +0xa8, 0x10020bdd8\nmov     rdi, r12                                                       ; +0xac, 0x10020bddc\ncall    qword ptr [rax+1F0h]                                           ; +0xaf, 0x10020bddf\nlea     ecx, [r14+r15]                                                 ; +0xb5, 0x10020bde5\ncmp     ecx, 3E6h                                                      ; +0xb9, 0x10020bde9\njg      loc_10020BD70                                                  ; +0xbf, 0x10020bdef\nadd     r14d, r15d                                                     ; +0xc5, 0x10020bdf5\ninc     r14d                                                           ; +0xc8, 0x10020bdf8\nmov     rcx, [rax]                                                     ; +0xcb, 0x10020bdfb\nmov     rdi, rax                                                       ; +0xce, 0x10020bdfe\nmov     esi, 1                                                         ; +0xd1, 0x10020be01\ncall    qword ptr [rcx+410h]                                           ; +0xd6, 0x10020be06\nmov     rax, [r12]                                                     ; +0xdc, 0x10020be0c\nmov     rdi, r12                                                       ; +0xe0, 0x10020be10\nmov     esi, 1                                                         ; +0xe3, 0x10020be13\ncall    qword ptr [rax+148h]                                           ; +0xe8, 0x10020be18\nmov     rax, [r13+0]                                                   ; +0xee, 0x10020be1e\nmov     rdi, r13                                                       ; +0xf2, 0x10020be22\nmov     esi, 1                                                         ; +0xf5, 0x10020be25\ncall    qword ptr [rax+148h]                                           ; +0xfa, 0x10020be2a\nlea     rdi, aColI; \"Col %i\"                                           ; +0x100, 0x10020be30\nmov     esi, r14d                                                      ; +0x107, 0x10020be37\nxor     eax, eax                                                       ; +0x10a, 0x10020be3a\ncall    sub_1007AB580                                                  ; +0x10c, 0x10020be3c\nmov     rdi, rax                                                       ; +0x111, 0x10020be41\ncall    cocos2d__CCString__getCString                                  ; +0x114, 0x10020be44\nmov     rcx, [r13+0]                                                   ; +0x119, 0x10020be49\nmov     rdi, r13                                                       ; +0x11d, 0x10020be4d\nmov     rsi, rax                                                       ; +0x120, 0x10020be50\ncall    qword ptr [rcx+390h]                                           ; +0x123, 0x10020be53\nmov     rax, [rbx+288h]                                                ; +0x129, 0x10020be59\nmov     rdi, [rax+140h]                                                ; +0x130, 0x10020be60\nmov     esi, r14d                                                      ; +0x137, 0x10020be67\ncall    GJEffectManager__colorExists                                   ; +0x13a, 0x10020be6a\ntest    al, al                                                         ; +0x13f, 0x10020be6f\njz      short loc_10020BE90                                            ; +0x141, 0x10020be71\nmov     rax, [rbx+288h]                                                ; +0x143, 0x10020be73\nmov     rdi, [rax+140h]                                                ; +0x14a, 0x10020be7a\nmov     esi, r14d                                                      ; +0x151, 0x10020be81\ncall    GJEffectManager__getColorAction                                ; +0x154, 0x10020be84\nmov     rsi, rax                                                       ; +0x159, 0x10020be89\njmp     short loc_10020BE92                                            ; +0x15c, 0x10020be8c\nalign 10h                                                              ; +0x15e, 0x10020be8e\nxor     esi, esi                                                       ; +0x160, 0x10020be90\nmov     rdi, r12                                                       ; +0x162, 0x10020be92\ncall    ColorChannelSprite__updateValues                               ; +0x165, 0x10020be95\nmov     r14, qword ptr [rbp+var_30]                                    ; +0x16a, 0x10020be9a\njmp     loc_10020BD9C                                                  ; +0x16e, 0x10020be9e\nadd     rsp, 8                                                         ; +0x173, 0x10020bea3\npop     rbx                                                            ; +0x177, 0x10020bea7\npop     r12                                                            ; +0x178, 0x10020bea8\npop     r13                                                            ; +0x17a, 0x10020beaa\npop     r14                                                            ; +0x17c, 0x10020beac\npop     r15                                                            ; +0x17e, 0x10020beae\npop     rbp                                                            ; +0x180, 0x10020beb0\nretn                                                                   ; +0x181, 0x10020beb1", "xrefs": ["GJColorSetupLayer::init @ 0x10020b967", "GJColorSetupLayer::init @ 0x10020bc4a", "GJColorSetupLayer::onPage @ 0x10020bf53", "GJColorSetupLayer::showPage @ 0x10020c00c", "GJColorSetupLayer::colorSelectClosed @ 0x10020c0c5", "sub_10020C0D0 @ 0x10020c0dc"], "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"}