{"type": "func", "start": 4295001984, "end": 4295002436, "name": "EditorUI::onPlaytest", "pseudocode": "// \n// EditorUI::onPlaytest from 0x100008780 to 0x100008944 (452 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onPlaytest @ 0x10000891c\n// > EditorUI::handleAction @ 0x10060b88b\n// > EditorUI::init @ 0x100006201\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 12:18:48 +0000\n// \n\nvoid __fastcall EditorUI::onPlaytest(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rax\n  __int64 v4; // rsi\n  int v5; // r13d\n  bool v6; // zf\n  __int64 v7; // rdi\n  int v8; // eax\n  __int64 v9; // rdi\n  __int64 v10; // rdx\n  __int64 v11; // rax\n  char GameVariable; // r15\n  __int64 v13; // r12\n  int v14; // r14d\n  __int64 v15; // rax\n  const char *v16; // rsi\n  __int64 v17; // rax\n\n  if ( *(_BYTE *)(a1 + 1588) )\n    return;\n  v3 = EditorSFXManager::sharedState(a1);\n  v4 = 210;\n  EditorSFXManager::playAction_1(v3, 210);\n  v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 1972LL);\n  if ( v5 == 1 )\n  {\n    *(_BYTE *)(a1 + 616) = 0;\n  }\n  else\n  {\n    GJBaseGameLayer::pauseAudio();\n    v6 = *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 1972LL) == 1;\n    *(_BYTE *)(a1 + 616) = 0;\n    if ( !v6 )\n    {\n      v4 = *(_QWORD *)(a1 + 936);\n      EditorUI::toggleMode(a1, v4);\n    }\n  }\n  EditorUI::deselectAll(a1);\n  v7 = *(_QWORD *)(a1 + 1440);\n  v8 = *(_DWORD *)(v7 + 1972);\n  if ( v8 )\n  {\n    if ( v8 == 2 )\n    {\n      LevelEditorLayer::onResumePlaytest();\n    }\n    else if ( v8 == 1 )\n    {\n      LevelEditorLayer::onPausePlaytest();\n    }\n    goto LABEL_13;\n  }\n  *(float *)(a1 + 1584) = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(v7 + 3920) + 168LL))(*(_QWORD *)(v7 + 3920));\n  v9 = *(_QWORD *)(a1 + 1440);\n  LevelEditorLayer::onPlaytest(v9);\n  if ( !*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 12432LL) )\n  {\nLABEL_13:\n    GameVariable = 0;\n    goto LABEL_14;\n  }\n  v11 = GameManager::sharedState(v9, v4, v10);\n  GameVariable = GameManager::getGameVariable(v11, \"0150\");\nLABEL_14:\n  EditorUI::showUI(a1, *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 1972LL) != 1);\n  v13 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1000) + 1072LL))(*(_QWORD *)(a1 + 1000));\n  v14 = *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 1972LL);\n  v15 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  v16 = \"GJ_playEditorBtn_001.png\";\n  if ( v14 == 1 )\n    v16 = \"GJ_pauseEditorBtn_001.png\";\n  v17 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v15, v16);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v13 + 1160LL))(v13, v17);\n  (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1008) + 344LL))(\n    *(_QWORD *)(a1 + 1008),\n    *(unsigned __int8 *)(a1 + 1589) ^ 1u);\n  EditorUI::updatePlaybackBtn(a1);\n  if ( GameVariable )\n    EditorUI::onPlaytest(a1, a2);\n  if ( v5 != 1 )\n    *(_BYTE *)(*(_QWORD *)(a1 + 1440) + 13806LL) = 1;\n}", "assembly": "; \n; EditorUI::onPlaytest from 0x100008780 to 0x100008944 (452 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onPlaytest @ 0x10000891c\n; > EditorUI::handleAction @ 0x10060b88b\n; > EditorUI::init @ 0x100006201\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 12:18:48 +0000\n; \ncmp     byte ptr [rdi+634h], 0                                         ; +0x0, 0x100008780\njnz     locret_100008943                                               ; +0x7, 0x100008787\npush    rbp                                                            ; +0xd, 0x10000878d\nmov     rbp, rsp                                                       ; +0xe, 0x10000878e\npush    r15                                                            ; +0x11, 0x100008791\npush    r14                                                            ; +0x13, 0x100008793\npush    r13                                                            ; +0x15, 0x100008795\npush    r12                                                            ; +0x17, 0x100008797\npush    rbx                                                            ; +0x19, 0x100008799\npush    rax                                                            ; +0x1a, 0x10000879a\nmov     rbx, rdi                                                       ; +0x1b, 0x10000879b\nmov     [rbp-30h], rsi                                                 ; +0x1e, 0x10000879e\ncall    EditorSFXManager__sharedState                                  ; +0x22, 0x1000087a2\nmov     rdi, rax                                                       ; +0x27, 0x1000087a7\nmov     esi, 0D2h                                                      ; +0x2a, 0x1000087aa\ncall    EditorSFXManager__playAction_1                                 ; +0x2f, 0x1000087af\nmov     rdi, [rbx+5A0h]                                                ; +0x34, 0x1000087b4\nmov     r13d, [rdi+7B4h]                                               ; +0x3b, 0x1000087bb\ncmp     r13d, 1                                                        ; +0x42, 0x1000087c2\njnz     short loc_1000087D1                                            ; +0x46, 0x1000087c6\nmov     byte ptr [rbx+268h], 0                                         ; +0x48, 0x1000087c8\njmp     short loc_1000087FC                                            ; +0x4f, 0x1000087cf\ncall    GJBaseGameLayer__pauseAudio                                    ; +0x51, 0x1000087d1\nmov     rax, [rbx+5A0h]                                                ; +0x56, 0x1000087d6\ncmp     dword ptr [rax+7B4h], 1                                        ; +0x5d, 0x1000087dd\nmov     byte ptr [rbx+268h], 0                                         ; +0x64, 0x1000087e4\njz      short loc_1000087FC                                            ; +0x6b, 0x1000087eb\nmov     rsi, [rbx+3A8h]                                                ; +0x6d, 0x1000087ed\nmov     rdi, rbx                                                       ; +0x74, 0x1000087f4\ncall    EditorUI__toggleMode                                           ; +0x77, 0x1000087f7\nmov     rdi, rbx                                                       ; +0x7c, 0x1000087fc\ncall    EditorUI__deselectAll                                          ; +0x7f, 0x1000087ff\nmov     rdi, [rbx+5A0h]                                                ; +0x84, 0x100008804\nmov     eax, [rdi+7B4h]                                                ; +0x8b, 0x10000880b\ntest    eax, eax                                                       ; +0x91, 0x100008811\njz      short loc_10000882D                                            ; +0x93, 0x100008813\ncmp     eax, 2                                                         ; +0x95, 0x100008815\njz      short loc_100008826                                            ; +0x98, 0x100008818\ncmp     eax, 1                                                         ; +0x9a, 0x10000881a\njnz     short loc_10000887B                                            ; +0x9d, 0x10000881d\ncall    LevelEditorLayer__onPausePlaytest                              ; +0x9f, 0x10000881f\njmp     short loc_10000887B                                            ; +0xa4, 0x100008824\ncall    LevelEditorLayer__onResumePlaytest                             ; +0xa6, 0x100008826\njmp     short loc_10000887B                                            ; +0xab, 0x10000882b\nmov     rdi, [rdi+0F50h]                                               ; +0xad, 0x10000882d\nmov     rax, [rdi]                                                     ; +0xb4, 0x100008834\ncall    qword ptr [rax+0A8h]                                           ; +0xb7, 0x100008837\nmovss   dword ptr [rbx+630h], xmm0                                     ; +0xbd, 0x10000883d\nmov     rdi, [rbx+5A0h]                                                ; +0xc5, 0x100008845\ncall    LevelEditorLayer__onPlaytest                                   ; +0xcc, 0x10000884c\nmov     rax, [rbx+5A0h]                                                ; +0xd1, 0x100008851\ncmp     qword ptr [rax+3090h], 0                                       ; +0xd8, 0x100008858\njz      short loc_10000887B                                            ; +0xe0, 0x100008860\ncall    GameManager__sharedState                                       ; +0xe2, 0x100008862\nlea     rsi, a0150; \"0150\"                                             ; +0xe7, 0x100008867\nmov     rdi, rax                                                       ; +0xee, 0x10000886e\ncall    GameManager__getGameVariable                                   ; +0xf1, 0x100008871\nmov     r15d, eax                                                      ; +0xf6, 0x100008876\njmp     short loc_10000887E                                            ; +0xf9, 0x100008879\nxor     r15d, r15d                                                     ; +0xfb, 0x10000887b\nmov     rax, [rbx+5A0h]                                                ; +0xfe, 0x10000887e\nxor     esi, esi                                                       ; +0x105, 0x100008885\ncmp     dword ptr [rax+7B4h], 1                                        ; +0x107, 0x100008887\nsetnz   sil                                                            ; +0x10e, 0x10000888e\nmov     rdi, rbx                                                       ; +0x112, 0x100008892\ncall    EditorUI__showUI                                               ; +0x115, 0x100008895\nmov     rdi, [rbx+3E8h]                                                ; +0x11a, 0x10000889a\nmov     rax, [rdi]                                                     ; +0x121, 0x1000088a1\ncall    qword ptr [rax+430h]                                           ; +0x124, 0x1000088a4\nmov     r12, rax                                                       ; +0x12a, 0x1000088aa\nmov     rax, [rbx+5A0h]                                                ; +0x12d, 0x1000088ad\nmov     r14d, [rax+7B4h]                                               ; +0x134, 0x1000088b4\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0x13b, 0x1000088bb\ncmp     r14d, 1                                                        ; +0x140, 0x1000088c0\nlea     rcx, aGjPauseeditorb; \"GJ_pauseEditorBtn_001.png\"              ; +0x144, 0x1000088c4\nlea     rsi, aGjPlayeditorbt; \"GJ_playEditorBtn_001.png\"               ; +0x14b, 0x1000088cb\ncmovz   rsi, rcx                                                       ; +0x152, 0x1000088d2\nmov     rdi, rax                                                       ; +0x156, 0x1000088d6\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0x159, 0x1000088d9\nmov     rcx, [r12]                                                     ; +0x15e, 0x1000088de\nmov     rdi, r12                                                       ; +0x162, 0x1000088e2\nmov     rsi, rax                                                       ; +0x165, 0x1000088e5\ncall    qword ptr [rcx+488h]                                           ; +0x168, 0x1000088e8\nmov     rdi, [rbx+3F0h]                                                ; +0x16e, 0x1000088ee\nmovzx   esi, byte ptr [rbx+635h]                                       ; +0x175, 0x1000088f5\nmov     rax, [rdi]                                                     ; +0x17c, 0x1000088fc\nxor     esi, 1                                                         ; +0x17f, 0x1000088ff\ncall    qword ptr [rax+158h]                                           ; +0x182, 0x100008902\nmov     rdi, rbx                                                       ; +0x188, 0x100008908\ncall    EditorUI__updatePlaybackBtn                                    ; +0x18b, 0x10000890b\ntest    r15b, r15b                                                     ; +0x190, 0x100008910\njz      short loc_100008921                                            ; +0x193, 0x100008913\nmov     rdi, rbx                                                       ; +0x195, 0x100008915\nmov     rsi, [rbp-30h]                                                 ; +0x198, 0x100008918\ncall    EditorUI__onPlaytest                                           ; +0x19c, 0x10000891c\ncmp     r13d, 1                                                        ; +0x1a1, 0x100008921\njz      short loc_100008935                                            ; +0x1a5, 0x100008925\nmov     rax, [rbx+5A0h]                                                ; +0x1a7, 0x100008927\nmov     byte ptr [rax+35EEh], 1                                        ; +0x1ae, 0x10000892e\nadd     rsp, 8                                                         ; +0x1b5, 0x100008935\npop     rbx                                                            ; +0x1b9, 0x100008939\npop     r12                                                            ; +0x1ba, 0x10000893a\npop     r13                                                            ; +0x1bc, 0x10000893c\npop     r14                                                            ; +0x1be, 0x10000893e\npop     r15                                                            ; +0x1c0, 0x100008940\npop     rbp                                                            ; +0x1c2, 0x100008942\nretn                                                                   ; +0x1c3, 0x100008943", "xrefs": ["EditorUI::onPlaytest @ 0x10000891c", "EditorUI::handleAction @ 0x10060b88b", "EditorUI::init @ 0x100006201"], "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"}