{"type": "func", "start": 5371713648, "end": 5371714051, "name": "LevelEditorLayer::runColorEffect", "pseudocode": "// \n// LevelEditorLayer::runColorEffect from 0x1402dd870 to 0x1402dda03 (403 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::activateTriggerEffect @ 0x1402dd02a\n// > LevelEditorLayer::activateTriggerEffect @ 0x1402dd06d\n// > <???> @ 0x1406d3314\n// > <???> @ 0x1406d3320\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\nColorAction *LevelEditorLayer::runColorEffect(\n        LevelEditorLayer *a1,\n        EffectGameObject *a2,\n        int a3,\n        float a4,\n        float a5,\n        bool a6)\n{\n  bool v9; // di\n  ColorAction *ColorAction; // rax\n  float m_actionDelay; // xmm2_4\n  ColorAction *result; // rax\n  __int64 v13; // r10\n  __int64 v14; // rcx\n\n  v9 = a2->m_duration <= 0.0;\n  ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, a3);\n  m_actionDelay = ColorAction->m_actionDelay;\n  if ( m_actionDelay != 0.0 )\n  {\n    if ( !v9 && a6 && (ColorAction->m_deltaTime == 0.0 || ColorAction->m_stepFinished) && ColorAction->m_copyID > 0 )\n      return nullptr;\n    ColorAction->m_stepInterval = 0.0;\n    ColorAction->m_deltaTime = 0.0;\n    ColorAction::step(ColorAction, a4 - m_actionDelay);\n    if ( !*(_DWORD *)(v13 + 120) )\n    {\n      v14 = *(_QWORD *)(v13 + 144);\n      *(_WORD *)(v14 + 324) = *(_WORD *)(v13 + 58);\n      *(_BYTE *)(v14 + 326) = *(_BYTE *)(v13 + 60);\n      *(float *)(v14 + 320) = *(float *)(v13 + 64) * 255.0;\n    }\n  }\n  result = (ColorAction *)((__int64 (__fastcall *)(LevelEditorLayer *, cocos2d::ccColor3B *, LevelEditorLayer_vtbl *, _QWORD, bool, _DWORD, cocos2d::ccHSVValue *, int, bool, EffectGameObject *, int, int))a1->updateColor)(\n                            a1,\n                            &a2->m_triggerTargetColor,\n                            a1->GJBaseGameLayer::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable,\n                            (unsigned int)a3,\n                            a2->m_usesBlending,\n                            LODWORD(a2->m_opacity),\n                            &a2->m_hsvValue,\n                            a2->m_copyColorID,\n                            a2->m_copyOpacity,\n                            a2,\n                            a2->m_uniqueID,\n                            a2->m_controlID);\n  result->m_actionDelay = a4;\n  result->m_stepInterval = a5;\n  return result;\n}", "assembly": "; \n; LevelEditorLayer::runColorEffect from 0x1402dd870 to 0x1402dda03 (403 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::activateTriggerEffect @ 0x1402dd02a\n; > LevelEditorLayer::activateTriggerEffect @ 0x1402dd06d\n; > <???> @ 0x1406d3314\n; > <???> @ 0x1406d3320\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_0], rbx                                               ; +0x0, 0x1402dd870\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1402dd875\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1402dd87a\npush    rdi                                                            ; +0xf, 0x1402dd87f\nsub     rsp, 80h                                                       ; +0x10, 0x1402dd880\nmovaps  [rsp+88h+var_18], xmm6                                         ; +0x17, 0x1402dd887\nmov     rbx, rdx                                                       ; +0x1c, 0x1402dd88c\nxorps   xmm6, xmm6                                                     ; +0x1f, 0x1402dd88f\nmovaps  [rsp+88h+var_28], xmm7                                         ; +0x22, 0x1402dd892\ncomiss  xmm6, dword ptr [rdx+5BCh]                                     ; +0x27, 0x1402dd897\nmov     rsi, rcx                                                       ; +0x2e, 0x1402dd89e\nmov     edx, r8d                                                       ; +0x31, 0x1402dd8a1\nmov     rcx, [rcx+950h]                                                ; +0x34, 0x1402dd8a4\nmov     ebp, r8d                                                       ; +0x3b, 0x1402dd8ab\nmovaps  xmm7, xmm3                                                     ; +0x3e, 0x1402dd8ae\nsetnb   dil                                                            ; +0x41, 0x1402dd8b1\ncall    GJEffectManager__getColorAction                                ; +0x45, 0x1402dd8b5\nmov     r10, rax                                                       ; +0x4a, 0x1402dd8ba\nmovss   xmm2, dword ptr [rax+0A0h]                                     ; +0x4d, 0x1402dd8bd\nucomiss xmm2, xmm6                                                     ; +0x55, 0x1402dd8c5\njp      short loc_1402DD8D0                                            ; +0x58, 0x1402dd8c8\njz      loc_1402DD955                                                  ; +0x5a, 0x1402dd8ca\ntest    dil, dil                                                       ; +0x60, 0x1402dd8d0\njnz     short loc_1402DD8FE                                            ; +0x63, 0x1402dd8d3\ncmp     [rsp+88h+arg_28], dil                                          ; +0x65, 0x1402dd8d5\njz      short loc_1402DD8FE                                            ; +0x6d, 0x1402dd8dd\nmovss   xmm0, dword ptr [rax+44h]                                      ; +0x6f, 0x1402dd8df\nucomiss xmm0, xmm6                                                     ; +0x74, 0x1402dd8e4\njp      short loc_1402DD8EB                                            ; +0x77, 0x1402dd8e7\njz      short loc_1402DD8F1                                            ; +0x79, 0x1402dd8e9\ncmp     byte ptr [rax+38h], 0                                          ; +0x7b, 0x1402dd8eb\njz      short loc_1402DD8FE                                            ; +0x7f, 0x1402dd8ef\ncmp     dword ptr [rax+78h], 0                                         ; +0x81, 0x1402dd8f1\njle     short loc_1402DD8FE                                            ; +0x85, 0x1402dd8f5\nxor     eax, eax                                                       ; +0x87, 0x1402dd8f7\njmp     loc_1402DD9E0                                                  ; +0x89, 0x1402dd8f9\nxor     eax, eax                                                       ; +0x8e, 0x1402dd8fe\nmovaps  xmm1, xmm7                                                     ; +0x90, 0x1402dd900\nsubss   xmm1, xmm2                                                     ; +0x93, 0x1402dd903\nmov     [r10+0A4h], eax                                                ; +0x97, 0x1402dd907\nmov     rcx, r10                                                       ; +0x9e, 0x1402dd90e\nmov     [r10+44h], eax                                                 ; +0xa1, 0x1402dd911\ncall    ColorAction__step                                              ; +0xa5, 0x1402dd915\ncmp     dword ptr [r10+78h], 0                                         ; +0xaa, 0x1402dd91a\njnz     short loc_1402DD955                                            ; +0xaf, 0x1402dd91f\nmovzx   eax, word ptr [r10+3Ah]                                        ; +0xb1, 0x1402dd921\nmov     rcx, [r10+90h]                                                 ; +0xb6, 0x1402dd926\nmov     [rcx+144h], ax                                                 ; +0xbd, 0x1402dd92d\nmovzx   eax, byte ptr [r10+3Ch]                                        ; +0xc4, 0x1402dd934\nmov     [rcx+146h], al                                                 ; +0xc9, 0x1402dd939\nmovss   xmm0, dword ptr [r10+40h]                                      ; +0xcf, 0x1402dd93f\nmulss   xmm0, cs:dword_140623418                                       ; +0xd5, 0x1402dd945\nmovss   dword ptr [rcx+140h], xmm0                                     ; +0xdd, 0x1402dd94d\nmov     eax, [rbx+698h]                                                ; +0xe5, 0x1402dd955\nlea     rcx, [rbx+65Ch]                                                ; +0xeb, 0x1402dd95b\nmovss   xmm0, dword ptr [rbx+5C0h]                                     ; +0xf2, 0x1402dd962\nlea     rdx, [rbx+5B9h]                                                ; +0xfa, 0x1402dd96a\nmov     r8, [rsi]                                                      ; +0x101, 0x1402dd971\nmov     r9d, ebp                                                       ; +0x104, 0x1402dd974\nmovss   xmm2, dword ptr [rbx+5BCh]                                     ; +0x107, 0x1402dd977\nmov     [rsp+88h+var_30], eax                                          ; +0x10f, 0x1402dd97f\nmov     eax, [rbx+39Ch]                                                ; +0x113, 0x1402dd983\nmov     [rsp+88h+var_38], eax                                          ; +0x119, 0x1402dd989\nmovzx   eax, byte ptr [rbx+670h]                                       ; +0x11d, 0x1402dd98d\nmov     [rsp+88h+var_40], rbx                                          ; +0x124, 0x1402dd994\nmov     [rsp+88h+var_48], al                                           ; +0x129, 0x1402dd999\nmov     eax, [rbx+66Ch]                                                ; +0x12d, 0x1402dd99d\nmov     [rsp+88h+var_50], eax                                          ; +0x133, 0x1402dd9a3\nmovzx   eax, byte ptr [rbx+5DFh]                                       ; +0x137, 0x1402dd9a7\nmov     [rsp+88h+var_58], rcx                                          ; +0x13e, 0x1402dd9ae\nmov     rcx, rsi                                                       ; +0x143, 0x1402dd9b3\nmovss   [rsp+88h+var_60], xmm0                                         ; +0x146, 0x1402dd9b6\nmov     [rsp+88h+var_68], al                                           ; +0x14c, 0x1402dd9bc\ncall    qword ptr [r8+448h]                                            ; +0x150, 0x1402dd9c0\nmovss   xmm0, [rsp+88h+arg_20]                                         ; +0x157, 0x1402dd9c7\nmovss   dword ptr [rax+0A0h], xmm7                                     ; +0x160, 0x1402dd9d0\nmovss   dword ptr [rax+0A4h], xmm0                                     ; +0x168, 0x1402dd9d8\nmovaps  xmm6, [rsp+88h+var_18]                                         ; +0x170, 0x1402dd9e0\nlea     r11, [rsp+88h+var_8]                                           ; +0x175, 0x1402dd9e5\nmov     rbx, [r11+10h]                                                 ; +0x17d, 0x1402dd9ed\nmov     rbp, [r11+18h]                                                 ; +0x181, 0x1402dd9f1\nmov     rsi, [r11+20h]                                                 ; +0x185, 0x1402dd9f5\nmovaps  xmm7, [rsp+88h+var_28]                                         ; +0x189, 0x1402dd9f9\nmov     rsp, r11                                                       ; +0x18e, 0x1402dd9fe\npop     rdi                                                            ; +0x191, 0x1402dda01\nretn                                                                   ; +0x192, 0x1402dda02", "xrefs": ["LevelEditorLayer::activateTriggerEffect @ 0x1402dd02a", "LevelEditorLayer::activateTriggerEffect @ 0x1402dd06d", "<???> @ 0x1406d3314", "<???> @ 0x1406d3320"], "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"}