{"type": "func", "start": 7092728, "end": 7093020, "name": "EditorUI::doPasteInPlace", "pseudocode": "// \n// EditorUI::doPasteInPlace from 0x6c39f8 to 0x6c3b1c (292 bytes)\n// \n// 2 xrefs:\n// > EditorUI::onPasteInPlace @ 0x6c3b20\n// > <???> @ 0x7a580\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\nvoid EditorUI::doPasteInPlace(EditorUI *a1, bool a2)\n{\n  GameManager *v4; // x0\n  char *v5; // x0\n  unsigned int *v6; // x2\n  int v7; // w1\n  _DWORD *v8; // [xsp+40h] [xbp+40h] BYREF\n\n  if ( *((_QWORD *)GameManager::sharedState()->m_editorClipboard.m_data.m_data - 3) )\n  {\n    v4 = GameManager::sharedState();\n    sub_D18D28(&v8, &v4->m_editorClipboard);\n    EditorUI::pasteObjects(a1, (const void **)&v8, a2, 0);\n    v5 = (char *)(v8 - 6);\n    if ( v8 - 6 != (_DWORD *)&qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v6 = v8 - 2;\n        do\n          v7 = __ldaxr(v6);\n        while ( __stlxr(v7 - 1, v6) );\n      }\n      else\n      {\n        v7 = *(v8 - 2);\n        *(v8 - 2) = v7 - 1;\n      }\n      if ( v7 <= 0 )\n        operator delete(v5);\n    }\n    EditorUI::updateButtons(a1);\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::doPasteInPlace from 0x6c39f8 to 0x6c3b1c (292 bytes)\n; \n; 2 xrefs:\n; > EditorUI::onPasteInPlace @ 0x6c3b20\n; > <???> @ 0x7a580\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x6c39f8\nMOV             X29, SP                                                ; +0x4, 0x6c39fc\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x6c3a00\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x6c3a04\nMOV             X20, X0                                                ; +0x10, 0x6c3a08\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x14, 0x6c3a0c\nUXTB            W22, W1                                                ; +0x18, 0x6c3a10\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x6c3a14\nLDR             X0, [X0]; this                                         ; +0x20, 0x6c3a18\nSTR             X0, [X29,#0x50+var_8]                                  ; +0x24, 0x6c3a1c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x28, 0x6c3a20\nLDR             X0, [X0,#0x1C8]                                        ; +0x2c, 0x6c3a24\nLDUR            X0, [X0,#-0x18]; this                                  ; +0x30, 0x6c3a28\nCBNZ            X0, loc_6C3A54                                         ; +0x34, 0x6c3a2c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x38, 0x6c3a30\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x3c, 0x6c3a34\nLDR             X0, [X19]                                              ; +0x40, 0x6c3a38\nCMP             X1, X0                                                 ; +0x44, 0x6c3a3c\nB.NE            loc_6C3AEC                                             ; +0x48, 0x6c3a40\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x4c, 0x6c3a44\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x50, 0x6c3a48\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x54, 0x6c3a4c\nRET                                                                    ; +0x58, 0x6c3a50\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x5c, 0x6c3a54\nADD             X21, X29, #0x50+var_10                                 ; +0x60, 0x6c3a58\nADD             X1, X0, #0x1C8                                         ; +0x64, 0x6c3a5c\nMOV             X0, X21                                                ; +0x68, 0x6c3a60\nBL              sub_D18D28                                             ; +0x6c, 0x6c3a64\nMOV             X0, X20; int                                           ; +0x70, 0x6c3a68\nMOV             X1, X21; int                                           ; +0x74, 0x6c3a6c\nMOV             W2, W22                                                ; +0x78, 0x6c3a70\nMOV             W3, #0                                                 ; +0x7c, 0x6c3a74\nBL              _ZN8EditorUI12pasteObjectsESsbb; EditorUI::pasteObjects(std::string,bool,bool) ; +0x80, 0x6c3a78\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x84, 0x6c3a7c\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x88, 0x6c3a80\nSUB             X0, X2, #0x18; p                                       ; +0x8c, 0x6c3a84\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x90, 0x6c3a88\nCMP             X0, X1                                                 ; +0x94, 0x6c3a8c\nB.NE            loc_6C3AA8                                             ; +0x98, 0x6c3a90\nMOV             X0, X20; this                                          ; +0x9c, 0x6c3a94\nBL              _ZN8EditorUI13updateButtonsEv; EditorUI::updateButtons(void) ; +0xa0, 0x6c3a98\nMOV             X0, X20; this                                          ; +0xa4, 0x6c3a9c\nBL              _ZN8EditorUI21updateObjectInfoLabelEv; EditorUI::updateObjectInfoLabel(void) ; +0xa8, 0x6c3aa0\nB               loc_6C3A30                                             ; +0xac, 0x6c3aa4\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xb0, 0x6c3aa8\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xb4, 0x6c3aac\nCBZ             X1, loc_6C3ADC                                         ; +0xb8, 0x6c3ab0\nSUB             X2, X2, #8                                             ; +0xbc, 0x6c3ab4\nLDAXR           W1, [X2]                                               ; +0xc0, 0x6c3ab8\nSUB             W3, W1, #1                                             ; +0xc4, 0x6c3abc\nSTLXR           W4, W3, [X2]                                           ; +0xc8, 0x6c3ac0\nCBNZ            W4, loc_6C3AB8                                         ; +0xcc, 0x6c3ac4\nCMP             W1, WZR                                                ; +0xd0, 0x6c3ac8\nB.GT            loc_6C3A94                                             ; +0xd4, 0x6c3acc\nADD             X1, X29, #0x50+var_18                                  ; +0xd8, 0x6c3ad0\nBL              j__ZdlPv; operator delete(void *)                      ; +0xdc, 0x6c3ad4\nB               loc_6C3A94                                             ; +0xe0, 0x6c3ad8\nLDUR            W1, [X2,#-8]                                           ; +0xe4, 0x6c3adc\nSUB             W3, W1, #1                                             ; +0xe8, 0x6c3ae0\nSTUR            W3, [X2,#-8]                                           ; +0xec, 0x6c3ae4\nB               loc_6C3AC8                                             ; +0xf0, 0x6c3ae8\nBL              .__stack_chk_fail                                      ; +0xf4, 0x6c3aec\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xf8, 0x6c3af0\nMOV             X19, X0                                                ; +0xfc, 0x6c3af4\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x100, 0x6c3af8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x104, 0x6c3afc\nSUB             X0, X0, #0x18                                          ; +0x108, 0x6c3b00\nCMP             X0, X1                                                 ; +0x10c, 0x6c3b04\nB.EQ            loc_6C3B14                                             ; +0x110, 0x6c3b08\nADD             X1, X29, #0x50+var_18                                  ; +0x114, 0x6c3b0c\nBL              sub_6865FC                                             ; +0x118, 0x6c3b10\nMOV             X0, X19                                                ; +0x11c, 0x6c3b14\nBL              _Unwind_Resume                                         ; +0x120, 0x6c3b18", "xrefs": ["EditorUI::onPasteInPlace @ 0x6c3b20", "<???> @ 0x7a580"], "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"}