{"type": "func", "start": 7287276, "end": 7287642, "name": "EditorUI::doPasteObjects", "pseudocode": "// \n// EditorUI::doPasteObjects from 0x6f31ec to 0x6f335a (366 bytes)\n// \n// 3 xrefs:\n// > EditorUI::handleEditorAction @ 0x6f20a8\n// > EditorUI::onPaste @ 0x6f338e\n// > EditorCommandsPopup::onCommand @ 0x77a820\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:57:37 +0000\n// \n\nint __fastcall EditorUI::doPasteObjects(EditorUI *this, int a2)\n{\n  int result; // r0\n  int v5; // r5\n  int v6; // r3\n  int v7; // r5\n  GameManager *v8; // r0\n  int v9; // r3\n  int v10; // r0\n  cocos2d::CCArray *v11; // r8\n  cocos2d::CCDirector *v12; // r0\n  const cocos2d::CCPoint *v13; // r9\n  float v14[2]; // [sp+0h] [bp-34h] BYREF\n  _BYTE v15[8]; // [sp+8h] [bp-2Ch] BYREF\n  float v16[2]; // [sp+10h] [bp-24h] BYREF\n  _BYTE v17[8]; // [sp+18h] [bp-1Ch] BYREF\n  int v18[3]; // [sp+20h] [bp-14h] BYREF\n\n  result = GameManager::sharedState(this);\n  v5 = *(unsigned __int8 *)(result + 388);\n  if ( (v5 & 1) != 0 )\n    v6 = *(_DWORD *)(result + 392);\n  else\n    v6 = v5 >> 1;\n  if ( !v6 )\n    return result;\n  v7 = *(_DWORD *)(*((_DWORD *)this + 236) + 11868) - *(_DWORD *)(*((_DWORD *)this + 236) + 11872);\n  v8 = (GameManager *)GameManager::sharedState((GameManager *)result);\n  v9 = *((_DWORD *)v8 + 100) + v7;\n  if ( v9 > 80000 )\n  {\n    if ( !*(_BYTE *)(*(_DWORD *)(*((_DWORD *)this + 236) + 1408) + 985) )\n      return EditorUI::showMaxError((int)this);\n    goto LABEL_7;\n  }\n  if ( v9 > 40000 )\n  {\nLABEL_7:\n    if ( !*(_BYTE *)(*(_DWORD *)(*((_DWORD *)this + 236) + 1408) + 984) )\n      return EditorUI::showMaxBasicError((int)this);\n  }\n  v10 = GameManager::sharedState(v8);\n  std::string::basic_string(v18, v10 + 388);\n  v11 = EditorUI::pasteObjects((int)this, (unsigned __int8 *)v18, a2, 0);\n  std::string::~string((int)v18);\n  EditorBuildStats::noteAction(*((_DWORD *)this + 236) + 12104);\n  if ( v11 )\n  {\n    v12 = (cocos2d::CCDirector *)cocos2d::CCArray::count(v11);\n    if ( v12 )\n    {\n      cocos2d::CCDirector::sharedDirector(v12);\n      cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v14);\n      v13 = *(const cocos2d::CCPoint **)(*((_DWORD *)this + 236) + 2436);\n      cocos2d::CCPoint::CCPoint(\n        (cocos2d::CCPoint *)v17,\n        v14[0] * 0.5,\n        (float)(*((float *)this + 158) * 0.5) + (float)(v14[1] * 0.5));\n      cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v15, v13);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, (const cocos2d::CCPoint *)v15);\n      EditorUI::getGridSnappedPos((int)v17, (int)this, v16);\n      cocos2d::CCPoint::operator=(v15, v17);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const cocos2d::CCPoint *)v15);\n      EditorUI::repositionObjectsToCenter(this, v11, (int)v17);\n    }\n  }\n  EditorUI::updateButtons((cocos2d::CCArray **)this);\n  return EditorUI::updateObjectInfoLabel((cocos2d::CCArray **)this);\n}", "assembly": "; \n; EditorUI::doPasteObjects from 0x6f31ec to 0x6f335a (366 bytes)\n; \n; 3 xrefs:\n; > EditorUI::handleEditorAction @ 0x6f20a8\n; > EditorUI::onPaste @ 0x6f338e\n; > EditorCommandsPopup::onCommand @ 0x77a820\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:57:37 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x6f31ec\nSUB             SP, SP, #0x34                                          ; +0x4, 0x6f31f0\nLDR             R6, =(__stack_chk_guard_ptr - 0x6F31FC)                ; +0x6, 0x6f31f2\nMOV             R4, R0                                                 ; +0x8, 0x6f31f4\nMOV             R7, R1                                                 ; +0xa, 0x6f31f6\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x6f31f8\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x6f31fa\nLDR             R3, [R6]                                               ; +0x10, 0x6f31fc\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x12, 0x6f31fe\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x6f3200\nLDRB.W          R5, [R0,#0x184]                                        ; +0x18, 0x6f3204\nLSLS            R3, R5, #0x1F                                          ; +0x1c, 0x6f3208\nITE PL                                                                 ; +0x1e, 0x6f320a\nASRPL           R3, R5, #1                                             ; +0x20, 0x6f320c\nLDRMI.W         R3, [R0,#0x188]                                        ; +0x22, 0x6f320e\nCMP             R3, #0                                                 ; +0x26, 0x6f3212\nBEQ.W           loc_6F3348                                             ; +0x28, 0x6f3214\nLDR.W           R2, [R4,#0x3B0]                                        ; +0x2c, 0x6f3218\nMOVW            R1, #0x2E60                                            ; +0x30, 0x6f321c\nMOVW            R3, #0x2E5C                                            ; +0x34, 0x6f3220\nLDR             R3, [R2,R3]                                            ; +0x38, 0x6f3224\nLDR             R5, [R2,R1]                                            ; +0x3a, 0x6f3226\nSUBS            R5, R3, R5                                             ; +0x3c, 0x6f3228\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x3e, 0x6f322a\nLDR             R2, =0x13880                                           ; +0x42, 0x6f322e\nLDR.W           R3, [R0,#0x190]                                        ; +0x44, 0x6f3230\nADD             R3, R5                                                 ; +0x48, 0x6f3234\nCMP             R3, R2                                                 ; +0x4a, 0x6f3236\nBLE             loc_6F3266                                             ; +0x4c, 0x6f3238\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x4e, 0x6f323a\nLDR.W           R3, [R3,#0x580]                                        ; +0x52, 0x6f323e\nLDRB.W          R3, [R3,#0x3D9]                                        ; +0x56, 0x6f3242\nCBZ             R3, loc_6F325E                                         ; +0x5a, 0x6f3246\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x5c, 0x6f3248\nLDR.W           R3, [R3,#0x580]                                        ; +0x60, 0x6f324c\nLDRB.W          R3, [R3,#0x3D8]                                        ; +0x64, 0x6f3250\nCBNZ            R3, loc_6F326E                                         ; +0x68, 0x6f3254\nMOV             R0, R4; this                                           ; +0x6a, 0x6f3256\nBL              _ZN8EditorUI17showMaxBasicErrorEv; EditorUI::showMaxBasicError(void) ; +0x6c, 0x6f3258\nB               loc_6F3348                                             ; +0x70, 0x6f325c\nMOV             R0, R4; this                                           ; +0x72, 0x6f325e\nBL              _ZN8EditorUI12showMaxErrorEv; EditorUI::showMaxError(void) ; +0x74, 0x6f3260\nB               loc_6F3348                                             ; +0x78, 0x6f3264\nMOVW            R2, #0x9C40                                            ; +0x7a, 0x6f3266\nCMP             R3, R2                                                 ; +0x7e, 0x6f326a\nBGT             loc_6F3248                                             ; +0x80, 0x6f326c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x82, 0x6f326e\nADD             R5, SP, #0x34+var_14                                   ; +0x86, 0x6f3272\nADD.W           R1, R0, #0x184                                         ; +0x88, 0x6f3274\nMOV             R0, R5                                                 ; +0x8c, 0x6f3278\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x8e, 0x6f327a\nMOV             R0, R4; int                                            ; +0x92, 0x6f327e\nMOV             R1, R5; int                                            ; +0x94, 0x6f3280\nMOV             R2, R7                                                 ; +0x96, 0x6f3282\nMOVS            R3, #0                                                 ; +0x98, 0x6f3284\nBL              _ZN8EditorUI12pasteObjectsENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEbb; EditorUI::pasteObjects(std::string,bool,bool) ; +0x9a, 0x6f3286\nB               loc_6F3296                                             ; +0x9e, 0x6f328a\nMOV             R0, R5                                                 ; +0xa0, 0x6f328c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xa2, 0x6f328e\nBL              __cxa_end_cleanup                                      ; +0xa6, 0x6f3292\nMOV             R8, R0                                                 ; +0xaa, 0x6f3296\nMOV             R0, R5                                                 ; +0xac, 0x6f3298\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xae, 0x6f329a\nLDR.W           R0, [R4,#0x3B0]                                        ; +0xb2, 0x6f329e\nADD.W           R0, R0, #0x2F40                                        ; +0xb6, 0x6f32a2\nADDS            R0, #8; this                                           ; +0xba, 0x6f32a6\nBL              _ZN16EditorBuildStats10noteActionEv; EditorBuildStats::noteAction(void) ; +0xbc, 0x6f32a8\nCMP.W           R8, #0                                                 ; +0xc0, 0x6f32ac\nBEQ             loc_6F32BA                                             ; +0xc4, 0x6f32b0\nMOV             R0, R8; this                                           ; +0xc6, 0x6f32b2\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc8, 0x6f32b4\nCBNZ            R0, loc_6F32C8                                         ; +0xcc, 0x6f32b8\nMOV             R0, R4; this                                           ; +0xce, 0x6f32ba\nBL              _ZN8EditorUI13updateButtonsEv; EditorUI::updateButtons(void) ; +0xd0, 0x6f32bc\nMOV             R0, R4; this                                           ; +0xd4, 0x6f32c0\nBL              _ZN8EditorUI21updateObjectInfoLabelEv; EditorUI::updateObjectInfoLabel(void) ; +0xd6, 0x6f32c2\nB               loc_6F3348                                             ; +0xda, 0x6f32c6\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0xdc, 0x6f32c8\nADD             R5, SP, #0x34+var_1C                                   ; +0xe0, 0x6f32cc\nADD             R7, SP, #0x34+var_2C                                   ; +0xe2, 0x6f32ce\nMOV             R1, R0                                                 ; +0xe4, 0x6f32d0\nMOV             R0, SP; this                                           ; +0xe6, 0x6f32d2\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0xe8, 0x6f32d4\nVMOV.F32        S14, #0.5                                              ; +0xec, 0x6f32d8\nVLDR            S13, [SP,#0x34+var_34]                                 ; +0xf0, 0x6f32dc\nMOV             R0, R5; this                                           ; +0xf4, 0x6f32e0\nLDR.W           R3, [R4,#0x3B0]                                        ; +0xf6, 0x6f32e2\nVLDR            S15, [R4,#0x278]                                       ; +0xfa, 0x6f32e6\nLDR.W           R9, [R3,#0x984]                                        ; +0xfe, 0x6f32ea\nVMUL.F32        S13, S13, S14                                          ; +0x102, 0x6f32ee\nVMUL.F32        S15, S15, S14                                          ; +0x106, 0x6f32f2\nVMOV            R1, S13; float                                         ; +0x10a, 0x6f32f6\nVLDR            S13, [SP,#0x34+var_30]                                 ; +0x10e, 0x6f32fa\nVMLA.F32        S15, S13, S14                                          ; +0x112, 0x6f32fe\nVMOV            R2, S15; float                                         ; +0x116, 0x6f3302\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x11a, 0x6f3306\nMOV             R1, R9; cocos2d::CCPoint *                             ; +0x11e, 0x6f330a\nADD.W           R9, SP, #0x34+var_24                                   ; +0x120, 0x6f330c\nMOV             R2, R5                                                 ; +0x124, 0x6f3310\nMOV             R0, R7; this                                           ; +0x126, 0x6f3312\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x128, 0x6f3314\nMOV             R1, R7; cocos2d::CCPoint *                             ; +0x12c, 0x6f3318\nMOV             R0, R9; this                                           ; +0x12e, 0x6f331a\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x130, 0x6f331c\nMOV             R2, R9                                                 ; +0x134, 0x6f3320\nMOV             R0, R5                                                 ; +0x136, 0x6f3322\nMOV             R1, R4                                                 ; +0x138, 0x6f3324\nBL              _ZN8EditorUI17getGridSnappedPosEN7cocos2d7CCPointE; EditorUI::getGridSnappedPos(cocos2d::CCPoint) ; +0x13a, 0x6f3326\nMOV             R1, R5                                                 ; +0x13e, 0x6f332a\nMOV             R0, R7                                                 ; +0x140, 0x6f332c\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x142, 0x6f332e\nMOV             R1, R7; cocos2d::CCPoint *                             ; +0x146, 0x6f3332\nMOV             R0, R5; this                                           ; +0x148, 0x6f3334\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x14a, 0x6f3336\nMOV             R0, R4                                                 ; +0x14e, 0x6f333a\nMOV             R1, R8                                                 ; +0x150, 0x6f333c\nMOV             R2, R5                                                 ; +0x152, 0x6f333e\nMOVS            R3, #0                                                 ; +0x154, 0x6f3340\nBL              _ZN8EditorUI25repositionObjectsToCenterEPN7cocos2d7CCArrayENS0_7CCPointEb; EditorUI::repositionObjectsToCenter(cocos2d::CCArray *,cocos2d::CCPoint,bool) ; +0x156, 0x6f3342\nB               loc_6F32BA                                             ; +0x15a, 0x6f3346\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x15c, 0x6f3348\nLDR             R3, [R6]                                               ; +0x15e, 0x6f334a\nCMP             R2, R3                                                 ; +0x160, 0x6f334c\nBEQ             loc_6F3354                                             ; +0x162, 0x6f334e\nBLX             __stack_chk_fail                                       ; +0x164, 0x6f3350\nADD             SP, SP, #0x34 ; '4'                                    ; +0x168, 0x6f3354\nPOP.W           {R4-R9,PC}                                             ; +0x16a, 0x6f3356", "xrefs": ["EditorUI::handleEditorAction @ 0x6f20a8", "EditorUI::onPaste @ 0x6f338e", "EditorCommandsPopup::onCommand @ 0x77a820"], "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"}