{"type": "func", "start": 5371992720, "end": 5371993071, "name": "LevelSettingsLayer::updateColorSprite", "pseudocode": "// \n// LevelSettingsLayer::updateColorSprite from 0x140321a90 to 0x140321bef (351 bytes)\n// \n// 7 xrefs:\n// > LevelSettingsLayer::updateColorSprites @ 0x140321a30\n// > LevelSettingsLayer::updateColorSprites @ 0x140321a3f\n// > LevelSettingsLayer::updateColorSprites @ 0x140321a4e\n// > LevelSettingsLayer::updateColorSprites @ 0x140321a5d\n// > LevelSettingsLayer::updateColorSprites @ 0x140321a6c\n// > LevelSettingsLayer::updateColorSprites @ 0x140321a80\n// > <???> @ 0x1406d4c88\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 LevelSettingsLayer::updateColorSprite(LevelSettingsLayer *a1, ColorChannelSprite *a2)\n{\n  int v4; // r8d\n  int v5; // r9d\n  GJEffectManager *m_effectManager; // rcx\n  ColorAction *ColorAction; // rax\n  ColorAction *v8; // rdi\n  bool v9; // zf\n  const cocos2d::ccColor3B *v10; // rdx\n  cocos2d::CCLabelBMFont *m_copyLabel; // rcx\n  __int16 v12; // [rsp+30h] [rbp+8h] BYREF\n  char b; // [rsp+32h] [rbp+Ah]\n\n  if ( a1->m_editorLayer )\n  {\n    v4 = a2->getTag(a2);\n    v5 = v4;\n    if ( v4 < 0 )\n      v4 = 0;\n    m_effectManager = a1->m_editorLayer->m_levelSettings->m_effectManager;\n    if ( v4 > 1101 )\n      v4 = 1101;\n    if ( !m_effectManager->m_colorActionVector._Mypair._Myval2._Myfirst[v4] )\n    {\n      v10 = (const cocos2d::ccColor3B *)&unk_140529B78;\nLABEL_17:\n      a2->setColor(&a2->cocos2d::CCRGBAProtocol, v10);\n      return;\n    }\n    ColorAction = GJEffectManager::getColorAction(m_effectManager, v5);\n    v8 = ColorAction;\n    if ( ColorAction )\n    {\n      ColorChannelSprite::updateCopyLabel(a2, ColorAction->m_copyID, ColorAction->m_copyColorLoop);\n      ColorChannelSprite::updateOpacity(a2, v8->m_fromOpacity);\n      ColorChannelSprite::updateBlending(a2, v8->m_blending);\n      v9 = v8->m_copyID == 0;\n      v12 = *(_WORD *)&v8->m_fromColor.r;\n      b = v8->m_fromColor.b;\n      if ( !v9 && !v8->m_copyColorLoop )\n      {\n        v12 = -22874;\n        b = -90;\n      }\n      v10 = (const cocos2d::ccColor3B *)&v12;\n      goto LABEL_17;\n    }\n    a2->setColor(&a2->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&word_140529AB0);\n    m_copyLabel = a2->m_copyLabel;\n    if ( m_copyLabel )\n      m_copyLabel->setVisible(m_copyLabel, 0);\n    ColorChannelSprite::updateOpacity(a2, 1.0);\n    if ( a2->m_blendingLabel )\n      a2->m_blendingLabel->setVisible(a2->m_blendingLabel, 0);\n  }\n}", "assembly": "; \n; LevelSettingsLayer::updateColorSprite from 0x140321a90 to 0x140321bef (351 bytes)\n; \n; 7 xrefs:\n; > LevelSettingsLayer::updateColorSprites @ 0x140321a30\n; > LevelSettingsLayer::updateColorSprites @ 0x140321a3f\n; > LevelSettingsLayer::updateColorSprites @ 0x140321a4e\n; > LevelSettingsLayer::updateColorSprites @ 0x140321a5d\n; > LevelSettingsLayer::updateColorSprites @ 0x140321a6c\n; > LevelSettingsLayer::updateColorSprites @ 0x140321a80\n; > <???> @ 0x1406d4c88\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140321a90\npush    rdi                                                            ; +0x5, 0x140321a95\nsub     rsp, 20h                                                       ; +0x6, 0x140321a96\ncmp     qword ptr [rcx+340h], 0                                        ; +0xa, 0x140321a9a\nmov     rbx, rdx                                                       ; +0x12, 0x140321aa2\nmov     rdi, rcx                                                       ; +0x15, 0x140321aa5\njz      loc_140321BE4                                                  ; +0x18, 0x140321aa8\nmov     rax, [rdx]                                                     ; +0x1e, 0x140321aae\nmov     rcx, rdx                                                       ; +0x21, 0x140321ab1\ncall    qword ptr [rax+38h]                                            ; +0x24, 0x140321ab4\nmov     rcx, [rdi+340h]                                                ; +0x27, 0x140321ab7\nmov     r8d, eax                                                       ; +0x2e, 0x140321abe\nmov     r9d, eax                                                       ; +0x31, 0x140321ac1\nxor     eax, eax                                                       ; +0x34, 0x140321ac4\ntest    r8d, r8d                                                       ; +0x36, 0x140321ac6\nmov     rdx, [rcx+0DB0h]                                               ; +0x39, 0x140321ac9\ncmovs   r8d, eax                                                       ; +0x40, 0x140321ad0\nmov     eax, 44Dh                                                      ; +0x44, 0x140321ad4\ncmp     r8d, eax                                                       ; +0x49, 0x140321ad9\nmov     rcx, [rdx+140h]                                                ; +0x4c, 0x140321adc\ncmovg   r8d, eax                                                       ; +0x53, 0x140321ae3\nmovsxd  rdx, r8d                                                       ; +0x57, 0x140321ae7\nmov     rax, [rcx+2E0h]                                                ; +0x5a, 0x140321aea\ncmp     qword ptr [rax+rdx*8], 0                                       ; +0x61, 0x140321af1\njz      loc_140321BD1                                                  ; +0x66, 0x140321af6\nmov     edx, r9d                                                       ; +0x6c, 0x140321afc\ncall    GJEffectManager__getColorAction                                ; +0x6f, 0x140321aff\nmov     rdi, rax                                                       ; +0x74, 0x140321b04\ntest    rax, rax                                                       ; +0x77, 0x140321b07\njz      short loc_140321B70                                            ; +0x7a, 0x140321b0a\nmovzx   r8d, byte ptr [rax+7Eh]                                        ; +0x7c, 0x140321b0c\nmov     rcx, rbx                                                       ; +0x81, 0x140321b11\nmov     edx, [rax+78h]                                                 ; +0x84, 0x140321b14\ncall    ColorChannelSprite__updateCopyLabel                            ; +0x87, 0x140321b17\nmovss   xmm1, dword ptr [rdi+60h]                                      ; +0x8c, 0x140321b1c\nmov     rcx, rbx                                                       ; +0x91, 0x140321b21\ncall    ColorChannelSprite__updateOpacity                              ; +0x94, 0x140321b24\nmovzx   edx, byte ptr [rdi+54h]                                        ; +0x99, 0x140321b29\nmov     rcx, rbx                                                       ; +0x9d, 0x140321b2d\ncall    ColorChannelSprite__updateBlending                             ; +0xa0, 0x140321b30\ncmp     dword ptr [rdi+78h], 0                                         ; +0xa5, 0x140321b35\nmovzx   eax, word ptr [rdi+48h]                                        ; +0xa9, 0x140321b39\nmov     [rsp+28h+arg_0], ax                                            ; +0xad, 0x140321b3d\nmovzx   eax, byte ptr [rdi+4Ah]                                        ; +0xb2, 0x140321b42\nmov     [rsp+28h+arg_2], al                                            ; +0xb6, 0x140321b46\njz      short loc_140321B69                                            ; +0xba, 0x140321b4a\ncmp     byte ptr [rdi+7Eh], 0                                          ; +0xbc, 0x140321b4c\njnz     short loc_140321B69                                            ; +0xc0, 0x140321b50\nmovzx   eax, cs:word_140529AA4                                         ; +0xc2, 0x140321b52\nmov     [rsp+28h+arg_0], ax                                            ; +0xc9, 0x140321b59\nmovzx   eax, cs:byte_140529AA6                                         ; +0xce, 0x140321b5e\nmov     [rsp+28h+arg_2], al                                            ; +0xd5, 0x140321b65\nlea     rdx, [rsp+28h+arg_0]                                           ; +0xd9, 0x140321b69\njmp     short loc_140321BD8                                            ; +0xde, 0x140321b6e\nlea     rcx, [rbx+140h]                                                ; +0xe0, 0x140321b70\nmov     rax, [rcx]                                                     ; +0xe7, 0x140321b77\nlea     rdx, word_140529AB0                                            ; +0xea, 0x140321b7a\ncall    qword ptr [rax]                                                ; +0xf1, 0x140321b81\nmov     rcx, [rbx+258h]                                                ; +0xf3, 0x140321b83\ntest    rcx, rcx                                                       ; +0xfa, 0x140321b8a\njz      short loc_140321B9A                                            ; +0xfd, 0x140321b8d\nmov     rax, [rcx]                                                     ; +0xff, 0x140321b8f\nxor     edx, edx                                                       ; +0x102, 0x140321b92\ncall    qword ptr [rax+140h]                                           ; +0x104, 0x140321b94\nmovss   xmm1, cs:flt_140622C24                                         ; +0x10a, 0x140321b9a\nmov     rcx, rbx                                                       ; +0x112, 0x140321ba2\ncall    ColorChannelSprite__updateOpacity                              ; +0x115, 0x140321ba5\ncmp     qword ptr [rbx+268h], 0                                        ; +0x11a, 0x140321baa\njz      short loc_140321BE4                                            ; +0x122, 0x140321bb2\nmov     rcx, [rbx+268h]                                                ; +0x124, 0x140321bb4\nxor     edx, edx                                                       ; +0x12b, 0x140321bbb\nmov     rax, [rcx]                                                     ; +0x12d, 0x140321bbd\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x130, 0x140321bc0\nadd     rsp, 20h                                                       ; +0x135, 0x140321bc5\npop     rdi                                                            ; +0x139, 0x140321bc9\njmp     qword ptr [rax+140h]                                           ; +0x13a, 0x140321bca\nlea     rdx, unk_140529B78                                             ; +0x141, 0x140321bd1\nlea     rcx, [rbx+140h]                                                ; +0x148, 0x140321bd8\nmov     rax, [rcx]                                                     ; +0x14f, 0x140321bdf\ncall    qword ptr [rax]                                                ; +0x152, 0x140321be2\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x154, 0x140321be4\nadd     rsp, 20h                                                       ; +0x159, 0x140321be9\npop     rdi                                                            ; +0x15d, 0x140321bed\nretn                                                                   ; +0x15e, 0x140321bee", "xrefs": ["LevelSettingsLayer::updateColorSprites @ 0x140321a30", "LevelSettingsLayer::updateColorSprites @ 0x140321a3f", "LevelSettingsLayer::updateColorSprites @ 0x140321a4e", "LevelSettingsLayer::updateColorSprites @ 0x140321a5d", "LevelSettingsLayer::updateColorSprites @ 0x140321a6c", "LevelSettingsLayer::updateColorSprites @ 0x140321a80", "<???> @ 0x1406d4c88"], "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"}