{"type": "func", "start": 4727676, "end": 4728124, "name": "EditorUI::onPlayback", "pseudocode": "// \n// EditorUI::onPlayback from 0x48237c to 0x48253c (448 bytes)\n// \n// 2 xrefs:\n// > EditorUI::onStopPlaytest @ 0x48a054\n// > EditorUI::handleEditorAction @ 0x6f1c4c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n// \n\nint __fastcall EditorUI::onPlayback(int this, cocos2d::CCObject *a2)\n{\n  int v2; // r4\n  int v3; // r11\n  int v4; // r1\n  int v5; // r1\n  int v6; // r5\n  _DWORD *SelectedEditorOrder; // r8\n  _DWORD *SelectedOrderChannel; // r0\n  int v9; // r0\n  int v10; // r3\n  int v11; // r0\n  int v12; // r3\n  float v13; // r1\n  int v14; // r0\n  int v15; // [sp+14h] [bp-20h]\n  int v16; // [sp+14h] [bp-20h]\n  float v17[2]; // [sp+1Ch] [bp-18h] BYREF\n  _BYTE v18[8]; // [sp+24h] [bp-10h] BYREF\n\n  v2 = this;\n  if ( !*(_BYTE *)(this + 1052) )\n  {\n    this = *(_DWORD *)(this + 944);\n    if ( !*(_DWORD *)(this + 1428) )\n    {\n      GJBaseGameLayer::preResumeGame((GJBaseGameLayer *)this);\n      *(_BYTE *)(*(_DWORD *)(v2 + 944) + 1372) = 0;\n      if ( *(_BYTE *)(v2 + 456) )\n      {\n        v3 = 0;\n      }\n      else\n      {\n        v3 = 1;\n        GJBaseGameLayer::pauseAudio(*(GJBaseGameLayer **)(v2 + 944));\n      }\n      LevelEditorLayer::resetPlayback(*(LevelEditorLayer **)(v2 + 944));\n      if ( *(_BYTE *)(v2 + 456) )\n      {\n        LevelEditorLayer::stopPlayback(*(LevelEditorLayer **)(v2 + 944));\n        *(_BYTE *)(*(_DWORD *)(v2 + 944) + 11812) = 1;\n      }\n      else\n      {\n        DrawGridLayer::updateTimeMarkers(\n          *(DrawGridLayer **)(*(_DWORD *)(v2 + 944) + 11880),\n          v4,\n          *(GJBaseGameLayer **)(v2 + 944),\n          11880);\n        cocos2d::CCNode::convertToNodeSpace(\n          (cocos2d::CCNode *)v17,\n          *(const cocos2d::CCPoint **)(*(_DWORD *)(v2 + 944) + 2436));\n        v5 = *(_DWORD *)(v2 + 944);\n        if ( (float)(v17[0] + 30.0) < 50.0 )\n          v17[0] = 0.0;\n        v6 = *(_DWORD *)(v5 + 12212);\n        if ( v6 )\n        {\n          LevelEditorLayer::getSelectedEffectPos((LevelEditorLayer *)v18, v5);\n          cocos2d::CCPoint::operator=(v17, v18);\n          SelectedEditorOrder = LevelEditorLayer::getSelectedEditorOrder(*(LevelEditorLayer **)(v2 + 944));\n          SelectedOrderChannel = LevelEditorLayer::getSelectedOrderChannel(*(LevelEditorLayer **)(v2 + 944));\n          *(_DWORD *)(*(_DWORD *)(v2 + 944) + 12224) = SelectedEditorOrder;\n          v6 = (int)SelectedOrderChannel;\n        }\n        else\n        {\n          SelectedEditorOrder = nullptr;\n        }\n        v15 = *(_DWORD *)(*(_DWORD *)(v2 + 944) + 11880);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (const cocos2d::CCPoint *)v17);\n        v9 = DrawGridLayer::timeForPos(v15, (const cocos2d::CCPoint *)v18, (int)SelectedEditorOrder, v6, 0, 1, 0, 0);\n        v10 = *(_DWORD *)(v2 + 944);\n        *(_DWORD *)(v2 + 496) = v9;\n        v16 = *(_DWORD *)(v10 + 11880);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (const cocos2d::CCPoint *)v17);\n        v11 = DrawGridLayer::timeForPos(v16, (const cocos2d::CCPoint *)v18, (int)SelectedEditorOrder, v6, 0, 0, 0, 0);\n        v12 = *(_DWORD *)(v2 + 944);\n        v13 = *(float *)(v2 + 496);\n        *(_DWORD *)(v2 + 500) = v11;\n        DrawGridLayer::updateMusicGuideTime(*(float **)(v12 + 11880), v13);\n      }\n      *(_BYTE *)(v2 + 456) ^= 1u;\n      this = EditorUI::updatePlaybackBtn((EditorUI *)v2);\n      if ( *(_BYTE *)(v2 + 456) )\n      {\n        v14 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)this);\n        FMODAudioEngine::updateReverb(v14, 0, 0);\n        LevelEditorLayer::updateGameObjects(*(LevelEditorLayer **)(v2 + 944));\n        this = GJBaseGameLayer::processQueuedAudioTriggers(*(GJBaseGameLayer **)(v2 + 944));\n      }\n      if ( v3 )\n        *(_BYTE *)(*(_DWORD *)(v2 + 944) + 11570) = 1;\n    }\n  }\n  return this;\n}", "assembly": "; \n; EditorUI::onPlayback from 0x48237c to 0x48253c (448 bytes)\n; \n; 2 xrefs:\n; > EditorUI::onStopPlaytest @ 0x48a054\n; > EditorUI::handleEditorAction @ 0x6f1c4c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x482386)                ; +0x0, 0x48237c\nPUSH.W          {R4-R11,LR}                                            ; +0x2, 0x48237e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x482382\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x482384\nSUB             SP, SP, #0x34                                          ; +0xa, 0x482386\nMOV             R4, R0                                                 ; +0xc, 0x482388\nLDR             R2, [R3]                                               ; +0xe, 0x48238a\nSTR             R3, [SP,#0x34+var_24]                                  ; +0x10, 0x48238c\nSTR             R2, [SP,#0x34+var_8]                                   ; +0x12, 0x48238e\nLDRB.W          R2, [R0,#0x41C]                                        ; +0x14, 0x482390\nCMP             R2, #0                                                 ; +0x18, 0x482394\nBNE.W           loc_482528                                             ; +0x1a, 0x482396\nLDR.W           R0, [R0,#0x3B0]; this                                  ; +0x1e, 0x48239a\nLDR.W           R5, [R0,#0x594]                                        ; +0x22, 0x48239e\nCMP             R5, #0                                                 ; +0x26, 0x4823a2\nBNE.W           loc_482528                                             ; +0x28, 0x4823a4\nBL              _ZN15GJBaseGameLayer13preResumeGameEv; GJBaseGameLayer::preResumeGame(void) ; +0x2c, 0x4823a8\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x30, 0x4823ac\nSTRB.W          R5, [R3,#0x55C]                                        ; +0x34, 0x4823b0\nLDRB.W          R3, [R4,#0x1C8]                                        ; +0x38, 0x4823b4\nCBNZ            R3, loc_4823C8                                         ; +0x3c, 0x4823b8\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x3e, 0x4823ba\nMOV.W           R11, #1                                                ; +0x42, 0x4823be\nBL              _ZN15GJBaseGameLayer10pauseAudioEv; GJBaseGameLayer::pauseAudio(void) ; +0x46, 0x4823c2\nB               loc_4823CA                                             ; +0x4a, 0x4823c6\nMOV             R11, R5                                                ; +0x4c, 0x4823c8\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x4e, 0x4823ca\nBL              _ZN16LevelEditorLayer13resetPlaybackEv; LevelEditorLayer::resetPlayback(void) ; +0x52, 0x4823ce\nLDRB.W          R3, [R4,#0x1C8]                                        ; +0x56, 0x4823d2\nCBZ             R3, loc_4823EE                                         ; +0x5a, 0x4823d6\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x5c, 0x4823d8\nBL              _ZN16LevelEditorLayer12stopPlaybackEv; LevelEditorLayer::stopPlayback(void) ; +0x60, 0x4823dc\nLDR.W           R2, [R4,#0x3B0]                                        ; +0x64, 0x4823e0\nMOVW            R3, #0x2E24                                            ; +0x68, 0x4823e4\nMOVS            R1, #1                                                 ; +0x6c, 0x4823e8\nSTRB            R1, [R2,R3]                                            ; +0x6e, 0x4823ea\nB               loc_4824E2                                             ; +0x70, 0x4823ec\nLDR.W           R2, [R4,#0x3B0]                                        ; +0x72, 0x4823ee\nMOVW            R3, #0x2E68                                            ; +0x76, 0x4823f2\nADD             R6, SP, #0x34+var_18                                   ; +0x7a, 0x4823f6\nADD             R7, SP, #0x34+var_10                                   ; +0x7c, 0x4823f8\nLDR             R0, [R2,R3]; this                                      ; +0x7e, 0x4823fa\nBL              _ZN13DrawGridLayer17updateTimeMarkersEv; DrawGridLayer::updateTimeMarkers(void) ; +0x80, 0x4823fc\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x84, 0x482400\nLDR             R2, =(flt_D2B938 - 0x482410)                           ; +0x88, 0x482404\nMOV             R0, R6; this                                           ; +0x8a, 0x482406\nLDR.W           R1, [R3,#0x984]; cocos2d::CCPoint *                    ; +0x8c, 0x482408\nADD             R2, PC; flt_D2B938                                     ; +0x90, 0x48240c\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x92, 0x48240e\nVMOV.F32        S14, #30.0                                             ; +0x96, 0x482412\nVLDR            S15, [SP,#0x34+var_18]                                 ; +0x9a, 0x482416\nLDR.W           R1, [R4,#0x3B0]                                        ; +0x9e, 0x48241a\nVADD.F32        S15, S15, S14                                          ; +0xa2, 0x48241e\nVLDR            S14, =50.0                                             ; +0xa6, 0x482422\nVCMPE.F32       S15, S14                                               ; +0xaa, 0x482426\nVMRS            APSR_nzcv, FPSCR                                       ; +0xae, 0x48242a\nITT MI                                                                 ; +0xb2, 0x48242e\nMOVMI           R3, #0                                                 ; +0xb4, 0x482430\nSTRMI           R3, [SP,#0x34+var_18]                                  ; +0xb6, 0x482432\nMOVW            R3, #0x2FB4                                            ; +0xb8, 0x482434\nLDR             R5, [R1,R3]                                            ; +0xbc, 0x482438\nCBZ             R5, loc_48246C                                         ; +0xbe, 0x48243a\nMOV             R0, R7; this                                           ; +0xc0, 0x48243c\nBL              _ZN16LevelEditorLayer20getSelectedEffectPosEv; LevelEditorLayer::getSelectedEffectPos(void) ; +0xc2, 0x48243e\nMOV             R1, R7                                                 ; +0xc6, 0x482442\nMOV             R0, R6                                                 ; +0xc8, 0x482444\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xca, 0x482446\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0xce, 0x48244a\nBL              _ZN16LevelEditorLayer22getSelectedEditorOrderEv; LevelEditorLayer::getSelectedEditorOrder(void) ; +0xd2, 0x48244e\nMOV             R8, R0                                                 ; +0xd6, 0x482452\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0xd8, 0x482454\nBL              _ZN16LevelEditorLayer23getSelectedOrderChannelEv; LevelEditorLayer::getSelectedOrderChannel(void) ; +0xdc, 0x482458\nLDR.W           R3, [R4,#0x3B0]                                        ; +0xe0, 0x48245c\nADD.W           R3, R3, #0x2FC0                                        ; +0xe4, 0x482460\nSTR.W           R8, [R3]                                               ; +0xe8, 0x482464\nMOV             R5, R0                                                 ; +0xec, 0x482468\nB               loc_48246E                                             ; +0xee, 0x48246a\nMOV             R8, R5                                                 ; +0xf0, 0x48246c\nLDR.W           R3, [R4,#0x3B0]                                        ; +0xf2, 0x48246e\nMOVW            R10, #0x2E68                                           ; +0xf6, 0x482472\nADD.W           R9, SP, #0x34+var_18                                   ; +0xfa, 0x482476\nMOV             R0, R7; this                                           ; +0xfe, 0x48247a\nMOVS            R6, #0                                                 ; +0x100, 0x48247c\nLDR.W           R3, [R3,R10]                                           ; +0x102, 0x48247e\nMOV             R1, R9; cocos2d::CCPoint *                             ; +0x106, 0x482482\nSTR             R3, [SP,#0x34+var_20]                                  ; +0x108, 0x482484\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x10a, 0x482486\nLDR             R3, [SP,#0x34+var_20]                                  ; +0x10e, 0x48248a\nMOVS            R2, #1                                                 ; +0x110, 0x48248c\nMOV             R1, R7                                                 ; +0x112, 0x48248e\nSTR             R2, [SP,#0x34+var_30]                                  ; +0x114, 0x482490\nSTR             R6, [SP,#0x34+var_34]                                  ; +0x116, 0x482492\nMOV             R2, R8                                                 ; +0x118, 0x482494\nMOV             R0, R3                                                 ; +0x11a, 0x482496\nSTR             R6, [SP,#0x34+var_2C]                                  ; +0x11c, 0x482498\nMOV             R3, R5                                                 ; +0x11e, 0x48249a\nSTR             R6, [SP,#0x34+var_28]                                  ; +0x120, 0x48249c\nBL              _ZN13DrawGridLayer10timeForPosEN7cocos2d7CCPointEiibbbi; DrawGridLayer::timeForPos(cocos2d::CCPoint,int,int,bool,bool,bool,int) ; +0x122, 0x48249e\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x126, 0x4824a2\nMOV             R1, R9; cocos2d::CCPoint *                             ; +0x12a, 0x4824a6\nSTR.W           R0, [R4,#0x1F0]                                        ; +0x12c, 0x4824a8\nMOV             R0, R7; this                                           ; +0x130, 0x4824ac\nLDR.W           R3, [R3,R10]                                           ; +0x132, 0x4824ae\nSTR             R3, [SP,#0x34+var_20]                                  ; +0x136, 0x4824b2\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x138, 0x4824b4\nLDR             R3, [SP,#0x34+var_20]                                  ; +0x13c, 0x4824b8\nMOV             R1, R7                                                 ; +0x13e, 0x4824ba\nSTR             R6, [SP,#0x34+var_34]                                  ; +0x140, 0x4824bc\nMOV             R2, R8                                                 ; +0x142, 0x4824be\nSTR             R6, [SP,#0x34+var_30]                                  ; +0x144, 0x4824c0\nMOV             R0, R3                                                 ; +0x146, 0x4824c2\nSTR             R6, [SP,#0x34+var_2C]                                  ; +0x148, 0x4824c4\nMOV             R3, R5                                                 ; +0x14a, 0x4824c6\nSTR             R6, [SP,#0x34+var_28]                                  ; +0x14c, 0x4824c8\nBL              _ZN13DrawGridLayer10timeForPosEN7cocos2d7CCPointEiibbbi; DrawGridLayer::timeForPos(cocos2d::CCPoint,int,int,bool,bool,bool,int) ; +0x14e, 0x4824ca\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x152, 0x4824ce\nLDR.W           R1, [R4,#0x1F0]; float                                 ; +0x156, 0x4824d2\nSTR.W           R0, [R4,#0x1F4]                                        ; +0x15a, 0x4824d6\nLDR.W           R0, [R3,R10]; this                                     ; +0x15e, 0x4824da\nBL              _ZN13DrawGridLayer20updateMusicGuideTimeEf; DrawGridLayer::updateMusicGuideTime(float) ; +0x162, 0x4824de\nLDRB.W          R3, [R4,#0x1C8]                                        ; +0x166, 0x4824e2\nMOV             R0, R4; this                                           ; +0x16a, 0x4824e6\nEOR.W           R3, R3, #1                                             ; +0x16c, 0x4824e8\nSTRB.W          R3, [R4,#0x1C8]                                        ; +0x170, 0x4824ec\nBL              _ZN8EditorUI17updatePlaybackBtnEv; EditorUI::updatePlaybackBtn(void) ; +0x174, 0x4824f0\nLDRB.W          R3, [R4,#0x1C8]                                        ; +0x178, 0x4824f4\nCBZ             R3, loc_482516                                         ; +0x17c, 0x4824f8\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x17e, 0x4824fa\nMOVS            R1, #0                                                 ; +0x182, 0x4824fe\nMOV             R2, R1                                                 ; +0x184, 0x482500\nBL              _ZN15FMODAudioEngine12updateReverbE16FMODReverbPresetb; FMODAudioEngine::updateReverb(FMODReverbPreset,bool) ; +0x186, 0x482502\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x18a, 0x482506\nBL              _ZN16LevelEditorLayer17updateGameObjectsEv; LevelEditorLayer::updateGameObjects(void) ; +0x18e, 0x48250a\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x192, 0x48250e\nBL              _ZN15GJBaseGameLayer26processQueuedAudioTriggersEv; GJBaseGameLayer::processQueuedAudioTriggers(void) ; +0x196, 0x482512\nCMP.W           R11, #0                                                ; +0x19a, 0x482516\nBEQ             loc_482528                                             ; +0x19e, 0x48251a\nLDR.W           R2, [R4,#0x3B0]                                        ; +0x1a0, 0x48251c\nMOVW            R3, #0x2D32                                            ; +0x1a4, 0x482520\nMOVS            R1, #1                                                 ; +0x1a8, 0x482524\nSTRB            R1, [R2,R3]                                            ; +0x1aa, 0x482526\nLDR             R3, [SP,#0x34+var_24]                                  ; +0x1ac, 0x482528\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x1ae, 0x48252a\nLDR             R3, [R3]                                               ; +0x1b0, 0x48252c\nCMP             R2, R3                                                 ; +0x1b2, 0x48252e\nBEQ             loc_482536                                             ; +0x1b4, 0x482530\nBLX             __stack_chk_fail                                       ; +0x1b6, 0x482532\nADD             SP, SP, #0x34 ; '4'                                    ; +0x1ba, 0x482536\nPOP.W           {R4-R11,PC}                                            ; +0x1bc, 0x482538", "xrefs": ["EditorUI::onStopPlaytest @ 0x48a054", "EditorUI::handleEditorAction @ 0x6f1c4c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}