//
// SetupShaderEffectPopup::setupShockWave from 0x1405e0930 to 0x1405e1c43 (4883 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0x1405dfaa9
// > ??> @ 0x14092ee14
//
// 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:35:01 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall SetupShaderEffectPopup::setupShockWave(float *a1)
{
__int64 v2; // rax
__int64 v3; // rdi
__int64 v4; // rax
__int64 v5; // rbx
__int64 v6; // rax
_QWORD *v7; // rax
_QWORD *v8; // rcx
const char *v9; // rdx
__int64 v10; // r8
__int64 v11; // rcx
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // rax
__int64 v19; // rax
__int64 v20; // rax
__int64 v21; // rax
__int64 v22; // rax
__int64 v23; // rax
int v24; // eax
__int64 v25; // rax
__int64 v26; // rax
__int64 v27; // rax
__int64 v28; // rdx
void *v29; // rcx
__int64 v30; // rax
__int64 v31; // rax
__int64 v32; // rax
__int64 v33; // rax
__int64 v34; // rax
__int64 v35; // rax
__int64 v36; // rax
int v37; // r8d
int v38; // r9d
bool v39; // bl
__int64 v40; // r8
__int64 v41; // r8
__int64 v42; // rdx
__int64 v44; // [rsp+80h] [rbp-88h]
__int64 v45; // [rsp+80h] [rbp-88h]
__int64 v46; // [rsp+80h] [rbp-88h]
__int64 v47; // [rsp+80h] [rbp-88h]
__int64 v48; // [rsp+80h] [rbp-88h]
__int64 v49; // [rsp+80h] [rbp-88h]
__int64 v50; // [rsp+80h] [rbp-88h]
__int64 v51; // [rsp+80h] [rbp-88h]
__int64 v52; // [rsp+80h] [rbp-88h]
__int64 v53; // [rsp+80h] [rbp-88h]
__int64 v54; // [rsp+80h] [rbp-88h]
__int64 v55; // [rsp+80h] [rbp-88h]
_BYTE v56[8]; // [rsp+88h] [rbp-80h] BYREF
void **v57; // [rsp+90h] [rbp-78h] BYREF
void **v58; // [rsp+98h] [rbp-70h] BYREF
_BYTE v59[4]; // [rsp+A0h] [rbp-68h] BYREF
float v60; // [rsp+A4h] [rbp-64h]
__int128 v61; // [rsp+A8h] [rbp-60h] BYREF
__int64 v62; // [rsp+B8h] [rbp-50h]
__int64 v63; // [rsp+C0h] [rbp-48h]
float v64; // [rsp+C8h] [rbp-40h] BYREF
float v65; // [rsp+CCh] [rbp-3Ch]
_BYTE v66[8]; // [rsp+D0h] [rbp-38h] BYREF
_BYTE v67[8]; // [rsp+D8h] [rbp-30h] BYREF
void *Block[2]; // [rsp+E0h] [rbp-28h] BYREF
__m128i si128; // [rsp+F0h] [rbp-18h]
v62 = 15;
v63 = 15;
strcpy((char *)&v61, "Setup ShockWave");
SetupTriggerPopup::addTitle(a1, &v61);
v3 = v2;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 0.0, 2.0);
v5 = v4;
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 200LL))(v3);
cocos2d::CCPoint::operator+(v6, v56, v5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v3 + 184LL))(v3, v56);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 160LL))(v3);
v57 = (void **)&v61;
v61 = 0;
v62 = 0;
v63 = 0;
v7 = sub_14003D460(0x1E0u);
*(_QWORD *)&v61 = v7;
v62 = 471;
v63 = 479;
v8 = v7;
v9 = "Speed defines how fast the shockwave effect happens.\n"
"Strength sets how distorted objects get within the waves.\n"
"Thickness is how big each wave is.\n"
"MaxSize modifies the maximum size of the wave.\n"
"TimeOff is offset in seconds before the effect begins.\n"
"Target lets you set a specific object to do the effect around.\n"
"Relative makes the effect follow screen movement.\n"
"Invert makes the effect go towards the center.";
v10 = 3;
do
{
*(_OWORD *)v8 = *(_OWORD *)v9;
*((_OWORD *)v8 + 1) = *((_OWORD *)v9 + 1);
*((_OWORD *)v8 + 2) = *((_OWORD *)v9 + 2);
*((_OWORD *)v8 + 3) = *((_OWORD *)v9 + 3);
*((_OWORD *)v8 + 4) = *((_OWORD *)v9 + 4);
*((_OWORD *)v8 + 5) = *((_OWORD *)v9 + 5);
*((_OWORD *)v8 + 6) = *((_OWORD *)v9 + 6);
v8 += 16;
*((_OWORD *)v8 - 1) = *((_OWORD *)v9 + 7);
v9 += 128;
--v10;
}
while ( v10 );
*(_OWORD *)v8 = *(_OWORD *)v9;
*((_OWORD *)v8 + 1) = *((_OWORD *)v9 + 1);
*((_OWORD *)v8 + 2) = *((_OWORD *)v9 + 2);
*((_OWORD *)v8 + 3) = *((_OWORD *)v9 + 3);
*((_OWORD *)v8 + 4) = *((_OWORD *)v9 + 4);
*((_DWORD *)v8 + 20) = *((_DWORD *)v9 + 20);
*((_WORD *)v8 + 42) = *((_WORD *)v9 + 42);
*((_BYTE *)v8 + 86) = v9[86];
*((_BYTE *)v7 + 471) = 0;
Block[1] = (void *)101;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x7661576B636F6853LL;
SetupTriggerPopup::addHelpButton(a1, Block, &v61);
v12 = cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::getWinSize(v12, &v64);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, (float)(v64 * 0.5) - 10.0, (float)(v65 * 0.5) + 110.0);
v57 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Speed:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v58, -100.0, 0.0);
cocos2d::CCPoint::operator+(v59, v56, v13);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
175,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
1);
v58 = Block;
Block[1] = (void *)58;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x6874676E65727453LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, 0.0);
cocos2d::CCPoint::operator+(v59, v56, v14);
LOBYTE(v44) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
176,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1065353216,
0,
0,
1,
3,
v44);
v58 = Block;
Block[1] = (void *)14963;
si128.m128i_i64[0] = 10;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x73656E6B63696854LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, -25.0);
cocos2d::CCPoint::operator+(v59, v56, v15);
LOBYTE(v45) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
180,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v45);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "WaveW:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, -25.0);
cocos2d::CCPoint::operator+(v59, v56, v16);
LOBYTE(v46) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
179,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v46);
v58 = (void **)&v61;
v62 = 7;
v63 = 15;
v61 = 0x3A6E4965646146uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, -50.0);
cocos2d::CCPoint::operator+(v59, v56, v17);
LOBYTE(v47) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
181,
(unsigned int)&v61,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v47);
v58 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x3A74754F65646146LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, -50.0);
cocos2d::CCPoint::operator+(v59, v56, v18);
LOBYTE(v48) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
182,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v48);
v58 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x3A66664F656D6954LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, -75.0);
cocos2d::CCPoint::operator+(v59, v56, v19);
LOBYTE(v49) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
177,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
-1054867456,
1092616192,
0,
0,
1,
3,
v49);
v58 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x3A657A695378614DLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, -75.0);
cocos2d::CCPoint::operator+(v59, v56, v20);
LOBYTE(v50) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
512,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1065353216,
0,
0,
1,
3,
v50);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, (float)(v64 * 0.5) - 35.0, v60 - 100.0);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Invert");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, 0.0);
cocos2d::CCPoint::operator+(v67, v56, v21);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
184,
(unsigned int)Block,
(unsigned int)v56,
0,
0,
0,
1061997773);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Target");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 0.0, 0.0);
cocos2d::CCPoint::operator+(v67, v56, v22);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
188,
(unsigned int)Block,
(unsigned int)v56,
0,
0,
0,
1061997773);
v58 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x65766974616C6552LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, 0.0);
cocos2d::CCPoint::operator+(v67, v56, v23);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
514,
(unsigned int)Block,
(unsigned int)v56,
0,
0,
0,
1061997773);
v58 = (void **)&v61;
v62 = 7;
v63 = 15;
v61 = 0x6574616D696E41uLL;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v57,
(float)((float)((float)(a1[183] * 0.5) + (float)(v64 * 0.5)) - 72.0) - 90.0,
(float)((float)(v65 * 0.5) - (float)(a1[184] * 0.5)) + 20.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 513, (unsigned int)&v61, v24, 0, 0, 0, 1065353216);
v58 = Block;
si128.m128i_i64[0] = 12;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Screen\nOffX:");
BYTE5(Block[1]) = 0;
HIWORD(Block[1]) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, -125.0);
cocos2d::CCPoint::operator+(v59, v56, v25);
LOBYTE(v51) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
290,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
1,
3,
v51);
v58 = Block;
si128.m128i_i64[0] = 12;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Screen\nOffY:");
BYTE5(Block[1]) = 0;
HIWORD(Block[1]) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, -125.0);
cocos2d::CCPoint::operator+(v59, v56, v26);
LOBYTE(v52) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
291,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
1,
3,
v52);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (float)(v64 * 0.5) - 20.0, v60 - 125.0);
Block[1] = nullptr;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836590);
Block[0] = (void *)0x44497265746E6543LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v58, -100.0, 0.0);
cocos2d::CCPoint::operator+(v66, v56, v27);
v28 = (__int64)(a1 + 136);
if ( !a1 )
v28 = 0;
IDNameInput::create(
(__int64)a1,
v28,
1,
51,
(__int64)Block,
(const struct cocos2d::CCPoint *)v56,
1058642330,
6,
100,
0,
1);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v29 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v29 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v29 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v29);
}
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 2;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "P1");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 20.0, 0.0);
cocos2d::CCPoint::operator+(v66, v56, v30);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
138,
(unsigned int)Block,
(unsigned int)v56,
0,
0,
100,
1061997773);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 2;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "P2");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 80.0, 0.0);
cocos2d::CCPoint::operator+(v66, v56, v31);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
200,
(unsigned int)Block,
(unsigned int)v56,
0,
0,
100,
1061997773);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Follow");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 140.0, 0.0);
cocos2d::CCPoint::operator+(v66, v56, v32);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
190,
(unsigned int)Block,
(unsigned int)v56,
0,
0,
100,
1061997773);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Inner:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, -150.0);
cocos2d::CCPoint::operator+(v59, v56, v33);
LOBYTE(v53) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
183,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
102,
1,
3,
v53);
v58 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Outer:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, 100.0, -150.0);
cocos2d::CCPoint::operator+(v59, v56, v34);
LOBYTE(v54) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
191,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
102,
1,
3,
v54);
v58 = Block;
Block[1] = (void *)58;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x656D695465646146LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v57, -100.0, -185.0);
cocos2d::CCPoint::operator+(v59, v56, v35);
LOBYTE(v55) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
10,
(unsigned int)Block,
(unsigned int)v56,
1058642330,
0,
1,
6,
0,
0,
1065353216,
0,
103,
1,
2,
v55);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v58, 100.0, -170.0);
cocos2d::CCPoint::operator+(v59, v56, v36);
SetupTriggerPopup::createEasingControls((_DWORD)a1, (unsigned int)v56, v37, v38, 103);
v39 = (*(float (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 188) != 0.0;
(*(void (__fastcall **)(float *, __int64, bool))(*(_QWORD *)a1 + 1088LL))(a1, 100, v39);
(*(void (__fastcall **)(float *, __int64, bool))(*(_QWORD *)a1 + 1088LL))(a1, 101, !v39);
if ( (*(float (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 184) == 0.0 )
v40 = 0;
else
LOBYTE(v40) = 1;
(*(void (__fastcall **)(float *, __int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 102, v40);
if ( (*(float (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 513) == 0.0 )
v41 = 0;
else
LOBYTE(v41) = 1;
(*(void (__fastcall **)(float *, __int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 103, v41);
if ( (*(float (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 513) == 0.0 )
v42 = 0;
else
LOBYTE(v42) = 1;
return SetupTriggerPopup::toggleDisableButtons(a1, v42);
}