//
// LevelEditorLayer::pasteAttributeState from 0x1000c7be0 to 0x1000c7caf (207 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::onPaste @ 0x10030112b
// > EditorUI::onPasteState @ 0x1005b8674
//
// 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:20:36 +0000
//
__int64 __fastcall LevelEditorLayer::pasteAttributeState(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // rax
__int64 v5; // rsi
__int64 v6; // r15
double v7; // xmm0_8
__int64 v8; // rax
unsigned int *v9; // rax
_QWORD *v10; // r13
_QWORD *v11; // rbx
__int64 v12; // r12
v5 = *(_QWORD *)(a1 + 14120);
if ( v5 )
{
v6 = a1;
if ( a2 )
{
a1 = a2;
GameObject::duplicateAttributes(a2, v5);
*(_BYTE *)(a2 + 1148) = 1;
}
else if ( a3 )
{
v9 = *(unsigned int **)(a3 + 56);
if ( *v9 )
{
v10 = *((_QWORD **)v9 + 2);
v11 = &v10[*v9 - 1];
do
{
v12 = *v10;
if ( !*v10 )
break;
v5 = *(_QWORD *)(v6 + 14120);
a1 = *v10;
GameObject::duplicateAttributes(*v10, v5);
*(_BYTE *)(v12 + 1148) = 1;
++v10;
}
while ( v10 <= v11 );
}
}
*(_QWORD *)&v7 = GameManager::sharedState(a1, v5, a3).u64[0];
result = GameManager::getGameVariable(v8, "0156");
if ( !(_BYTE)result )
return LevelEditorLayer::pasteGroupState(v6, a2, a3, v7);
}
return result;
}