{"type": "func", "start": 4296994944, "end": 4296995330, "name": "GJColorSetupLayer::updateSpriteColors", "pseudocode": "// \n// GJColorSetupLayer::updateSpriteColors from 0x1001ef080 to 0x1001ef202 (386 bytes)\n// \n// 6 xrefs:\n// > GJColorSetupLayer::init @ 0x1001eecb7\n// > GJColorSetupLayer::init @ 0x1001eef9a\n// > GJColorSetupLayer::onPage @ 0x1001ef2a3\n// > GJColorSetupLayer::showPage @ 0x1001ef35c\n// > GJColorSetupLayer::colorSelectClosed @ 0x1001ef415\n// > sub_1001EF420 @ 0x1001ef42c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:26:32 +0000\n// \n\n__int64 __fastcall GJColorSetupLayer::updateSpriteColors(__int64 a1, double a2)\n{\n  int v2; // r14d\n  __int64 result; // rax\n  unsigned int v4; // r15d\n  __int64 v5; // r12\n  __int64 v6; // r13\n  __int64 v7; // rax\n  unsigned int v8; // r14d\n  __int64 v9; // rax\n  __int64 CString; // rax\n  __int64 ColorAction; // rsi\n  int v12; // [rsp+0h] [rbp-30h]\n\n  v2 = *(_DWORD *)(a1 + 720) * *(_DWORD *)(a1 + 724);\n  result = sub_1007FEF90(*(_QWORD *)(a1 + 712));\n  if ( (_DWORD)result )\n  {\n    v4 = 0;\n    LOBYTE(v12) = v2;\n    do\n    {\n      v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 712), v4);\n      v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 704), v4);\n      v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 512LL))(v5);\n      if ( (int)(v2 + v4) > 998 )\n      {\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1056LL))(v7, 0);\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 344LL))(v5, 0);\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, 0);\n      }\n      else\n      {\n        v8 = v4 + v2 + 1;\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1056LL))(v7, 1);\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 344LL))(v5, 1);\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 344LL))(v6, 1);\n        v9 = sub_10088E820(\"Col %i\", v12);\n        CString = cocos2d::CCString::getCString(v9);\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 928LL))(v6, CString);\n        if ( (unsigned __int8)GJEffectManager::colorExists(*(_QWORD *)(*(_QWORD *)(a1 + 680) + 320LL), v8) )\n          ColorAction = GJEffectManager::getColorAction(*(_QWORD *)(*(_QWORD *)(a1 + 680) + 320LL), v8);\n        else\n          ColorAction = 0;\n        ColorChannelSprite::updateValues(v5, ColorAction, a2);\n        v2 = v12;\n      }\n      ++v4;\n      result = sub_1007FEF90(*(_QWORD *)(a1 + 712));\n    }\n    while ( v4 < (unsigned int)result );\n  }\n  return result;\n}", "assembly": "; \n; GJColorSetupLayer::updateSpriteColors from 0x1001ef080 to 0x1001ef202 (386 bytes)\n; \n; 6 xrefs:\n; > GJColorSetupLayer::init @ 0x1001eecb7\n; > GJColorSetupLayer::init @ 0x1001eef9a\n; > GJColorSetupLayer::onPage @ 0x1001ef2a3\n; > GJColorSetupLayer::showPage @ 0x1001ef35c\n; > GJColorSetupLayer::colorSelectClosed @ 0x1001ef415\n; > sub_1001EF420 @ 0x1001ef42c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:26:32 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001ef080\nmov     rbp, rsp                                                       ; +0x1, 0x1001ef081\npush    r15                                                            ; +0x4, 0x1001ef084\npush    r14                                                            ; +0x6, 0x1001ef086\npush    r13                                                            ; +0x8, 0x1001ef088\npush    r12                                                            ; +0xa, 0x1001ef08a\npush    rbx                                                            ; +0xc, 0x1001ef08c\npush    rax; char                                                      ; +0xd, 0x1001ef08d\nmov     rbx, rdi                                                       ; +0xe, 0x1001ef08e\nmov     r14d, [rdi+2D4h]                                               ; +0x11, 0x1001ef091\nimul    r14d, [rdi+2D0h]                                               ; +0x18, 0x1001ef098\nmov     rdi, [rdi+2C8h]                                                ; +0x20, 0x1001ef0a0\ncall    sub_1007FEF90                                                  ; +0x27, 0x1001ef0a7\ntest    eax, eax                                                       ; +0x2c, 0x1001ef0ac\njz      loc_1001EF1F3                                                  ; +0x2e, 0x1001ef0ae\nxor     r15d, r15d                                                     ; +0x34, 0x1001ef0b4\nmov     qword ptr [rbp+var_30], r14                                    ; +0x37, 0x1001ef0b7\njmp     short loc_1001EF104                                            ; +0x3b, 0x1001ef0bb\nalign 20h                                                              ; +0x3d, 0x1001ef0bd\nmov     rcx, [rax]                                                     ; +0x40, 0x1001ef0c0\nmov     rdi, rax                                                       ; +0x43, 0x1001ef0c3\nxor     esi, esi                                                       ; +0x46, 0x1001ef0c6\ncall    qword ptr [rcx+420h]                                           ; +0x48, 0x1001ef0c8\nmov     rax, [r12]                                                     ; +0x4e, 0x1001ef0ce\nmov     rdi, r12                                                       ; +0x52, 0x1001ef0d2\nxor     esi, esi                                                       ; +0x55, 0x1001ef0d5\ncall    qword ptr [rax+158h]                                           ; +0x57, 0x1001ef0d7\nmov     rax, [r13+0]                                                   ; +0x5d, 0x1001ef0dd\nmov     rdi, r13                                                       ; +0x61, 0x1001ef0e1\nxor     esi, esi                                                       ; +0x64, 0x1001ef0e4\ncall    qword ptr [rax+158h]                                           ; +0x66, 0x1001ef0e6\ninc     r15d                                                           ; +0x6c, 0x1001ef0ec\nmov     rdi, [rbx+2C8h]                                                ; +0x6f, 0x1001ef0ef\ncall    sub_1007FEF90                                                  ; +0x76, 0x1001ef0f6\ncmp     r15d, eax                                                      ; +0x7b, 0x1001ef0fb\njnb     loc_1001EF1F3                                                  ; +0x7e, 0x1001ef0fe\nmov     rdi, [rbx+2C8h]                                                ; +0x84, 0x1001ef104\nmov     esi, r15d                                                      ; +0x8b, 0x1001ef10b\ncall    sub_1007FEFE0                                                  ; +0x8e, 0x1001ef10e\nmov     r12, rax                                                       ; +0x93, 0x1001ef113\nmov     rdi, [rbx+2C0h]                                                ; +0x96, 0x1001ef116\nmov     esi, r15d                                                      ; +0x9d, 0x1001ef11d\ncall    sub_1007FEFE0                                                  ; +0xa0, 0x1001ef120\nmov     r13, rax                                                       ; +0xa5, 0x1001ef125\nmov     rax, [r12]                                                     ; +0xa8, 0x1001ef128\nmov     rdi, r12                                                       ; +0xac, 0x1001ef12c\ncall    qword ptr [rax+200h]                                           ; +0xaf, 0x1001ef12f\nlea     ecx, [r14+r15]                                                 ; +0xb5, 0x1001ef135\ncmp     ecx, 3E6h                                                      ; +0xb9, 0x1001ef139\njg      loc_1001EF0C0                                                  ; +0xbf, 0x1001ef13f\nadd     r14d, r15d                                                     ; +0xc5, 0x1001ef145\ninc     r14d                                                           ; +0xc8, 0x1001ef148\nmov     rcx, [rax]                                                     ; +0xcb, 0x1001ef14b\nmov     rdi, rax                                                       ; +0xce, 0x1001ef14e\nmov     esi, 1                                                         ; +0xd1, 0x1001ef151\ncall    qword ptr [rcx+420h]                                           ; +0xd6, 0x1001ef156\nmov     rax, [r12]                                                     ; +0xdc, 0x1001ef15c\nmov     rdi, r12                                                       ; +0xe0, 0x1001ef160\nmov     esi, 1                                                         ; +0xe3, 0x1001ef163\ncall    qword ptr [rax+158h]                                           ; +0xe8, 0x1001ef168\nmov     rax, [r13+0]                                                   ; +0xee, 0x1001ef16e\nmov     rdi, r13                                                       ; +0xf2, 0x1001ef172\nmov     esi, 1                                                         ; +0xf5, 0x1001ef175\ncall    qword ptr [rax+158h]                                           ; +0xfa, 0x1001ef17a\nlea     rdi, aColI; \"Col %i\"                                           ; +0x100, 0x1001ef180\nmov     esi, r14d                                                      ; +0x107, 0x1001ef187\nxor     eax, eax                                                       ; +0x10a, 0x1001ef18a\ncall    sub_10088E820                                                  ; +0x10c, 0x1001ef18c\nmov     rdi, rax                                                       ; +0x111, 0x1001ef191\ncall    cocos2d__CCString__getCString                                  ; +0x114, 0x1001ef194\nmov     rcx, [r13+0]                                                   ; +0x119, 0x1001ef199\nmov     rdi, r13                                                       ; +0x11d, 0x1001ef19d\nmov     rsi, rax                                                       ; +0x120, 0x1001ef1a0\ncall    qword ptr [rcx+3A0h]                                           ; +0x123, 0x1001ef1a3\nmov     rax, [rbx+2A8h]                                                ; +0x129, 0x1001ef1a9\nmov     rdi, [rax+140h]                                                ; +0x130, 0x1001ef1b0\nmov     esi, r14d                                                      ; +0x137, 0x1001ef1b7\ncall    GJEffectManager__colorExists                                   ; +0x13a, 0x1001ef1ba\ntest    al, al                                                         ; +0x13f, 0x1001ef1bf\njz      short loc_1001EF1E0                                            ; +0x141, 0x1001ef1c1\nmov     rax, [rbx+2A8h]                                                ; +0x143, 0x1001ef1c3\nmov     rdi, [rax+140h]                                                ; +0x14a, 0x1001ef1ca\nmov     esi, r14d                                                      ; +0x151, 0x1001ef1d1\ncall    GJEffectManager__getColorAction                                ; +0x154, 0x1001ef1d4\nmov     rsi, rax                                                       ; +0x159, 0x1001ef1d9\njmp     short loc_1001EF1E2                                            ; +0x15c, 0x1001ef1dc\nalign 20h                                                              ; +0x15e, 0x1001ef1de\nxor     esi, esi                                                       ; +0x160, 0x1001ef1e0\nmov     rdi, r12                                                       ; +0x162, 0x1001ef1e2\ncall    ColorChannelSprite__updateValues                               ; +0x165, 0x1001ef1e5\nmov     r14, qword ptr [rbp+var_30]                                    ; +0x16a, 0x1001ef1ea\njmp     loc_1001EF0EC                                                  ; +0x16e, 0x1001ef1ee\nadd     rsp, 8                                                         ; +0x173, 0x1001ef1f3\npop     rbx                                                            ; +0x177, 0x1001ef1f7\npop     r12                                                            ; +0x178, 0x1001ef1f8\npop     r13                                                            ; +0x17a, 0x1001ef1fa\npop     r14                                                            ; +0x17c, 0x1001ef1fc\npop     r15                                                            ; +0x17e, 0x1001ef1fe\npop     rbp                                                            ; +0x180, 0x1001ef200\nretn                                                                   ; +0x181, 0x1001ef201", "xrefs": ["GJColorSetupLayer::init @ 0x1001eecb7", "GJColorSetupLayer::init @ 0x1001eef9a", "GJColorSetupLayer::onPage @ 0x1001ef2a3", "GJColorSetupLayer::showPage @ 0x1001ef35c", "GJColorSetupLayer::colorSelectClosed @ 0x1001ef415", "sub_1001EF420 @ 0x1001ef42c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}