//
// UIOptionsLayer::toggleUIGroup from 0x1002a2150 to 0x1002a2262 (274 bytes)
//
// 2 xrefs:
// > UIOptionsLayer::init @ 0x1002a1c97
// > UIOptionsLayer::ccTouchBegan @ 0x1002a2c5d
//
// 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:27:55 +0000
//
void __fastcall UIOptionsLayer::toggleUIGroup(__int64 a1, int a2)
{
const std::string::value_type *v4; // rsi
__int64 v5; // rdi
std::string::pointer data; // rsi
std::string v7; // [rsp+8h] [rbp-28h] BYREF
if ( *(_DWORD *)(a1 + 1056) == a2 )
return;
v7.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;
strcpy(v7.__r_.__value_.__s.__data_, "P1 Move");
switch ( a2 )
{
case 2:
v4 = "P2 Move";
LABEL_8:
std::string::assign(&v7, v4);
break;
case 3:
v4 = "P1 Jump";
goto LABEL_8;
case 4:
v4 = "P2 Jump";
goto LABEL_8;
}
v5 = *(_QWORD *)(a1 + 1048);
if ( v5 )
{
if ( (*(_BYTE *)&v7.__r_.__value_.__s.0 & 1) != 0 )
data = v7.__r_.__value_.__l.__data_;
else
data = v7.__r_.__value_.__s.__data_;
(*(void (__fastcall **)(__int64, std::string::pointer))(*(_QWORD *)v5 + 928LL))(v5, data);
}
*(_DWORD *)(a1 + 1056) = a2;
(*(void (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 1, a2 == 1);
(*(void (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 2, a2 == 2);
(*(void (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 3, a2 == 3);
(*(void (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 4, a2 == 4);
if ( (*(_BYTE *)&v7.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v7.__r_.__value_.__l.__data_);
}