//
// EditorUI::applyOffset from 0x140202230 to 0x1402022bc (140 bytes)
//
// 3 xrefs:
// > EditorUI::onCreateObject @ 0x1401b2ce5
// > EditorUI::transformObject @ 0x1401ffe85
// > ??> @ 0x14091ae94
//
// 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 11:28:13 +0000
//
__int64 __fastcall EditorUI::applyOffset(__int64 a1, int *a2)
{
cocos2d::CCPoint *v4; // rax
__int64 v5; // rax
__int64 v6; // rbx
char v8; // [rsp+30h] [rbp+8h] BYREF
char v9; // [rsp+38h] [rbp+10h] BYREF
char v10; // [rsp+40h] [rbp+18h] BYREF
v4 = offsetForKey((cocos2d::CCPoint *)&v10, a2[259]);
GameToolbox::getRelativeOffset((cocos2d::CCPoint *)&v8, (__int64)a2, v4);
v5 = (*(__int64 (__fastcall **)(int *))(*(_QWORD *)a2 + 200LL))(a2);
cocos2d::CCPoint::operator+(v5, &v9, &v8);
(*(void (__fastcall **)(int *, char *))(*(_QWORD *)a2 + 184LL))(a2, &v9);
v6 = *(_QWORD *)(a1 + 1512);
GJBaseGameLayer::removeObjectFromSection(v6, a2);
return (*(__int64 (__fastcall **)(__int64, int *))(*(_QWORD *)v6 + 1192LL))(v6, a2);
}