//
// SetupShaderEffectPopup::setupPinch from 0x1002b9ca0 to 0x1002ba752 (2738 bytes)
//
// 1 xrefs:
// > SetupShaderEffectPopup::init @ 0x1002b2edb
//
// 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:28:03 +0000
//
__int64 __fastcall SetupShaderEffectPopup::setupPinch(float *a1)
{
float *v1; // rbx
__int64 v2; // rax
__m128 v3; // xmm0
unsigned __int64 v5; // [rsp+38h] [rbp-1D8h] BYREF
__int128 v6; // [rsp+40h] [rbp-1D0h] BYREF
void *v7; // [rsp+50h] [rbp-1C0h]
__int128 v8; // [rsp+58h] [rbp-1B8h] BYREF
void *v9; // [rsp+68h] [rbp-1A8h]
__int128 v10; // [rsp+70h] [rbp-1A0h] BYREF
void *v11; // [rsp+80h] [rbp-190h]
__int128 v12; // [rsp+88h] [rbp-188h] BYREF
void *v13; // [rsp+98h] [rbp-178h]
__int128 v14; // [rsp+A0h] [rbp-170h] BYREF
void *v15; // [rsp+B0h] [rbp-160h]
__int128 v16; // [rsp+B8h] [rbp-158h] BYREF
void *v17; // [rsp+C8h] [rbp-148h]
__int128 v18; // [rsp+D0h] [rbp-140h] BYREF
void *v19; // [rsp+E0h] [rbp-130h]
std::string v20; // [rsp+E8h] [rbp-128h] BYREF
__int128 v21; // [rsp+100h] [rbp-110h] BYREF
void *v22; // [rsp+110h] [rbp-100h]
__int128 v23; // [rsp+118h] [rbp-F8h] BYREF
void *v24; // [rsp+128h] [rbp-E8h]
__int128 v25; // [rsp+130h] [rbp-E0h] BYREF
void *v26; // [rsp+140h] [rbp-D0h]
char v27; // [rsp+148h] [rbp-C8h] BYREF
_BYTE v28[23]; // [rsp+149h] [rbp-C7h] BYREF
std::string v29; // [rsp+160h] [rbp-B0h] BYREF
__int128 v30; // [rsp+178h] [rbp-98h] BYREF
void *v31; // [rsp+188h] [rbp-88h]
std::string v32; // [rsp+190h] [rbp-80h] BYREF
std::string v33; // [rsp+1A8h] [rbp-68h] BYREF
float v34; // [rsp+1C0h] [rbp-50h] BYREF
float v35; // [rsp+1C4h] [rbp-4Ch]
unsigned __int64 v36; // [rsp+1C8h] [rbp-48h] BYREF
double v37[3]; // [rsp+1D0h] [rbp-40h] BYREF
unsigned __int64 v38; // [rsp+1E8h] [rbp-28h] BYREF
unsigned __int64 v39[4]; // [rsp+1F0h] [rbp-20h] BYREF
v1 = a1;
v27 = 22;
strcpy(v28, "Setup Pinch");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)&v27);
if ( (v27 & 1) != 0 )
operator delete(*(void **)&v28[15]);
LOBYTE(v6) = 8;
strcpy((char *)&v6 + 1, "Help");
v9 = operator new(0x130u);
*(_QWORD *)&v8 = 305;
*((_QWORD *)&v8 + 1) = 297;
strcpy(
(char *)v9,
"Pinches the screen.\n"
"TargetX and TargetY is how much pinch to apply to each axis.\n"
"Radius is how large the effect is.\n"
"Screen OffX and OffY offsets the center of the effect.\n"
"FadeTime is time until final state is reached.\n"
"Modifier multiplies all values.");
SetupTriggerPopup::addHelpButton((__int64)a1, &v6, &v8, 1.0);
if ( (v8 & 1) != 0 )
{
a1 = (float *)v9;
operator delete(v9);
}
if ( (v6 & 1) != 0 )
{
a1 = (float *)v7;
operator delete(v7);
}
v2 = cocos2d::CCDirector::sharedDirector(a1, &v6);
cocos2d::CCDirector::getWinSize(&v34, v2);
sub_100278250((float *)&v38, v34 * 0.5, (float)(v35 * 0.5) + 90.0);
LOBYTE(v10) = 16;
strcpy((char *)&v10 + 1, "TargetX:");
sub_100278250((float *)v39, -100.0, 0.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createValueControl((__int64)v1, 0xB4u, &v10, (__int64)v37, 0.60000002, 0.0, 0.0);
if ( (v10 & 1) != 0 )
operator delete(v11);
LOBYTE(v12) = 16;
strcpy((char *)&v12 + 1, "TargetY:");
sub_100278250((float *)v39, -100.0, -45.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createValueControl((__int64)v1, 0xBDu, &v12, (__int64)v37, 0.60000002, 0.0, 0.0);
if ( (v12 & 1) != 0 )
operator delete(v13);
LOBYTE(v14) = 18;
strcpy((char *)&v14 + 1, "FadeTime:");
sub_100278250((float *)v39, -100.0, -135.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createValueControl((__int64)v1, 0xAu, &v14, (__int64)v37, 0.60000002, 0.0, 0.0);
if ( (v14 & 1) != 0 )
operator delete(v15);
strcpy((char *)&v16, "\nUse X");
sub_100278250((float *)v39, 0.0, -10.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createToggleValueControl((int)v1, 190, &v16, (__int64)v37, 1, 0, 1.0, 0);
if ( (v16 & 1) != 0 )
operator delete(v17);
strcpy((char *)&v18, "\nUse Y");
sub_100278250((float *)v39, 0.0, -58.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createToggleValueControl((int)v1, 194, &v18, (__int64)v37, 1, 0, 1.0, 0);
if ( (v18 & 1) != 0 )
operator delete(v19);
v20.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)18;
strcpy(v20.__r_.__value_.__s.__data_, "Modifier:");
sub_100278250((float *)v39, 100.0, -90.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)v1,
179,
&v20,
(__int64)v37,
0,
1u,
0.60000002,
0.0,
1.0,
6u,
0,
0,
0,
0,
3u,
0);
if ( (*(_BYTE *)&v20.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v20.__r_.__value_.__l.__data_);
v29.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;
strcpy(v29.__r_.__value_.__s.__data_, "Radius:");
sub_100278250((float *)v39, -100.0, -90.0);
sub_100278350(v37, &v38, v39);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)v1,
512,
&v29,
(__int64)v37,
0,
1u,
0.60000002,
0.0,
1.0,
6u,
0,
0,
0,
0,
3u,
0);
if ( (*(_BYTE *)&v29.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v29.__r_.__value_.__l.__data_);
sub_100278250(
(float *)v39,
(float)((float)(v34 * 0.5) - (float)(v1[183] * 0.5)) + 20.0,
(float)((float)((float)(v35 * 0.5) - (float)(v1[184] * 0.5)) + 20.0) + 30.0);
LOBYTE(v30) = 12;
strcpy((char *)&v30 + 1, "Target");
sub_1002782D0(v37, v39);
SetupTriggerPopup::createToggleValueControl((int)v1, 188, &v30, (__int64)v37, 0, 0, 1.0, 0);
if ( (v30 & 1) != 0 )
operator delete(v31);
LOBYTE(v21) = 16;
strcpy((char *)&v21 + 1, "Relative");
sub_100278250(
(float *)v37,
(float)((float)((float)(v1[183] * 0.5) + (float)(v34 * 0.5)) + -72.0) + -90.0,
(float)((float)(v35 * 0.5) - (float)(0.5 * v1[184])) + 20.0);
SetupTriggerPopup::createToggleValueControl((int)v1, 514, &v21, (__int64)v37, 0, 0, 1.0, 0);
if ( (v21 & 1) != 0 )
operator delete(v22);
v32.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)24;
strcpy(v32.__r_.__value_.__s.__data_, "Screen\nOffX:");
sub_100278250((float *)&v36, 100.0, 0.0);
sub_100278350(v37, &v38, &v36);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)v1,
290,
&v32,
(__int64)v37,
0,
1u,
0.60000002,
-1.0,
1.0,
6u,
0,
0,
0x65u,
0,
2u,
0);
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v32.__r_.__value_.__l.__data_);
v33.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)24;
strcpy(v33.__r_.__value_.__s.__data_, "Screen\nOffY:");
sub_100278250((float *)&v36, 100.0, -45.0);
sub_100278350(v37, &v38, &v36);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)v1,
291,
&v33,
(__int64)v37,
0,
1u,
0.60000002,
-1.0,
1.0,
6u,
0,
0,
0x65u,
0,
2u,
0);
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v33.__r_.__value_.__l.__data_);
LOBYTE(v37[0]) = 18;
strcpy((char *)v37 + 1, "CenterID:");
sub_100278250((float *)&v5, 100.0, -10.0);
sub_100278350((double *)&v36, &v38, &v5);
IDNameInput::create((_DWORD)v1, (_DWORD)v1 + 544, 1, 51, (unsigned int)v37, (unsigned int)&v36, 6, 100, 0, 0);
if ( (LOBYTE(v37[0]) & 1) != 0 )
operator delete(*(void **)&v37[2]);
LOBYTE(v23) = 4;
strcpy((char *)&v23 + 1, "P1");
sub_100278250((float *)&v36, 60.0, -50.0);
sub_100278350(v37, &v38, &v36);
SetupTriggerPopup::createToggleValueControl((int)v1, 138, &v23, (__int64)v37, 0, 0, 1.0, 100);
if ( (v23 & 1) != 0 )
operator delete(v24);
LOBYTE(v25) = 4;
strcpy((char *)&v25 + 1, "P2");
sub_100278250((float *)&v36, 130.0, -50.0);
sub_100278350(v37, &v38, &v36);
v3 = (__m128)0x3F800000u;
SetupTriggerPopup::createToggleValueControl((int)v1, 200, &v25, (__int64)v37, 0, 0, 1.0, 100);
if ( (v25 & 1) != 0 )
operator delete(v26);
*(double *)v3.i64 = (*(double (__fastcall **)(float *, __int64))(*(_QWORD *)v1 + 1464LL))(v1, 188);
(*(void (__fastcall **)(float *, __int64, _QWORD))(*(_QWORD *)v1 + 1352LL))(
v1,
100,
_mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(v3, (__m128)0LL)) & 1);
(*(void (__fastcall **)(float *, __int64, _QWORD))(*(_QWORD *)v1 + 1352LL))(
v1,
101,
_mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss(v3, (__m128)0LL)) & 1);
sub_100278250((float *)&v36, 100.0, -135.0);
sub_100278350(v37, &v38, &v36);
return SetupTriggerPopup::createEasingControls((__int64)v1, (__int64)v37, 0, 0, 0.80000001);
}