//
// EditorUI::transformObject from 0x10060f850 to 0x10060fe1d (1485 bytes)
//
// 4 xrefs:
// > EditorUI::transformObjectCall_1 @ 0x10060ef6a
// > EditorUI::transformObjectCall_1 @ 0x10060f00c
// > sub_10060F130 @ 0x10060f201
// > sub_10060F300 @ 0x10060f3d1
//
// 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:34:34 +0000
//
void __fastcall EditorUI::transformObject(__int64 a1, int *a2, int a3, int a4, __m128 a5)
{
bool v6; // r14
char v7; // r13
char v8; // al
unsigned __int64 *v9; // rax
float v10; // xmm0_4
char v11; // cl
int v12; // eax
unsigned __int8 v13; // al
unsigned __int8 v14; // al
float v15; // xmm0_4
__int64 v16; // rax
double (__fastcall **v17)(int *); // rax
__int64 v18; // r14
__m128 v19; // xmm0
float v20; // xmm0_4
__int64 v21; // r15
__m128 v22; // xmm0
float v23; // xmm0_4
__int64 v24; // rax
__int64 v25; // r14
__int64 v26; // rax
float v27; // xmm0_4
int v28; // eax
int v29; // eax
unsigned __int64 *v30; // rax
unsigned __int64 v31; // [rsp+4h] [rbp-3Ch] BYREF
unsigned __int64 v32; // [rsp+Ch] [rbp-34h] BYREF
float v33; // [rsp+14h] [rbp-2Ch]
v6 = 1;
v7 = 1;
if ( !a4 )
{
v8 = isSpecialSnapObject(a2[257]);
if ( (unsigned int)(a3 - 37) > 1 || (v7 = 1, !v8) )
{
(*(void (__fastcall **)(int *))(*(_QWORD *)a2 + 368LL))(a2);
v7 = 1;
if ( a3 != 44 )
{
a5 = _mm_and_ps(a5, (__m128)xmmword_100A038A0);
v7 = 1;
if ( !((int)a5.f32[0] % 90) )
{
offsetForKey((float *)&v32, a2[257]);
GameToolbox::getRelativeOffset(&v31, (__int64)a2, &v32, a5);
v9 = (unsigned __int64 *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)a2 + 192LL))(a2);
sub_100278370((double *)&v32, v9, &v31);
(*(void (__fastcall **)(int *, unsigned __int64 *))(*(_QWORD *)a2 + 184LL))(a2, &v32);
GJBaseGameLayer::reorderObjectSection(*(_QWORD *)(a1 + 1440), (__int64)a2);
v7 = 0;
}
}
}
}
v33 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
v10 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
if ( v33 != v10 )
{
v12 = a3;
LABEL_16:
switch ( v12 )
{
case '%':
v13 = (*(__int64 (__fastcall **)(int *))(*(_QWORD *)a2 + 1424LL))(a2);
(*(void (__fastcall **)(int *, _QWORD))(*(_QWORD *)a2 + 1240LL))(a2, v13 ^ 1u);
if ( !v6 )
goto LABEL_24;
goto LABEL_20;
case '&':
goto LABEL_19;
case '\'':
v19 = (__m128)0x42B40000u;
goto LABEL_32;
case '(':
v19 = (__m128)0xC2B40000;
goto LABEL_32;
case ')':
v19 = (__m128)0x42340000u;
goto LABEL_32;
case '*':
v19 = (__m128)0xC2340000;
LABEL_32:
v33 = v19.f32[0];
v19.f32[0] = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
(*(void (__fastcall **)(int *, float))(*(_QWORD *)a2 + 376LL))(a2, v19.f32[0] + v33);
v19.f32[0] = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
(*(void (__fastcall **)(int *, float))(*(_QWORD *)a2 + 392LL))(a2, v19.f32[0] + v33);
*(double *)v19.i64 = (*(double (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
v22 = _mm_and_ps(v19, (__m128)xmmword_100A038A0);
if ( v22.f32[0] == 360.0 )
{
v22 = 0;
(*(void (__fastcall **)(int *, double))(*(_QWORD *)a2 + 376LL))(a2, 0.0);
}
*(double *)v22.i64 = (*(double (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
a5 = _mm_and_ps(v22, (__m128)xmmword_100A038A0);
if ( a5.f32[0] == 360.0 )
{
a5 = 0;
(*(void (__fastcall **)(int *, double))(*(_QWORD *)a2 + 392LL))(a2, 0.0);
}
break;
case ',':
v20 = LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1440), (__int64)a2);
if ( v20 != -1.0 )
{
v21 = *(_QWORD *)(a1 + 896);
v33 = v20;
sub_1002782D0(&v32, &qword_100BE59F8);
a5 = (__m128)LODWORD(v33);
EditorUI::rotateObjects(a1, v21, (float *)&v32, 0, (__m128)LODWORD(v33));
}
break;
default:
goto LABEL_36;
}
goto LABEL_36;
}
*(double *)a5.i64 = (*(double (__fastcall **)(int *))(*(_QWORD *)a2 + 368LL))(a2);
a5 = _mm_and_ps(a5, (__m128)xmmword_100A038A0);
v11 = _mm_cvtsi128_si32((__m128i)_mm_or_ps(
_mm_cmpeq_ps((__m128)0x42B40000u, a5),
_mm_cmpeq_ps((__m128)0x43870000u, a5)));
v6 = __ROR4__(-1527099483 * (int)a5.f32[0] + 47721858, 1) >= 0x2D82D83u;
v12 = 37;
if ( (v11 & 1) == 0 )
v12 = a3;
if ( a3 != 38 )
v12 = a3;
if ( a3 != 37 || (v11 & 1) == 0 )
goto LABEL_16;
LABEL_19:
v14 = (*(__int64 (__fastcall **)(int *))(*(_QWORD *)a2 + 1432LL))(a2);
(*(void (__fastcall **)(int *, _QWORD))(*(_QWORD *)a2 + 1248LL))(a2, v14 ^ 1u);
if ( v6 )
{
LABEL_20:
v33 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
v15 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
v16 = *(_QWORD *)a2;
if ( v33 == v15 )
{
v17 = (double (__fastcall **)(int *))(v16 + 368);
v18 = 360;
}
else
{
*(double *)a5.i64 = (*(double (__fastcall **)(int *))(v16 + 384))(a2);
a5 = _mm_xor_ps(a5, (__m128)xmmword_100A035F0);
(*(void (__fastcall **)(int *, double))(*(_QWORD *)a2 + 376LL))(a2, *(double *)a5.i64);
v17 = (double (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL);
v18 = 392;
}
*(double *)a5.i64 = (*v17)(a2);
a5 = _mm_xor_ps(a5, (__m128)xmmword_100A035F0);
(*(void (__fastcall **)(int *, double))(*(_QWORD *)a2 + v18))(a2, *(double *)a5.i64);
}
LABEL_24:
if ( *((_BYTE *)a2 + 1212) == 1 )
(*(void (__fastcall **)(int *, __int64))(*(_QWORD *)a2 + 1776LL))(a2, 1);
LABEL_36:
v33 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
v23 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
v24 = *(_QWORD *)a2;
if ( v33 != v23 )
{
v27 = (*(float (__fastcall **)(int *))(v24 + 384))(a2);
v33 = v27;
(*(void (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
if ( v33 < 360.0 )
{
if ( v27 > -360.0 )
{
LABEL_44:
a5.f32[0] = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
v33 = a5.f32[0];
(*(void (__fastcall **)(int *))(*(_QWORD *)a2 + 400LL))(a2);
if ( v33 >= 360.0 )
{
v25 = 392;
goto LABEL_50;
}
if ( a5.f32[0] > -360.0 )
goto LABEL_51;
v25 = 392;
v26 = 400;
goto LABEL_47;
}
v27 = (*(float (__fastcall **)(int *))(*(_QWORD *)a2 + 384LL))(a2);
}
v28 = (int)v27 % 360;
a5 = 0;
(*(void (__fastcall **)(int *, float))(*(_QWORD *)a2 + 376LL))(a2, (float)v28);
goto LABEL_44;
}
a5.f32[0] = (*(float (__fastcall **)(int *))(v24 + 368))(a2);
v33 = a5.f32[0];
(*(void (__fastcall **)(int *))(*(_QWORD *)a2 + 368LL))(a2);
if ( v33 >= 360.0 )
{
v25 = 360;
goto LABEL_50;
}
if ( a5.f32[0] > -360.0 )
goto LABEL_51;
v25 = 360;
v26 = 368;
LABEL_47:
(*(void (__fastcall **)(int *))(*(_QWORD *)a2 + v26))(a2);
LABEL_50:
v29 = (int)a5.f32[0] % 360;
a5 = 0;
a5.f32[0] = (float)v29;
(*(void (__fastcall **)(int *, float))(*(_QWORD *)a2 + v25))(a2, (float)v29);
LABEL_51:
if ( !v7 )
{
offsetForKey((float *)&v32, a2[257]);
GameToolbox::getRelativeOffset(&v31, (__int64)a2, &v32, a5);
v30 = (unsigned __int64 *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)a2 + 192LL))(a2);
sub_100278350((double *)&v32, v30, &v31);
(*(void (__fastcall **)(int *, unsigned __int64 *))(*(_QWORD *)a2 + 184LL))(a2, &v32);
GJBaseGameLayer::reorderObjectSection(*(_QWORD *)(a1 + 1440), (__int64)a2);
}
if ( *(_BYTE *)(a1 + 692) == 1 )
{
sub_1002782D0(&v32, &qword_100BE59F8);
EditorUI::moveObject(a1, (__int64)a2, &v32);
}
}