//
// GJTransformControl::onToggleOppositeAnchor from 0x1401a5b20 to 0x1401a5c03 (227 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x1401c4251
// > GJTransformControl::init @ 0x1401a50a3
// > ??> @ 0x140919b38
//
// 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:27:49 +0000
//
__int64 __fastcall GJTransformControl::onToggleOppositeAnchor(__int64 a1)
{
__int64 v2; // rcx
char v3; // si
__int64 *v4; // r14
__int64 v5; // rdi
const char *v6; // rbx
cocos2d::CCSpriteFrameCache *v7; // rax
struct cocos2d::CCSpriteFrame *v8; // rax
void *v10; // [rsp+30h] [rbp+8h]
*(_BYTE *)(a1 + 601) = *(_BYTE *)(a1 + 601) == 0;
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
GameManager::setGameVariable(v2, "0188", *(unsigned __int8 *)(a1 + 601));
v3 = *(_BYTE *)(a1 + 601);
v4 = (__int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 536) + 952LL))(*(_QWORD *)(a1 + 536));
v5 = *v4;
v6 = "warpAnchorOffBtn_001.png";
if ( v3 )
v6 = "warpAnchorOnBtn_001.png";
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, v6);
return (*(__int64 (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v5 + 1008))(v4, v8);
}