//
// SetupShaderEffectPopup::setupShockLine from 0x1405e1c50 to 0x1405e2e53 (4611 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0x1405dfab6
// > ??> @ 0x14092ee20
//
// 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::setupShockLine(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
__int64 v24; // rax
__int64 v25; // rax
__int64 v26; // rax
int v27; // eax
__int64 v28; // rax
__int64 v29; // rax
__int64 v30; // rdx
void *v31; // rcx
__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; // rdx
__int64 v43; // [rsp+80h] [rbp-88h]
__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]
_BYTE v52[8]; // [rsp+88h] [rbp-80h] BYREF
void **v53; // [rsp+90h] [rbp-78h] BYREF
void **v54; // [rsp+98h] [rbp-70h] BYREF
_BYTE v55[4]; // [rsp+A0h] [rbp-68h] BYREF
float v56; // [rsp+A4h] [rbp-64h]
__int128 v57; // [rsp+A8h] [rbp-60h] BYREF
__int64 v58; // [rsp+B8h] [rbp-50h]
__int64 v59; // [rsp+C0h] [rbp-48h]
_BYTE v60[8]; // [rsp+C8h] [rbp-40h] BYREF
float v61; // [rsp+D0h] [rbp-38h] BYREF
float v62; // [rsp+D4h] [rbp-34h]
_BYTE v63[8]; // [rsp+D8h] [rbp-30h] BYREF
void *Block[2]; // [rsp+E0h] [rbp-28h] BYREF
__m128i si128; // [rsp+F0h] [rbp-18h]
v58 = 15;
v59 = 15;
strcpy((char *)&v57, "Setup ShockLine");
SetupTriggerPopup::addTitle(a1, &v57);
v3 = v2;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 0.0, 2.0);
v5 = v4;
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 200LL))(v3);
cocos2d::CCPoint::operator+(v6, v52, v5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v3 + 184LL))(v3, v52);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 160LL))(v3);
v53 = (void **)&v57;
v57 = 0;
v58 = 0;
v59 = 0;
v7 = sub_14003D460(0x1C0u);
*(_QWORD *)&v57 = v7;
v58 = 447;
v59 = 447;
v8 = v7;
v9 = "Speed defines how fast the shockline 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"
"WaveW is line width.\n"
"TimeOff is offset in seconds before the effect begins.\n"
"Target lets you set a specific object to do the effect around.\n"
"Flip and Rotate change the direction of the effect.";
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);
v8[6] = *((_QWORD *)v9 + 6);
*((_DWORD *)v8 + 14) = *((_DWORD *)v9 + 14);
*((_WORD *)v8 + 30) = *((_WORD *)v9 + 30);
*((_BYTE *)v8 + 62) = v9[62];
*((_BYTE *)v7 + 447) = 0;
Block[1] = (void *)101;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x6E694C6B636F6853LL;
SetupTriggerPopup::addHelpButton(a1, Block, &v57);
v12 = cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::getWinSize(v12, &v61);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (float)(v61 * 0.5) - 10.0, (float)(v62 * 0.5) + 110.0);
v53 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Speed:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v54, -100.0, 0.0);
cocos2d::CCPoint::operator+(v55, v52, v13);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
175,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
1);
v54 = Block;
Block[1] = (void *)58;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x6874676E65727453LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 100.0, 0.0);
cocos2d::CCPoint::operator+(v55, v52, v14);
LOBYTE(v43) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
176,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1065353216,
0,
0,
1,
3,
v43);
v54 = Block;
Block[1] = (void *)14963;
si128.m128i_i64[0] = 10;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x73656E6B63696854LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -100.0, -25.0);
cocos2d::CCPoint::operator+(v55, v52, v15);
LOBYTE(v44) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
180,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v44);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "WaveW:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 100.0, -25.0);
cocos2d::CCPoint::operator+(v55, v52, v16);
LOBYTE(v45) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
179,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v45);
v54 = (void **)&v57;
v58 = 7;
v59 = 15;
v57 = 0x3A6E4965646146uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -100.0, -50.0);
cocos2d::CCPoint::operator+(v55, v52, v17);
LOBYTE(v46) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
181,
(unsigned int)&v57,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v46);
v54 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x3A74754F65646146LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 100.0, -50.0);
cocos2d::CCPoint::operator+(v55, v52, v18);
LOBYTE(v47) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
182,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1084227584,
0,
0,
1,
3,
v47);
v54 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x3A66664F656D6954LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -100.0, -75.0);
cocos2d::CCPoint::operator+(v55, v52, v19);
LOBYTE(v48) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
177,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
-1054867456,
1092616192,
0,
0,
1,
3,
v48);
v54 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x3A657A695378614DLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 100.0, -75.0);
cocos2d::CCPoint::operator+(v55, v52, v20);
LOBYTE(v49) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
512,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1065353216,
0,
0,
1,
3,
v49);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v60, (float)(v61 * 0.5) - 25.0, v56 - 100.0);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Invert");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -162.5, 0.0);
cocos2d::CCPoint::operator+(v60, v52, v21);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
184,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
0,
1061997773);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 4;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Flip");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -97.5, 0.0);
cocos2d::CCPoint::operator+(v60, v52, v22);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
185,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
0,
1061997773);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Rotate");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -32.5, 0.0);
cocos2d::CCPoint::operator+(v60, v52, v23);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
186,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
0,
1061997773);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 4;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Dual");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 32.5, 0.0);
cocos2d::CCPoint::operator+(v60, v52, v24);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
187,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
0,
1061997773);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Target");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 97.5, 0.0);
cocos2d::CCPoint::operator+(v60, v52, v25);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
188,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
0,
1061997773);
v54 = Block;
Block[1] = nullptr;
si128.m128i_i64[0] = 8;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x65766974616C6552LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 162.5, 0.0);
cocos2d::CCPoint::operator+(v60, v52, v26);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
514,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
0,
1061997773);
v54 = (void **)&v57;
v58 = 7;
v59 = 15;
v57 = 0x6574616D696E41uLL;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v53,
(float)((float)((float)(a1[183] * 0.5) + (float)(v61 * 0.5)) - 72.0) - 90.0,
(float)((float)(v62 * 0.5) - (float)(a1[184] * 0.5)) + 20.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 513, (unsigned int)&v57, v27, 0, 0, 0, 1065353216);
v54 = Block;
Block[1] = (void *)14950;
si128.m128i_i64[0] = 10;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x664F6E6565726353LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -100.0, -125.0);
cocos2d::CCPoint::operator+(v55, v52, v28);
LOBYTE(v50) = 1;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
290,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
1,
3,
v50);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v63, (float)(v61 * 0.5) - 20.0, v56 - 125.0);
Block[1] = nullptr;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836590);
Block[0] = (void *)0x44497265746E6543LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v54, -100.0, 0.0);
cocos2d::CCPoint::operator+(v63, v52, v29);
v30 = (__int64)(a1 + 136);
if ( !a1 )
v30 = 0;
IDNameInput::create(
(__int64)a1,
v30,
1,
51,
(__int64)Block,
(const struct cocos2d::CCPoint *)v52,
1058642330,
6,
100,
0,
1);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v31 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v31 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v31 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v31);
}
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 2;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "P1");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 20.0, 0.0);
cocos2d::CCPoint::operator+(v63, v52, v32);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
138,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
100,
1061997773);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 2;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "P2");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 80.0, 0.0);
cocos2d::CCPoint::operator+(v63, v52, v33);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
200,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
100,
1061997773);
v54 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Follow");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 140.0, 0.0);
cocos2d::CCPoint::operator+(v63, v52, v34);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
190,
(unsigned int)Block,
(unsigned int)v52,
0,
0,
100,
1061997773);
v54 = Block;
Block[1] = (void *)58;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x656D695465646146LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, -100.0, -185.0);
cocos2d::CCPoint::operator+(v55, v52, v35);
LOBYTE(v51) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
10,
(unsigned int)Block,
(unsigned int)v52,
1058642330,
0,
1,
6,
0,
0,
1065353216,
0,
103,
1,
2,
v51);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v54, 100.0, -170.0);
cocos2d::CCPoint::operator+(v55, v52, v36);
SetupTriggerPopup::createEasingControls((_DWORD)a1, (unsigned int)v52, 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, 513) == 0.0 )
v40 = 0;
else
LOBYTE(v40) = 1;
(*(void (__fastcall **)(float *, __int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 103, v40);
if ( (*(float (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 513) == 0.0 )
v41 = 0;
else
LOBYTE(v41) = 1;
return SetupTriggerPopup::toggleDisableButtons(a1, v41);
}