{"type": "func", "start": 4297955632, "end": 4297955890, "name": "ColorAction::step", "pseudocode": "// \n// ColorAction::step from 0x1002d9930 to 0x1002d9a32 (258 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::runColorEffect @ 0x1000efdb7\n// > LevelEditorLayer::stopTriggersInGroup @ 0x1000f00be\n// > GJBaseGameLayer::updateColor @ 0x10013c9a2\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 ColorAction::step(ColorAction *a1, float a2)\n{\n  float v2; // xmm2_4\n  float v3; // xmm2_4\n  float m_duration; // xmm3_4\n  float v5; // xmm0_4\n  float m_fromOpacity; // xmm1_4\n  float v7; // [rsp-14h] [rbp-14h]\n\n  if ( !a1->m_stepFinished && !a1->m_paused )\n  {\n    v2 = a2 + a1->m_deltaTime;\n    a1->m_deltaTime = v2;\n    v3 = v2 + a1->m_stepInterval;\n    m_duration = a1->m_duration;\n    if ( v3 < m_duration )\n    {\n      if ( v3 <= 0.0 )\n      {\nLABEL_9:\n        a1->m_color = a1->m_fromColor;\n        m_fromOpacity = a1->m_fromOpacity;\n        goto LABEL_10;\n      }\n      v5 = v3 / m_duration;\n      if ( (float)(v3 / m_duration) < 1.0 )\n      {\n        if ( v5 > 0.0 )\n        {\n          v7 = v3 / m_duration;\n          a1->m_color = GameToolbox::multipliedColorValue(\n                          (cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_fromColor.r | (a1->m_fromColor.b << 16)),\n                          (cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_toColor.r | (a1->m_toColor.b << 16)),\n                          v5);\n          m_duration = a1->m_duration;\n          a1->m_currentOpacity = (float)((float)(a1->m_toOpacity - a1->m_fromOpacity) * v7) + a1->m_fromOpacity;\nLABEL_11:\n          a1->m_stepFinished = v3 >= m_duration;\n          return;\n        }\n        goto LABEL_9;\n      }\n    }\n    a1->m_color = a1->m_toColor;\n    m_fromOpacity = a1->m_toOpacity;\nLABEL_10:\n    a1->m_currentOpacity = m_fromOpacity;\n    goto LABEL_11;\n  }\n}", "assembly": "; \n; ColorAction::step from 0x1002d9930 to 0x1002d9a32 (258 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::runColorEffect @ 0x1000efdb7\n; > LevelEditorLayer::stopTriggersInGroup @ 0x1000f00be\n; > GJBaseGameLayer::updateColor @ 0x10013c9a2\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\ncmp     byte ptr [rdi+38h], 0                                          ; +0x0, 0x1002d9930\njnz     locret_1002D9A31                                               ; +0x4, 0x1002d9934\ncmp     byte ptr [rdi+39h], 0                                          ; +0xa, 0x1002d993a\njnz     locret_1002D9A31                                               ; +0xe, 0x1002d993e\nmovaps  xmm2, xmm0                                                     ; +0x14, 0x1002d9944\naddss   xmm2, dword ptr [rdi+44h]                                      ; +0x17, 0x1002d9947\nmovss   dword ptr [rdi+44h], xmm2                                      ; +0x1c, 0x1002d994c\naddss   xmm2, dword ptr [rdi+0A4h]                                     ; +0x21, 0x1002d9951\nmovss   xmm3, dword ptr [rdi+50h]                                      ; +0x29, 0x1002d9959\nucomiss xmm2, xmm3                                                     ; +0x2e, 0x1002d995e\njnb     loc_1002D99FB                                                  ; +0x31, 0x1002d9961\nxorps   xmm1, xmm1                                                     ; +0x37, 0x1002d9967\nucomiss xmm2, xmm1                                                     ; +0x3a, 0x1002d996a\njbe     loc_1002D9A11                                                  ; +0x3d, 0x1002d996d\nmovaps  xmm0, xmm2                                                     ; +0x43, 0x1002d9973\ndivss   xmm0, xmm3                                                     ; +0x46, 0x1002d9976\nucomiss xmm0, cs:alpha                                                 ; +0x4a, 0x1002d997a\njnb     short loc_1002D99FB                                            ; +0x51, 0x1002d9981\nucomiss xmm1, xmm0                                                     ; +0x53, 0x1002d9983\njnb     loc_1002D9A11                                                  ; +0x56, 0x1002d9986\npush    rbp                                                            ; +0x5c, 0x1002d998c\nmov     rbp, rsp                                                       ; +0x5d, 0x1002d998d\npush    rbx                                                            ; +0x60, 0x1002d9990\npush    rax                                                            ; +0x61, 0x1002d9991\nmovzx   ecx, word ptr [rdi+48h]                                        ; +0x62, 0x1002d9992\nmovzx   eax, byte ptr [rdi+4Ah]                                        ; +0x66, 0x1002d9996\nshl     eax, 10h                                                       ; +0x6a, 0x1002d999a\nor      eax, ecx                                                       ; +0x6d, 0x1002d999d\nmovzx   ecx, word ptr [rdi+4Bh]                                        ; +0x6f, 0x1002d999f\nmovzx   esi, byte ptr [rdi+4Dh]                                        ; +0x73, 0x1002d99a3\nshl     esi, 10h                                                       ; +0x77, 0x1002d99a7\nor      esi, ecx                                                       ; +0x7a, 0x1002d99aa\nmov     rbx, rdi                                                       ; +0x7c, 0x1002d99ac\nmov     edi, eax                                                       ; +0x7f, 0x1002d99af\nmovss   dword ptr [rbp-10h], xmm2                                      ; +0x81, 0x1002d99b1\nmovss   dword ptr [rbp-0Ch], xmm0                                      ; +0x86, 0x1002d99b6\ncall    GameToolbox__multipliedColorValue                              ; +0x8b, 0x1002d99bb\nmov     rdi, rbx                                                       ; +0x90, 0x1002d99c0\nmov     [rbx+3Ah], ax                                                  ; +0x93, 0x1002d99c3\nshr     eax, 10h                                                       ; +0x97, 0x1002d99c7\nmov     [rbx+3Ch], al                                                  ; +0x9a, 0x1002d99ca\nmovss   xmm3, dword ptr [rbx+50h]                                      ; +0x9d, 0x1002d99cd\nmovss   xmm1, dword ptr [rbx+60h]                                      ; +0xa2, 0x1002d99d2\nmovss   xmm2, dword ptr [rbx+64h]                                      ; +0xa7, 0x1002d99d7\nsubss   xmm2, xmm1                                                     ; +0xac, 0x1002d99dc\nmulss   xmm2, dword ptr [rbp-0Ch]                                      ; +0xb0, 0x1002d99e0\naddss   xmm2, xmm1                                                     ; +0xb5, 0x1002d99e5\nmovss   dword ptr [rbx+40h], xmm2                                      ; +0xb9, 0x1002d99e9\nmovss   xmm2, dword ptr [rbp-10h]                                      ; +0xbe, 0x1002d99ee\nadd     rsp, 8                                                         ; +0xc3, 0x1002d99f3\npop     rbx                                                            ; +0xc7, 0x1002d99f7\npop     rbp                                                            ; +0xc8, 0x1002d99f8\njmp     short loc_1002D9A2A                                            ; +0xc9, 0x1002d99f9\nmovzx   eax, byte ptr [rdi+4Dh]                                        ; +0xcb, 0x1002d99fb\nmov     [rdi+3Ch], al                                                  ; +0xcf, 0x1002d99ff\nmovzx   eax, word ptr [rdi+4Bh]                                        ; +0xd2, 0x1002d9a02\nmov     [rdi+3Ah], ax                                                  ; +0xd6, 0x1002d9a06\nmovss   xmm1, dword ptr [rdi+64h]                                      ; +0xda, 0x1002d9a0a\njmp     short loc_1002D9A25                                            ; +0xdf, 0x1002d9a0f\nmovzx   eax, byte ptr [rdi+4Ah]                                        ; +0xe1, 0x1002d9a11\nmov     [rdi+3Ch], al                                                  ; +0xe5, 0x1002d9a15\nmovzx   eax, word ptr [rdi+48h]                                        ; +0xe8, 0x1002d9a18\nmov     [rdi+3Ah], ax                                                  ; +0xec, 0x1002d9a1c\nmovss   xmm1, dword ptr [rdi+60h]                                      ; +0xf0, 0x1002d9a20\nmovss   dword ptr [rdi+40h], xmm1                                      ; +0xf5, 0x1002d9a25\nucomiss xmm2, xmm3                                                     ; +0xfa, 0x1002d9a2a\nsetnb   byte ptr [rdi+38h]                                             ; +0xfd, 0x1002d9a2d\nretn                                                                   ; +0x101, 0x1002d9a31", "xrefs": ["LevelEditorLayer::runColorEffect @ 0x1000efdb7", "LevelEditorLayer::stopTriggersInGroup @ 0x1000f00be", "GJBaseGameLayer::updateColor @ 0x10013c9a2"], "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"}