//
// SetupShaderEffectPopup::setupRadialBlur from 0x1405e5390 to 0x1405e5e23 (2707 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0x1405dfb01
// > ??> @ 0x14092ee68
//
// 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:02 +0000
//
// Hidden C++ exception states: #wind=4
double __fastcall SetupShaderEffectPopup::setupRadialBlur(float *a1)
{
_BYTE *v2; // r9
_BYTE *v3; // rcx
const char *v4; // rdx
__int64 v5; // r8
__int64 v6; // rcx
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // rax
__int64 v12; // rax
int v13; // eax
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // rdx
void *v19; // rcx
__int64 v20; // rax
__int64 v21; // rax
bool v22; // di
__int64 v23; // rax
int v24; // r8d
int v25; // r9d
__int64 v27; // [rsp+80h] [rbp-88h]
__int64 v28; // [rsp+80h] [rbp-88h]
void **v29; // [rsp+88h] [rbp-80h] BYREF
void **v30; // [rsp+90h] [rbp-78h] BYREF
_BYTE v31[8]; // [rsp+98h] [rbp-70h] BYREF
void **v32; // [rsp+A0h] [rbp-68h] BYREF
__int128 v33; // [rsp+A8h] [rbp-60h] BYREF
__int64 v34; // [rsp+B8h] [rbp-50h]
__int64 v35; // [rsp+C0h] [rbp-48h]
float v36; // [rsp+C8h] [rbp-40h] BYREF
float v37; // [rsp+CCh] [rbp-3Ch]
_BYTE v38[8]; // [rsp+D0h] [rbp-38h] BYREF
void *Block[2]; // [rsp+D8h] [rbp-30h] BYREF
__m128i si128; // [rsp+E8h] [rbp-20h]
*(_OWORD *)Block = 0;
Block[0] = sub_14003D460(0x20u);
si128.m128i_i64[0] = 17;
si128.m128i_i64[1] = 31;
strcpy((char *)Block[0], "Setup Radial Blur");
SetupTriggerPopup::addTitle(a1, Block);
v29 = Block;
*(_OWORD *)Block = 0;
si128 = 0u;
v2 = sub_14003D460(0x1C0u);
Block[0] = v2;
si128.m128i_i64[0] = 435;
si128.m128i_i64[1] = 447;
v3 = v2;
v4 = "Applies radial blur.\n"
"Size is how much blur to apply around the center.\n"
"FadeTime is time until final state is reached.\n"
"Intensity is opacity of the blur.\n"
"RefChannel uses a color channel to reference the effect.\n"
"Fade sets how much blur fades out at the edges.\n"
"Screen OffX and OffY offsets the center of the effect.\n"
"Target lets you set a specific target object as the center.";
v5 = 3;
do
{
*(_OWORD *)v3 = *(_OWORD *)v4;
*((_OWORD *)v3 + 1) = *((_OWORD *)v4 + 1);
*((_OWORD *)v3 + 2) = *((_OWORD *)v4 + 2);
*((_OWORD *)v3 + 3) = *((_OWORD *)v4 + 3);
*((_OWORD *)v3 + 4) = *((_OWORD *)v4 + 4);
*((_OWORD *)v3 + 5) = *((_OWORD *)v4 + 5);
*((_OWORD *)v3 + 6) = *((_OWORD *)v4 + 6);
v3 += 128;
*((_OWORD *)v3 - 1) = *((_OWORD *)v4 + 7);
v4 += 128;
--v5;
}
while ( v5 );
*(_OWORD *)v3 = *(_OWORD *)v4;
*((_OWORD *)v3 + 1) = *((_OWORD *)v4 + 1);
*((_OWORD *)v3 + 2) = *((_OWORD *)v4 + 2);
*((_WORD *)v3 + 24) = *((_WORD *)v4 + 24);
v3[50] = v4[50];
v2[435] = 0;
v33 = 0;
v34 = 4;
v35 = 15;
strcpy((char *)&v33, "Help");
SetupTriggerPopup::addHelpButton(a1, &v33, Block);
v7 = cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(v7, &v36);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, v36 * 0.5, (float)(v37 * 0.5) + 85.0);
v32 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 5;
si128.m128i_i64[1] = 15;
LODWORD(Block[0]) = *(_DWORD *)"Size:";
WORD2(Block[0]) = (unsigned __int8)aSize[4];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, -130.0, 0.0);
cocos2d::CCPoint::operator+(v31, &v29, v8);
SetupTriggerPopup::createValueControl(
(_DWORD)a1,
179,
(unsigned int)Block,
(unsigned int)&v29,
1058642330,
0,
0x40000000);
v30 = Block;
Block[1] = (void *)58;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x656D695465646146LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, 0.0);
cocos2d::CCPoint::operator+(v31, &v29, v9);
SetupTriggerPopup::createValueControl((_DWORD)a1, 10, (unsigned int)Block, (unsigned int)&v29, 1058642330, 0, 0);
v30 = Block;
Block[1] = (void *)14969;
si128.m128i_i64[0] = 10;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x7469736E65746E49LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, -130.0, -50.0);
cocos2d::CCPoint::operator+(v31, &v29, v10);
SetupTriggerPopup::createValueControl(
(_DWORD)a1,
176,
(unsigned int)Block,
(unsigned int)&v29,
1058642330,
0,
1084227584);
v30 = Block;
si128.m128i_i64[0] = 12;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Ref\nChannel:");
BYTE5(Block[1]) = 0;
HIWORD(Block[1]) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, -55.0);
cocos2d::CCPoint::operator+(v31, &v29, v11);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
71,
(unsigned int)Block,
(unsigned int)&v29,
1058642330,
1,
2,
6,
0,
0,
0,
0,
0,
0,
2,
0,
v29);
v30 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 5;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Fade:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, -130.0, -100.0);
cocos2d::CCPoint::operator+(v31, &v29, v12);
SetupTriggerPopup::createValueControl(
(_DWORD)a1,
181,
(unsigned int)Block,
(unsigned int)&v29,
1058642330,
-1082130432,
1065353216);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v38,
(float)((float)(v36 * 0.5) - (float)(a1[183] * 0.5)) + 20.0,
(float)((float)((float)(v37 * 0.5) - (float)(a1[184] * 0.5)) + 20.0) + 30.0);
v30 = Block;
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 6;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "Target");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, (const struct cocos2d::CCPoint *)v38);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 188, (unsigned int)Block, v13, 0, 0, 0, 1065353216);
v30 = Block;
Block[1] = (void *)121;
si128.m128i_i64[0] = 9;
si128.m128i_i64[1] = 15;
Block[0] = (void *)0x6C6E4F7974706D45LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 90.0, 0.0);
cocos2d::CCPoint::operator+(v38, &v29, v14);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
515,
(unsigned int)Block,
(unsigned int)&v29,
0,
0,
0,
1065353216);
v30 = 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 *)&v32, 130.0, 0.0);
cocos2d::CCPoint::operator+(v31, &v29, v15);
LOBYTE(v27) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
290,
(unsigned int)Block,
(unsigned int)&v29,
1058642330,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
0,
2,
v27);
v30 = 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 *)&v32, 130.0, -50.0);
cocos2d::CCPoint::operator+(v31, &v29, v16);
LOBYTE(v28) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
291,
(unsigned int)Block,
(unsigned int)&v29,
1058642330,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
0,
2,
v28);
Block[1] = (void *)58;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365A0);
Block[0] = (void *)0x44497265746E6543LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, 130.0, 0.0);
cocos2d::CCPoint::operator+(v31, &v29, v17);
v18 = (__int64)(a1 + 136);
if ( !a1 )
v18 = 0;
IDNameInput::create(
(__int64)a1,
v18,
1,
51,
(__int64)Block,
(const struct cocos2d::CCPoint *)&v29,
1058642330,
6,
100,
0,
0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v19 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v19 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v19 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v19);
}
v30 = (void **)&v33;
v33 = 0;
v34 = 2;
v35 = 15;
strcpy((char *)&v33, "P1");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 90.0, -40.0);
cocos2d::CCPoint::operator+(v31, &v29, v20);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
138,
(unsigned int)&v33,
(unsigned int)&v29,
0,
0,
100,
1065353216);
v30 = (void **)&v33;
v33 = 0;
v34 = 2;
v35 = 15;
strcpy((char *)&v33, "P2");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 160.0, -40.0);
cocos2d::CCPoint::operator+(v31, &v29, v21);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
200,
(unsigned int)&v33,
(unsigned int)&v29,
0,
0,
100,
1065353216);
v22 = (*(float (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 188) != 0.0;
(*(void (__fastcall **)(float *, __int64, bool))(*(_QWORD *)a1 + 1088LL))(a1, 100, v22);
(*(void (__fastcall **)(float *, __int64, bool))(*(_QWORD *)a1 + 1088LL))(a1, 101, !v22);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, 65.0, -100.0);
cocos2d::CCPoint::operator+(v31, &v29, v23);
return SetupTriggerPopup::createEasingControls((_DWORD)a1, (unsigned int)&v29, v24, v25, 0);
}