{"type": "func", "start": 5370496880, "end": 5370497414, "name": "EditorUI::onPlaytest", "pseudocode": "// \n// EditorUI::onPlaytest from 0x1401b4770 to 0x1401b4986 (534 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onPlaytest @ 0x1401b4955\n// > EditorUI::handleAction @ 0x1401c1d9a\n// > EditorUI::init @ 0x1401aabd8\n// > <???> @ 0x14091a0fc\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:27:57 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditorUI::onPlaytest(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rax\n  char v5; // si\n  char v6; // di\n  __int64 v7; // rcx\n  int v8; // eax\n  __int64 v9; // rcx\n  __int64 *v10; // r14\n  __int64 v11; // rbp\n  cocos2d::CCSpriteFrameCache *v12; // rax\n  const char *v13; // rdx\n  struct cocos2d::CCSpriteFrame *v14; // rax\n  __int64 v15; // rdx\n  void *v16; // [rsp+40h] [rbp+8h]\n\n  if ( !*(_BYTE *)(a1 + 1660) )\n  {\n    v4 = EditorSFXManager::sharedState();\n    EditorSFXManager::playAction(v4, 210);\n    v5 = 0;\n    if ( *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 2204LL) != 1 )\n    {\n      v5 = 1;\n      GJBaseGameLayer::pauseAudio();\n    }\n    v6 = 0;\n    *(_BYTE *)(a1 + 664) = 0;\n    if ( *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 2204LL) != 1 )\n      EditorUI::toggleMode(a1, *(_QWORD *)(a1 + 984));\n    EditorUI::deselectAll(a1);\n    v7 = *(_QWORD *)(a1 + 1512);\n    v8 = *(_DWORD *)(v7 + 2204);\n    switch ( v8 )\n    {\n      case 1:\n        LevelEditorLayer::onPausePlaytest();\n        break;\n      case 2:\n        LevelEditorLayer::onResumePlaytest();\n        break;\n      case 0:\n        *(float *)(a1 + 1656) = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(v7 + 4296) + 168LL))(*(_QWORD *)(v7 + 4296));\n        LevelEditorLayer::onPlaytest(*(_QWORD *)(a1 + 1512));\n        if ( !*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 12912LL) )\n          goto LABEL_16;\n        v9 = qword_14090BFD0;\n        if ( !qword_14090BFD0 )\n        {\n          v16 = operator new(0x6E8u);\n          qword_14090BFD0 = GameManager::GameManager(v16);\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n          v9 = qword_14090BFD0;\n        }\n        if ( (unsigned __int8)GameManager::getGameVariable(v9, \"0150\") )\n          v6 = 1;\n        else\nLABEL_16:\n          v6 = 0;\n        break;\n    }\n    EditorUI::showUI(a1, *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 2204LL) != 1);\n    v10 = (__int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1048) + 952LL))(*(_QWORD *)(a1 + 1048));\n    v11 = *v10;\n    if ( *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 2204LL) == 1 )\n    {\n      v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v13 = \"GJ_pauseEditorBtn_001.png\";\n    }\n    else\n    {\n      v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v13 = \"GJ_playEditorBtn_001.png\";\n    }\n    v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v12, v13);\n    (*(void (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v11 + 1008))(v10, v14);\n    LOBYTE(v15) = *(_BYTE *)(a1 + 1661) == 0;\n    (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1056) + 336LL))(*(_QWORD *)(a1 + 1056), v15);\n    EditorUI::updatePlaybackBtn(a1);\n    if ( v6 )\n      EditorUI::onPlaytest(a1, a2);\n    if ( v5 )\n      *(_BYTE *)(*(_QWORD *)(a1 + 1512) + 14438LL) = 1;\n  }\n}", "assembly": "; \n; EditorUI::onPlaytest from 0x1401b4770 to 0x1401b4986 (534 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onPlaytest @ 0x1401b4955\n; > EditorUI::handleAction @ 0x1401c1d9a\n; > EditorUI::init @ 0x1401aabd8\n; > <???> @ 0x14091a0fc\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:27:57 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401b4770\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1401b4775\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1401b477a\npush    rdi                                                            ; +0xf, 0x1401b477f\npush    r14                                                            ; +0x10, 0x1401b4780\npush    r15                                                            ; +0x12, 0x1401b4782\nsub     rsp, 20h                                                       ; +0x14, 0x1401b4784\nmov     r15, rdx                                                       ; +0x18, 0x1401b4788\nmov     rbx, rcx                                                       ; +0x1b, 0x1401b478b\ncmp     byte ptr [rcx+67Ch], 0                                         ; +0x1e, 0x1401b478e\njnz     loc_1401B496D                                                  ; +0x25, 0x1401b4795\ncall    EditorSFXManager__sharedState                                  ; +0x2b, 0x1401b479b\nmov     rcx, rax                                                       ; +0x30, 0x1401b47a0\nmov     edx, 0D2h                                                      ; +0x33, 0x1401b47a3\ncall    EditorSFXManager__playAction                                   ; +0x38, 0x1401b47a8\nxor     sil, sil                                                       ; +0x3d, 0x1401b47ad\nmov     rax, [rbx+5E8h]                                                ; +0x40, 0x1401b47b0\ncmp     dword ptr [rax+89Ch], 1                                        ; +0x47, 0x1401b47b7\njz      short loc_1401B47C8                                            ; +0x4e, 0x1401b47be\nmov     sil, 1                                                         ; +0x50, 0x1401b47c0\ncall    GJBaseGameLayer__pauseAudio                                    ; +0x53, 0x1401b47c3\nxor     dil, dil                                                       ; +0x58, 0x1401b47c8\nmov     [rbx+298h], dil                                                ; +0x5b, 0x1401b47cb\nmov     rax, [rbx+5E8h]                                                ; +0x62, 0x1401b47d2\ncmp     dword ptr [rax+89Ch], 1                                        ; +0x69, 0x1401b47d9\njz      short loc_1401B47F1                                            ; +0x70, 0x1401b47e0\nmov     rdx, [rbx+3D8h]                                                ; +0x72, 0x1401b47e2\nmov     rcx, rbx                                                       ; +0x79, 0x1401b47e9\ncall    EditorUI__toggleMode                                           ; +0x7c, 0x1401b47ec\nmov     rcx, rbx                                                       ; +0x81, 0x1401b47f1\ncall    EditorUI__deselectAll                                          ; +0x84, 0x1401b47f4\nmov     rcx, [rbx+5E8h]                                                ; +0x89, 0x1401b47f9\nmov     eax, [rcx+89Ch]                                                ; +0x90, 0x1401b4800\ncmp     eax, 1                                                         ; +0x96, 0x1401b4806\njnz     short loc_1401B4815                                            ; +0x99, 0x1401b4809\ncall    LevelEditorLayer__onPausePlaytest                              ; +0x9b, 0x1401b480b\njmp     loc_1401B48B8                                                  ; +0xa0, 0x1401b4810\ncmp     eax, 2                                                         ; +0xa5, 0x1401b4815\njnz     short loc_1401B4824                                            ; +0xa8, 0x1401b4818\ncall    LevelEditorLayer__onResumePlaytest                             ; +0xaa, 0x1401b481a\njmp     loc_1401B48B8                                                  ; +0xaf, 0x1401b481f\ncmp     eax, 0                                                         ; +0xb4, 0x1401b4824\njnz     loc_1401B48B8                                                  ; +0xb7, 0x1401b4827\nmov     rcx, [rcx+10C8h]                                               ; +0xbd, 0x1401b482d\nmov     rax, [rcx]                                                     ; +0xc4, 0x1401b4834\ncall    qword ptr [rax+0A8h]                                           ; +0xc7, 0x1401b4837\nmovss   dword ptr [rbx+678h], xmm0                                     ; +0xcd, 0x1401b483d\nmov     rcx, [rbx+5E8h]                                                ; +0xd5, 0x1401b4845\ncall    LevelEditorLayer__onPlaytest                                   ; +0xdc, 0x1401b484c\nmov     rax, [rbx+5E8h]                                                ; +0xe1, 0x1401b4851\ncmp     qword ptr [rax+3270h], 0                                       ; +0xe8, 0x1401b4858\njz      short loc_1401B48B5                                            ; +0xf0, 0x1401b4860\nmov     rcx, cs:qword_14090BFD0                                        ; +0xf2, 0x1401b4862\ntest    rcx, rcx                                                       ; +0xf9, 0x1401b4869\njnz     short loc_1401B48A0                                            ; +0xfc, 0x1401b486c\nmov     ecx, 6E8h; Size                                                ; +0xfe, 0x1401b486e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x103, 0x1401b4873\nmov     [rsp+38h+arg_0], rax                                           ; +0x108, 0x1401b4878\nmov     rcx, rax                                                       ; +0x10d, 0x1401b487d\ncall    GameManager__GameManager                                       ; +0x110, 0x1401b4880\nnop                                                                    ; +0x115, 0x1401b4885\nmov     cs:qword_14090BFD0, rax                                        ; +0x116, 0x1401b4886\nmov     rcx, [rax]                                                     ; +0x11d, 0x1401b488d\nmov     rdx, [rcx+48h]                                                 ; +0x120, 0x1401b4890\nmov     rcx, rax                                                       ; +0x124, 0x1401b4894\ncall    rdx                                                            ; +0x127, 0x1401b4897\nmov     rcx, cs:qword_14090BFD0                                        ; +0x129, 0x1401b4899\nlea     rdx, a0150; \"0150\"                                             ; +0x130, 0x1401b48a0\ncall    GameManager__getGameVariable                                   ; +0x137, 0x1401b48a7\ntest    al, al                                                         ; +0x13c, 0x1401b48ac\njz      short loc_1401B48B5                                            ; +0x13e, 0x1401b48ae\nmov     dil, 1                                                         ; +0x140, 0x1401b48b0\njmp     short loc_1401B48B8                                            ; +0x143, 0x1401b48b3\nxor     dil, dil                                                       ; +0x145, 0x1401b48b5\nmov     rax, [rbx+5E8h]                                                ; +0x148, 0x1401b48b8\ncmp     dword ptr [rax+89Ch], 1                                        ; +0x14f, 0x1401b48bf\nsetnz   dl                                                             ; +0x156, 0x1401b48c6\nmov     rcx, rbx                                                       ; +0x159, 0x1401b48c9\ncall    EditorUI__showUI                                               ; +0x15c, 0x1401b48cc\nmov     rcx, [rbx+418h]                                                ; +0x161, 0x1401b48d1\nmov     rax, [rcx]                                                     ; +0x168, 0x1401b48d8\ncall    qword ptr [rax+3B8h]                                           ; +0x16b, 0x1401b48db\nmov     r14, rax                                                       ; +0x171, 0x1401b48e1\nmov     rbp, [rax]                                                     ; +0x174, 0x1401b48e4\nmov     rcx, [rbx+5E8h]                                                ; +0x177, 0x1401b48e7\ncmp     dword ptr [rcx+89Ch], 1                                        ; +0x17e, 0x1401b48ee\njnz     short loc_1401B4906                                            ; +0x185, 0x1401b48f5\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x187, 0x1401b48f7\nlea     rdx, aGjPauseeditorb; \"GJ_pauseEditorBtn_001.png\"              ; +0x18d, 0x1401b48fd\njmp     short loc_1401B4913                                            ; +0x194, 0x1401b4904\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x196, 0x1401b4906\nlea     rdx, aGjPlayeditorbt; \"GJ_playEditorBtn_001.png\"               ; +0x19c, 0x1401b490c\nmov     rcx, rax                                                       ; +0x1a3, 0x1401b4913\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x1a6, 0x1401b4916\nmov     rdx, rax                                                       ; +0x1ac, 0x1401b491c\nmov     rcx, r14                                                       ; +0x1af, 0x1401b491f\ncall    qword ptr [rbp+3F0h]                                           ; +0x1b2, 0x1401b4922\nmov     rcx, [rbx+420h]                                                ; +0x1b8, 0x1401b4928\ncmp     byte ptr [rbx+67Dh], 0                                         ; +0x1bf, 0x1401b492f\nsetz    dl                                                             ; +0x1c6, 0x1401b4936\nmov     rax, [rcx]                                                     ; +0x1c9, 0x1401b4939\ncall    qword ptr [rax+150h]                                           ; +0x1cc, 0x1401b493c\nmov     rcx, rbx                                                       ; +0x1d2, 0x1401b4942\ncall    EditorUI__updatePlaybackBtn                                    ; +0x1d5, 0x1401b4945\ntest    dil, dil                                                       ; +0x1da, 0x1401b494a\njz      short loc_1401B495A                                            ; +0x1dd, 0x1401b494d\nmov     rdx, r15                                                       ; +0x1df, 0x1401b494f\nmov     rcx, rbx                                                       ; +0x1e2, 0x1401b4952\ncall    EditorUI__onPlaytest                                           ; +0x1e5, 0x1401b4955\ntest    sil, sil                                                       ; +0x1ea, 0x1401b495a\njz      short loc_1401B496D                                            ; +0x1ed, 0x1401b495d\nmov     rax, [rbx+5E8h]                                                ; +0x1ef, 0x1401b495f\nmov     byte ptr [rax+3866h], 1                                        ; +0x1f6, 0x1401b4966\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1fd, 0x1401b496d\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x202, 0x1401b4972\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x207, 0x1401b4977\nadd     rsp, 20h                                                       ; +0x20c, 0x1401b497c\npop     r15                                                            ; +0x210, 0x1401b4980\npop     r14                                                            ; +0x212, 0x1401b4982\npop     rdi                                                            ; +0x214, 0x1401b4984\nretn                                                                   ; +0x215, 0x1401b4985", "xrefs": ["EditorUI::onPlaytest @ 0x1401b4955", "EditorUI::handleAction @ 0x1401c1d9a", "EditorUI::init @ 0x1401aabd8", "<???> @ 0x14091a0fc"], "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"}