{"type": "func", "start": 5369614656, "end": 5369615092, "name": "EditorPauseLayer::togglePreviewAnim", "pseudocode": "// \n// EditorPauseLayer::togglePreviewAnim from 0x1400dd140 to 0x1400dd2f4 (436 bytes)\n// \n// 2 xrefs:\n// > EditorPauseLayer::customSetup @ 0x1400dc368\n// > <???> @ 0x1406c89c4\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\n// Hidden C++ exception states: #wind=2\nvoid EditorPauseLayer::togglePreviewAnim(EditorPauseLayer *a1, cocos2d::CCObject *a2)\n{\n  LevelEditorLayer *m_editorLayer; // rdi\n  GameManager *v4; // rcx\n  bool GameVariable; // al\n  unsigned int i; // esi\n  struct cocos2d::CCObject *v7; // rax\n  EnhancedGameObject *v8; // rbx\n  __int64 v9; // rdx\n  void *v10; // [rsp+40h] [rbp+8h]\n  void *v11; // [rsp+40h] [rbp+8h]\n\n  if ( !qword_1406C2ED8 )\n  {\n    v10 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n  }\n  GameManager::toggleGameVariable((GameManager *)a1, \"0118\");\n  m_editorLayer = a1->m_editorLayer;\n  v4 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v11 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v11);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v4 = (GameManager *)qword_1406C2ED8;\n  }\n  GameVariable = GameManager::getGameVariable(v4, \"0118\");\n  if ( m_editorLayer->m_previewAnimations != GameVariable )\n  {\n    m_editorLayer->m_previewAnimations = GameVariable;\n    for ( i = 0; i < cocos2d::CCArray::count(m_editorLayer->m_objects); ++i )\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(m_editorLayer->m_objects, i);\n      v8 = (EnhancedGameObject *)v7;\n      if ( v7[22].m_uAutoReleaseCount == 2 )\n        AnimatedGameObject::updateObjectAnimation((AnimatedGameObject *)v7);\n      if ( !m_editorLayer->m_previewAnimations )\n      {\n        if ( v8->getHasSyncedAnimation(v8) )\n        {\n          v8->m_unk544 = 0.0;\n          v8->m_animationStart = (float)-v8->m_unk548;\n          v8->m_unkAnimationInt = 0;\n          ((void (__fastcall *)(EnhancedGameObject *, __int64, __int64))v8->updateSyncedAnimation)(v8, v9, 0xFFFFFFFFLL);\n        }\n        if ( !m_editorLayer->m_previewAnimations && v8->getHasRotateAction(v8) )\n          EnhancedGameObject::updateRotateAction(v8, 0.0);\n      }\n    }\n  }\n}", "assembly": "; \n; EditorPauseLayer::togglePreviewAnim from 0x1400dd140 to 0x1400dd2f4 (436 bytes)\n; \n; 2 xrefs:\n; > EditorPauseLayer::customSetup @ 0x1400dc368\n; > <???> @ 0x1406c89c4\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, 0x1400dd140\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1400dd145\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1400dd14a\npush    rdi                                                            ; +0xf, 0x1400dd14f\nsub     rsp, 30h                                                       ; +0x10, 0x1400dd150\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x14, 0x1400dd154\nmov     rdi, rcx                                                       ; +0x19, 0x1400dd159\ncmp     cs:qword_1406C2ED8, 0                                          ; +0x1c, 0x1400dd15c\njnz     short loc_1400DD18E                                            ; +0x24, 0x1400dd164\nmov     ecx, 668h; Size                                                ; +0x26, 0x1400dd166\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2b, 0x1400dd16b\nmov     [rsp+38h+arg_0], rax                                           ; +0x30, 0x1400dd170\nmov     rcx, rax                                                       ; +0x35, 0x1400dd175\ncall    sub_14017AB00                                                  ; +0x38, 0x1400dd178\nnop                                                                    ; +0x3d, 0x1400dd17d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x3e, 0x1400dd17e\nmov     rdx, [rax]                                                     ; +0x45, 0x1400dd185\nmov     rcx, rax                                                       ; +0x48, 0x1400dd188\ncall    qword ptr [rdx+48h]                                            ; +0x4b, 0x1400dd18b\nlea     rdx, a0118; \"0118\"                                             ; +0x4e, 0x1400dd18e\ncall    GameManager__toggleGameVariable                                ; +0x55, 0x1400dd195\nmov     rdi, [rdi+248h]                                                ; +0x5a, 0x1400dd19a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x61, 0x1400dd1a1\ntest    rcx, rcx                                                       ; +0x68, 0x1400dd1a8\njnz     short loc_1400DD1DD                                            ; +0x6b, 0x1400dd1ab\nmov     ecx, 668h; Size                                                ; +0x6d, 0x1400dd1ad\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x72, 0x1400dd1b2\nmov     [rsp+38h+arg_0], rax                                           ; +0x77, 0x1400dd1b7\nmov     rcx, rax                                                       ; +0x7c, 0x1400dd1bc\ncall    sub_14017AB00                                                  ; +0x7f, 0x1400dd1bf\nnop                                                                    ; +0x84, 0x1400dd1c4\nmov     cs:qword_1406C2ED8, rax                                        ; +0x85, 0x1400dd1c5\nmov     r8, [rax]                                                      ; +0x8c, 0x1400dd1cc\nmov     rcx, rax                                                       ; +0x8f, 0x1400dd1cf\ncall    qword ptr [r8+48h]                                             ; +0x92, 0x1400dd1d2\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x96, 0x1400dd1d6\nlea     rdx, a0118; \"0118\"                                             ; +0x9d, 0x1400dd1dd\ncall    GameManager__getGameVariable                                   ; +0xa4, 0x1400dd1e4\ncmp     [rdi+37B4h], al                                                ; +0xa9, 0x1400dd1e9\njz      loc_1400DD2DA                                                  ; +0xaf, 0x1400dd1ef\nmov     [rdi+37B4h], al                                                ; +0xb5, 0x1400dd1f5\nxor     ebp, ebp                                                       ; +0xbb, 0x1400dd1fb\nmov     esi, ebp                                                       ; +0xbd, 0x1400dd1fd\nmov     rcx, [rdi+0DB8h]                                               ; +0xbf, 0x1400dd1ff\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc6, 0x1400dd206\ntest    eax, eax                                                       ; +0xcc, 0x1400dd20c\njz      loc_1400DD2DA                                                  ; +0xce, 0x1400dd20e\nmovss   xmm6, dword ptr cs:xmmword_1406243F0                           ; +0xd4, 0x1400dd214\nnop     dword ptr [rax+00h]                                            ; +0xdc, 0x1400dd21c\nmov     edx, esi                                                       ; +0xe0, 0x1400dd220\nmov     rcx, [rdi+0DB8h]                                               ; +0xe2, 0x1400dd222\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xe9, 0x1400dd229\nmov     rbx, rax                                                       ; +0xef, 0x1400dd22f\ncmp     dword ptr [rax+4E8h], 2                                        ; +0xf2, 0x1400dd232\njnz     short loc_1400DD243                                            ; +0xf9, 0x1400dd239\nmov     rcx, rax                                                       ; +0xfb, 0x1400dd23b\ncall    AnimatedGameObject__updateObjectAnimation                      ; +0xfe, 0x1400dd23e\ncmp     [rdi+37B4h], bpl                                               ; +0x103, 0x1400dd243\njnz     short loc_1400DD2C3                                            ; +0x10a, 0x1400dd24a\nmov     rdx, [rbx]                                                     ; +0x10c, 0x1400dd24c\nmov     rcx, rbx                                                       ; +0x10f, 0x1400dd24f\ncall    qword ptr [rdx+618h]                                           ; +0x112, 0x1400dd252\ntest    al, al                                                         ; +0x118, 0x1400dd258\njz      short loc_1400DD29F                                            ; +0x11a, 0x1400dd25a\nmov     [rbx+564h], ebp                                                ; +0x11c, 0x1400dd25c\nmovzx   eax, byte ptr [rbx+568h]                                       ; +0x122, 0x1400dd262\nneg     al                                                             ; +0x129, 0x1400dd269\nsbb     ecx, ecx                                                       ; +0x12b, 0x1400dd26b\nmovd    xmm0, ecx                                                      ; +0x12d, 0x1400dd26d\ncvtdq2ps xmm0, xmm0                                                    ; +0x131, 0x1400dd271\nmovss   dword ptr [rbx+55Ch], xmm0                                     ; +0x134, 0x1400dd274\nmov     [rbx+5A4h], ebp                                                ; +0x13c, 0x1400dd27c\nmov     rax, [rbx]                                                     ; +0x142, 0x1400dd282\nmovss   xmm1, dword ptr [rbx+558h]                                     ; +0x145, 0x1400dd285\nxorps   xmm1, xmm6                                                     ; +0x14d, 0x1400dd28d\nmov     r8d, 0FFFFFFFFh                                                ; +0x150, 0x1400dd290\nmov     rcx, rbx                                                       ; +0x156, 0x1400dd296\ncall    qword ptr [rax+690h]                                           ; +0x159, 0x1400dd299\ncmp     [rdi+37B4h], bpl                                               ; +0x15f, 0x1400dd29f\njnz     short loc_1400DD2C3                                            ; +0x166, 0x1400dd2a6\nmov     rax, [rbx]                                                     ; +0x168, 0x1400dd2a8\nmov     rcx, rbx                                                       ; +0x16b, 0x1400dd2ab\ncall    qword ptr [rax+620h]                                           ; +0x16e, 0x1400dd2ae\ntest    al, al                                                         ; +0x174, 0x1400dd2b4\njz      short loc_1400DD2C3                                            ; +0x176, 0x1400dd2b6\nxorps   xmm1, xmm1                                                     ; +0x178, 0x1400dd2b8\nmov     rcx, rbx                                                       ; +0x17b, 0x1400dd2bb\ncall    EnhancedGameObject__updateRotateAction                         ; +0x17e, 0x1400dd2be\ninc     esi                                                            ; +0x183, 0x1400dd2c3\nmov     rcx, [rdi+0DB8h]                                               ; +0x185, 0x1400dd2c5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x18c, 0x1400dd2cc\ncmp     esi, eax                                                       ; +0x192, 0x1400dd2d2\njb      loc_1400DD220                                                  ; +0x194, 0x1400dd2d4\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x19a, 0x1400dd2da\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x19f, 0x1400dd2df\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x1a4, 0x1400dd2e4\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x1a9, 0x1400dd2e9\nadd     rsp, 30h                                                       ; +0x1ae, 0x1400dd2ee\npop     rdi                                                            ; +0x1b2, 0x1400dd2f2\nretn                                                                   ; +0x1b3, 0x1400dd2f3", "xrefs": ["EditorPauseLayer::customSetup @ 0x1400dc368", "<???> @ 0x1406c89c4"], "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"}