{"type": "func", "start": 5372245248, "end": 5372245610, "name": "GJColorSetupLayer::updateSpriteColor", "pseudocode": "// \n// GJColorSetupLayer::updateSpriteColor from 0x14035f500 to 0x14035f66a (362 bytes)\n// \n// 2 xrefs:\n// > GJColorSetupLayer::updateSpriteColors @ 0x14035f4a9\n// > <???> @ 0x14092129c\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 11:30:52 +0000\n// \n\n__int64 __fastcall GJColorSetupLayer::updateSpriteColor(__int64 a1, __int64 a2, __int64 a3, int a4)\n{\n  __int64 v5; // rdi\n  void (__fastcall **v6)(__int64, const char *); // rbx\n  cocos2d::CCString *v9; // rax\n  const char *CString; // rax\n  int v11; // r8d\n  __int64 v12; // rcx\n  __int64 ColorAction; // rax\n  __int64 v14; // rbx\n  bool v15; // zf\n  __int64 result; // rax\n  __int64 v17; // rcx\n  __int16 v18; // [rsp+58h] [rbp+20h] BYREF\n  char v19; // [rsp+5Ah] [rbp+22h]\n\n  v5 = a3 + 360;\n  v6 = *(void (__fastcall ***)(__int64, const char *))(a3 + 360);\n  v9 = cocos2d::CCString::createWithFormat(\"Col %i\", a4);\n  CString = cocos2d::CCString::getCString(v9);\n  (*v6)(v5, CString);\n  v11 = a4;\n  if ( a4 < 0 )\n    v11 = 0;\n  if ( v11 > 1101 )\n    v11 = 1101;\n  v12 = *(_QWORD *)(*(_QWORD *)(a1 + 680) + 320LL);\n  if ( *(_QWORD *)(*(_QWORD *)(v12 + 736) + 8LL * v11)\n    && (ColorAction = GJEffectManager::getColorAction(v12, (unsigned int)a4), (v14 = ColorAction) != 0) )\n  {\n    ColorChannelSprite::updateCopyLabel(\n      a2,\n      *(unsigned int *)(ColorAction + 120),\n      *(unsigned __int8 *)(ColorAction + 126));\n    ColorChannelSprite::updateOpacity(a2);\n    ColorChannelSprite::updateBlending(a2, *(unsigned __int8 *)(v14 + 84));\n    v15 = *(_DWORD *)(v14 + 120) == 0;\n    v18 = *(_WORD *)(v14 + 72);\n    v19 = *(_BYTE *)(v14 + 74);\n    if ( !v15 && !*(_BYTE *)(v14 + 126) )\n    {\n      v18 = -22874;\n      v19 = -90;\n    }\n    return (**(__int64 (__fastcall ***)(__int64, __int16 *))(a2 + 320))(a2 + 320, &v18);\n  }\n  else\n  {\n    (**(void (__fastcall ***)(__int64, __int16 *))(a2 + 320))(a2 + 320, &word_140703460);\n    v17 = *(_QWORD *)(a2 + 600);\n    if ( v17 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v17 + 336LL))(v17, 0);\n    result = ColorChannelSprite::updateOpacity(a2);\n    if ( *(_QWORD *)(a2 + 616) )\n      return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a2 + 616) + 336LL))(*(_QWORD *)(a2 + 616), 0);\n  }\n  return result;\n}", "assembly": "; \n; GJColorSetupLayer::updateSpriteColor from 0x14035f500 to 0x14035f66a (362 bytes)\n; \n; 2 xrefs:\n; > GJColorSetupLayer::updateSpriteColors @ 0x14035f4a9\n; > <???> @ 0x14092129c\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 11:30:52 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14035f500\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x14035f505\npush    rsi                                                            ; +0xa, 0x14035f50a\npush    rdi                                                            ; +0xb, 0x14035f50b\npush    r14                                                            ; +0xc, 0x14035f50c\nsub     rsp, 20h                                                       ; +0xe, 0x14035f50e\nmov     rbp, rdx                                                       ; +0x12, 0x14035f512\nlea     rdi, [r8+168h]                                                 ; +0x15, 0x14035f515\nmov     rbx, [rdi]                                                     ; +0x1c, 0x14035f51c\nmov     rsi, rcx                                                       ; +0x1f, 0x14035f51f\nmov     edx, r9d                                                       ; +0x22, 0x14035f522\nlea     rcx, aColI; \"Col %i\"                                           ; +0x25, 0x14035f525\nmov     r14d, r9d                                                      ; +0x2c, 0x14035f52c\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x2f, 0x14035f52f\nmov     rcx, rax                                                       ; +0x35, 0x14035f535\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x38, 0x14035f538\nmov     rdx, rax                                                       ; +0x3e, 0x14035f53e\nmov     rcx, rdi                                                       ; +0x41, 0x14035f541\ncall    qword ptr [rbx]                                                ; +0x44, 0x14035f544\nxor     eax, eax                                                       ; +0x46, 0x14035f546\nmov     r8d, r14d                                                      ; +0x48, 0x14035f548\ntest    r14d, r14d                                                     ; +0x4b, 0x14035f54b\ncmovs   r8d, eax                                                       ; +0x4e, 0x14035f54e\nmov     eax, 44Dh                                                      ; +0x52, 0x14035f552\ncmp     r8d, eax                                                       ; +0x57, 0x14035f557\ncmovg   r8d, eax                                                       ; +0x5a, 0x14035f55a\nmov     rax, [rsi+2A8h]                                                ; +0x5e, 0x14035f55e\nmovsxd  rdx, r8d                                                       ; +0x65, 0x14035f565\nmov     rcx, [rax+140h]                                                ; +0x68, 0x14035f568\nmov     rax, [rcx+2E0h]                                                ; +0x6f, 0x14035f56f\ncmp     qword ptr [rax+rdx*8], 0                                       ; +0x76, 0x14035f576\njz      loc_14035F601                                                  ; +0x7b, 0x14035f57b\nmov     edx, r14d                                                      ; +0x81, 0x14035f581\ncall    GJEffectManager__getColorAction                                ; +0x84, 0x14035f584\nmov     rbx, rax                                                       ; +0x89, 0x14035f589\ntest    rax, rax                                                       ; +0x8c, 0x14035f58c\njz      short loc_14035F601                                            ; +0x8f, 0x14035f58f\nmovzx   r8d, byte ptr [rax+7Eh]                                        ; +0x91, 0x14035f591\nmov     rcx, rbp                                                       ; +0x96, 0x14035f596\nmov     edx, [rax+78h]                                                 ; +0x99, 0x14035f599\ncall    ColorChannelSprite__updateCopyLabel                            ; +0x9c, 0x14035f59c\nmovss   xmm1, dword ptr [rbx+60h]                                      ; +0xa1, 0x14035f5a1\nmov     rcx, rbp                                                       ; +0xa6, 0x14035f5a6\ncall    ColorChannelSprite__updateOpacity                              ; +0xa9, 0x14035f5a9\nmovzx   edx, byte ptr [rbx+54h]                                        ; +0xae, 0x14035f5ae\nmov     rcx, rbp                                                       ; +0xb2, 0x14035f5b2\ncall    ColorChannelSprite__updateBlending                             ; +0xb5, 0x14035f5b5\ncmp     dword ptr [rbx+78h], 0                                         ; +0xba, 0x14035f5ba\nmovzx   eax, word ptr [rbx+48h]                                        ; +0xbe, 0x14035f5be\nmov     [rsp+38h+arg_18], ax                                           ; +0xc2, 0x14035f5c2\nmovzx   eax, byte ptr [rbx+4Ah]                                        ; +0xc7, 0x14035f5c7\nmov     [rsp+38h+arg_1A], al                                           ; +0xcb, 0x14035f5cb\njz      short loc_14035F5EE                                            ; +0xcf, 0x14035f5cf\ncmp     byte ptr [rbx+7Eh], 0                                          ; +0xd1, 0x14035f5d1\njnz     short loc_14035F5EE                                            ; +0xd5, 0x14035f5d5\nmovzx   eax, cs:word_14070345C                                         ; +0xd7, 0x14035f5d7\nmov     [rsp+38h+arg_18], ax                                           ; +0xde, 0x14035f5de\nmovzx   eax, cs:byte_14070345E                                         ; +0xe3, 0x14035f5e3\nmov     [rsp+38h+arg_1A], al                                           ; +0xea, 0x14035f5ea\nlea     rcx, [rbp+140h]                                                ; +0xee, 0x14035f5ee\nmov     rax, [rcx]                                                     ; +0xf5, 0x14035f5f5\nlea     rdx, [rsp+38h+arg_18]                                          ; +0xf8, 0x14035f5f8\ncall    qword ptr [rax]                                                ; +0xfd, 0x14035f5fd\njmp     short loc_14035F657                                            ; +0xff, 0x14035f5ff\nlea     rcx, [rbp+140h]                                                ; +0x101, 0x14035f601\nmov     rax, [rcx]                                                     ; +0x108, 0x14035f608\nlea     rdx, word_140703460                                            ; +0x10b, 0x14035f60b\ncall    qword ptr [rax]                                                ; +0x112, 0x14035f612\nmov     rcx, [rbp+258h]                                                ; +0x114, 0x14035f614\ntest    rcx, rcx                                                       ; +0x11b, 0x14035f61b\njz      short loc_14035F62B                                            ; +0x11e, 0x14035f61e\nmov     rax, [rcx]                                                     ; +0x120, 0x14035f620\nxor     edx, edx                                                       ; +0x123, 0x14035f623\ncall    qword ptr [rax+150h]                                           ; +0x125, 0x14035f625\nmovss   xmm1, cs:flt_140835080                                         ; +0x12b, 0x14035f62b\nmov     rcx, rbp                                                       ; +0x133, 0x14035f633\ncall    ColorChannelSprite__updateOpacity                              ; +0x136, 0x14035f636\ncmp     qword ptr [rbp+268h], 0                                        ; +0x13b, 0x14035f63b\njz      short loc_14035F657                                            ; +0x143, 0x14035f643\nmov     rcx, [rbp+268h]                                                ; +0x145, 0x14035f645\nxor     edx, edx                                                       ; +0x14c, 0x14035f64c\nmov     rax, [rcx]                                                     ; +0x14e, 0x14035f64e\ncall    qword ptr [rax+150h]                                           ; +0x151, 0x14035f651\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x157, 0x14035f657\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x15c, 0x14035f65c\nadd     rsp, 20h                                                       ; +0x161, 0x14035f661\npop     r14                                                            ; +0x165, 0x14035f665\npop     rdi                                                            ; +0x167, 0x14035f667\npop     rsi                                                            ; +0x168, 0x14035f668\nretn                                                                   ; +0x169, 0x14035f669", "xrefs": ["GJColorSetupLayer::updateSpriteColors @ 0x14035f4a9", "<???> @ 0x14092129c"], "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"}