// // EditorUI::doPasteObjects from 0x1005b7ec0 to 0x1005b80e4 (548 bytes) // // 3 xrefs: // > EditorUI::onPaste @ 0x1005b7e9e // > EditorUI::handleEditorAction @ 0x10060c035 // > EditorCommandsPopup::onCommand @ 0x1008dee7a // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:32:42 +0000 // void __fastcall EditorUI::doPasteObjects(__int64 a1, unsigned __int8 a2) { __int64 v3; // rax unsigned int v4; // ecx int v5; // r15d int v6; // r15d __int64 v7; // rax __int64 v8; // rax std::string *v9; // rsi __int64 v10; // r14 __int64 v11; // rax __int64 v12; // r15 double v13; // xmm0_8 __m128 v14; // xmm2 float v15; // xmm1_4 __int64 v16; // rdx __int64 v17; // [rsp+0h] [rbp-60h] BYREF __int64 v18; // [rsp+8h] [rbp-58h] BYREF std::string v19; // [rsp+10h] [rbp-50h] BYREF __int64 v20; // [rsp+28h] [rbp-38h] BYREF unsigned int v21[12]; // [rsp+30h] [rbp-30h] BYREF v3 = GameManager::sharedState(); v4 = *(unsigned __int8 *)(v3 + 512); if ( (v4 & 1) != 0 ) { if ( !*(_QWORD *)(v3 + 520) ) return; } else if ( !(v4 >> 1) ) { return; } v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 14272LL) - *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 14276LL); v6 = *(_DWORD *)(GameManager::sharedState() + 536) + v5; if ( v6 >= 80001 ) { v7 = *(_QWORD *)(*(_QWORD *)(a1 + 1440) + 1936LL); if ( !*(_BYTE *)(v7 + 1201) ) { EditorUI::showMaxError(a1); return; } LABEL_10: if ( !*(_BYTE *)(v7 + 1200) ) { EditorUI::showMaxBasicError(a1); return; } goto LABEL_11; } if ( v6 >= 40001 ) { v7 = *(_QWORD *)(*(_QWORD *)(a1 + 1440) + 1936LL); goto LABEL_10; } LABEL_11: v8 = GameManager::sharedState(); if ( (*(_BYTE *)(v8 + 512) & 1) != 0 ) sub_10001AD30(&v19, *(const void **)(v8 + 528), *(_QWORD *)(v8 + 520)); else v19 = *(std::string *)(v8 + 512); v9 = &v19; v10 = EditorUI::pasteObjects((_QWORD *)a1, &v19, a2, 0); if ( (*(_BYTE *)&v19.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v19.__r_.__value_.__l.__data_); EditorBuildStats::noteAction(*(_QWORD *)(a1 + 1440) + 14704LL); if ( v10 ) { if ( (unsigned int)sub_1007FEF90(v10) ) { v11 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v20, v11); v12 = *(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL); *(_QWORD *)&v13 = (unsigned int)v20; *(float *)&v13 = *(float *)&v20 * 0.5; v14 = (__m128)HIDWORD(v20); v14.f32[0] = *((float *)&v20 + 1) * 0.5; v15 = (float)(0.5 * *(float *)(a1 + 856)) + (float)(*((float *)&v20 + 1) * 0.5); sub_100278250((float *)v21, *(float *)&v20 * 0.5, v15); cocos2d::CCNode::convertToNodeSpace((double *)&v17, v12, v21); sub_1002782D0(&v18, &v17); EditorUI::getGridSnappedPos( (__int64)v21, a1, (unsigned int *)&v18, v13, COERCE_DOUBLE((unsigned __int64)LODWORD(v15)), v14); sub_100278300(&v17, v21); sub_1002782D0(v21, &v17); v9 = (std::string *)v10; EditorUI::repositionObjectsToCenter(a1, v10, v21, 0); } } EditorUI::updateButtons(a1); EditorUI::updateObjectInfoLabel(a1, (__int64)v9, v16); }
GD Web Decomp Icon

GD Web Decomp

Raw Source