{"type": "func", "start": 5372907136, "end": 5372907511, "name": "LevelEditorLayer::updatePreviewAnim", "pseudocode": "// \n// LevelEditorLayer::updatePreviewAnim from 0x140400e80 to 0x140400ff7 (375 bytes)\n// \n// 2 xrefs:\n// > EditorUI::toggleViewOption @ 0x1401f86f6\n// > <???> @ 0x140925a78\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:31:54 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nunsigned int __fastcall LevelEditorLayer::updatePreviewAnim(__int64 a1)\n{\n  __int64 v2; // rcx\n  unsigned int result; // eax\n  unsigned int v4; // esi\n  struct cocos2d::CCObject *v5; // rax\n  __int64 v6; // rbx\n  __int64 v7; // rdx\n  void *v8; // [rsp+40h] [rbp+8h]\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v8 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  result = GameManager::getGameVariable(v2, \"0118\");\n  if ( *(_BYTE *)(a1 + 14669) != (_BYTE)result )\n  {\n    *(_BYTE *)(a1 + 14669) = result;\n    v4 = 0;\n    result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 3536));\n    if ( result )\n    {\n      do\n      {\n        v5 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 3536), v4);\n        v6 = (__int64)v5;\n        if ( *((_DWORD *)v5 + 314) == 2 )\n          AnimatedGameObject::updateObjectAnimation(v5);\n        if ( !*(_BYTE *)(a1 + 14669) )\n        {\n          if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1576LL))(v6) )\n          {\n            *(_DWORD *)(v6 + 1380) = 0;\n            *(float *)(v6 + 1372) = (float)-(*(_BYTE *)(v6 + 1384) != 0);\n            *(_DWORD *)(v6 + 1444) = 0;\n            (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v6 + 1696LL))(v6, v7, 0xFFFFFFFFLL);\n          }\n          if ( !*(_BYTE *)(a1 + 14669) )\n          {\n            if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1584LL))(v6) )\n              EnhancedGameObject::updateRotateAction(v6, 0.0);\n          }\n        }\n        ++v4;\n        result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 3536));\n      }\n      while ( v4 < result );\n    }\n  }\n  return result;\n}", "assembly": "; \n; LevelEditorLayer::updatePreviewAnim from 0x140400e80 to 0x140400ff7 (375 bytes)\n; \n; 2 xrefs:\n; > EditorUI::toggleViewOption @ 0x1401f86f6\n; > <???> @ 0x140925a78\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:31:54 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140400e80\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140400e85\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140400e8a\npush    rdi                                                            ; +0xf, 0x140400e8f\nsub     rsp, 30h                                                       ; +0x10, 0x140400e90\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x14, 0x140400e94\nmov     rdi, rcx                                                       ; +0x19, 0x140400e99\nmov     rcx, cs:qword_14090BFD0                                        ; +0x1c, 0x140400e9c\ntest    rcx, rcx                                                       ; +0x23, 0x140400ea3\njnz     short loc_140400EDA                                            ; +0x26, 0x140400ea6\nmov     ecx, 6E8h; Size                                                ; +0x28, 0x140400ea8\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2d, 0x140400ead\nmov     [rsp+38h+arg_0], rax                                           ; +0x32, 0x140400eb2\nmov     rcx, rax                                                       ; +0x37, 0x140400eb7\ncall    GameManager__GameManager                                       ; +0x3a, 0x140400eba\nnop                                                                    ; +0x3f, 0x140400ebf\nmov     cs:qword_14090BFD0, rax                                        ; +0x40, 0x140400ec0\nmov     rcx, [rax]                                                     ; +0x47, 0x140400ec7\nmov     rdx, [rcx+48h]                                                 ; +0x4a, 0x140400eca\nmov     rcx, rax                                                       ; +0x4e, 0x140400ece\ncall    rdx                                                            ; +0x51, 0x140400ed1\nmov     rcx, cs:qword_14090BFD0                                        ; +0x53, 0x140400ed3\nlea     rdx, a0118; \"0118\"                                             ; +0x5a, 0x140400eda\ncall    GameManager__getGameVariable                                   ; +0x61, 0x140400ee1\ncmp     [rdi+394Dh], al                                                ; +0x66, 0x140400ee6\njz      loc_140400FDD                                                  ; +0x6c, 0x140400eec\nmov     [rdi+394Dh], al                                                ; +0x72, 0x140400ef2\nxor     ebp, ebp                                                       ; +0x78, 0x140400ef8\nmov     esi, ebp                                                       ; +0x7a, 0x140400efa\nmov     rcx, [rdi+0DD0h]                                               ; +0x7c, 0x140400efc\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x83, 0x140400f03\ntest    eax, eax                                                       ; +0x89, 0x140400f09\njz      loc_140400FDD                                                  ; +0x8b, 0x140400f0b\nmovss   xmm6, dword ptr cs:xmmword_140836CC0                           ; +0x91, 0x140400f11\nnop     dword ptr [rax+00000000h]                                      ; +0x99, 0x140400f19\nmov     edx, esi                                                       ; +0xa0, 0x140400f20\nmov     rcx, [rdi+0DD0h]                                               ; +0xa2, 0x140400f22\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa9, 0x140400f29\nmov     rbx, rax                                                       ; +0xaf, 0x140400f2f\ncmp     dword ptr [rax+4E8h], 2                                        ; +0xb2, 0x140400f32\njnz     short loc_140400F43                                            ; +0xb9, 0x140400f39\nmov     rcx, rax                                                       ; +0xbb, 0x140400f3b\ncall    AnimatedGameObject__updateObjectAnimation                      ; +0xbe, 0x140400f3e\ncmp     [rdi+394Dh], bpl                                               ; +0xc3, 0x140400f43\njnz     short loc_140400FC6                                            ; +0xca, 0x140400f4a\nmov     rcx, [rbx]                                                     ; +0xcc, 0x140400f4c\nmov     rdx, [rcx+628h]                                                ; +0xcf, 0x140400f4f\nmov     rcx, rbx                                                       ; +0xd6, 0x140400f56\ncall    rdx                                                            ; +0xd9, 0x140400f59\ntest    al, al                                                         ; +0xdb, 0x140400f5b\njz      short loc_140400FA2                                            ; +0xdd, 0x140400f5d\nmov     [rbx+564h], ebp                                                ; +0xdf, 0x140400f5f\nmovzx   eax, byte ptr [rbx+568h]                                       ; +0xe5, 0x140400f65\nneg     al                                                             ; +0xec, 0x140400f6c\nsbb     ecx, ecx                                                       ; +0xee, 0x140400f6e\nmovd    xmm0, ecx                                                      ; +0xf0, 0x140400f70\ncvtdq2ps xmm0, xmm0                                                    ; +0xf4, 0x140400f74\nmovss   dword ptr [rbx+55Ch], xmm0                                     ; +0xf7, 0x140400f77\nmov     [rbx+5A4h], ebp                                                ; +0xff, 0x140400f7f\nmovss   xmm1, dword ptr [rbx+558h]                                     ; +0x105, 0x140400f85\nxorps   xmm1, xmm6                                                     ; +0x10d, 0x140400f8d\nmov     rax, [rbx]                                                     ; +0x110, 0x140400f90\nmov     r8d, 0FFFFFFFFh                                                ; +0x113, 0x140400f93\nmov     rcx, rbx                                                       ; +0x119, 0x140400f99\ncall    qword ptr [rax+6A0h]                                           ; +0x11c, 0x140400f9c\ncmp     [rdi+394Dh], bpl                                               ; +0x122, 0x140400fa2\njnz     short loc_140400FC6                                            ; +0x129, 0x140400fa9\nmov     rax, [rbx]                                                     ; +0x12b, 0x140400fab\nmov     rcx, rbx                                                       ; +0x12e, 0x140400fae\ncall    qword ptr [rax+630h]                                           ; +0x131, 0x140400fb1\ntest    al, al                                                         ; +0x137, 0x140400fb7\njz      short loc_140400FC6                                            ; +0x139, 0x140400fb9\nxorps   xmm1, xmm1                                                     ; +0x13b, 0x140400fbb\nmov     rcx, rbx                                                       ; +0x13e, 0x140400fbe\ncall    EnhancedGameObject__updateRotateAction                         ; +0x141, 0x140400fc1\ninc     esi                                                            ; +0x146, 0x140400fc6\nmov     rcx, [rdi+0DD0h]                                               ; +0x148, 0x140400fc8\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x14f, 0x140400fcf\ncmp     esi, eax                                                       ; +0x155, 0x140400fd5\njb      loc_140400F20                                                  ; +0x157, 0x140400fd7\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x15d, 0x140400fdd\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x162, 0x140400fe2\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x167, 0x140400fe7\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x16c, 0x140400fec\nadd     rsp, 30h                                                       ; +0x171, 0x140400ff1\npop     rdi                                                            ; +0x175, 0x140400ff5\nretn                                                                   ; +0x176, 0x140400ff6", "xrefs": ["EditorUI::toggleViewOption @ 0x1401f86f6", "<???> @ 0x140925a78"], "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"}