//
// SetupTriggerPopup::addHelpButton from 0x9e4fa0 to 0x9e51ec (588 bytes)
//
// 91 xrefs:
// > CustomizeObjectSettingsPopup::init @ 0x844344
// > SetupEnterTriggerPopup::init @ 0x8c7a34
// > SetupMoveCommandPopup::init @ 0x8e4784
// > SetupObjectTogglePopup::init @ 0x8e9434
// > SetupObjectTogglePopup::init @ 0x8e9508
// > SetupObjectTogglePopup::init @ 0x8e9788
// > SetupSpawnPopup::init @ 0x8eaf94
// > SetupRotateCommandPopup::init @ 0x928fb8
// > SetItemIDLayer::init @ 0x94ba50
// > SetTargetIDLayer::init @ 0x94c80c
// > SetupAnimSettingsPopup::init @ 0x94e820
// > SetupInstantCollisionTriggerPopup::init @ 0x951588
// > SetupCollisionStateTriggerPopup::init @ 0x952578
// > SetupInteractObjectPopup::init @ 0x954c0c
// > SetupPickupTriggerPopup::init @ 0x957944
// > SetupRotatePopup::init @ 0x958824
// > SetupStaticCameraPopup::init @ 0x96aee8
// > SetupZoomTriggerPopup::init @ 0x96bd84
// > SetupPlatformerEndPopup::init @ 0x96f3fc
// > SetupObjectOptions2Popup::init @ 0x97c398
// > SetupTransformPopup::init @ 0x9a8ab0
// > SetupSongTriggerPopup::init @ 0x9aa0d0
// > SetupCameraRotatePopup2::init @ 0x9add6c
// > SetupOptionsTriggerPopup::init @ 0x9e27c8
// > SetupRotateGameplayPopup::init @ 0x9ef694
// > SetupGameplayOffsetPopup::init @ 0x9f0500
// > SetupTeleportPopup::init @ 0x9f13fc
// > SetupGradientPopup::init @ 0x9fa520
// > SetupShaderEffectPopup::setupShaderTrigger @ 0x9fc560
// > SetupShaderEffectPopup::setupShockWave @ 0x9fce00
// > SetupShaderEffectPopup::setupShockLine @ 0x9fe3d8
// > SetupShaderEffectPopup::setupGlitch @ 0x9ff8a8
// > SetupShaderEffectPopup::setupChromatic @ 0xa00158
// > SetupShaderEffectPopup::setupChromaticGlitch @ 0xa008c4
// > SetupShaderEffectPopup::setupPixelate @ 0xa01304
// > SetupShaderEffectPopup::setupLensCircle @ 0xa01bf0
// > SetupShaderEffectPopup::setupRadialBlur @ 0xa02798
// > SetupShaderEffectPopup::setupMotionBlur @ 0xa03498
// > SetupShaderEffectPopup::setupBulge @ 0xa0438c
// > SetupShaderEffectPopup::setupPinch @ 0xa04eb8
// > SetupShaderEffectPopup::setupGrayscale @ 0xa05d70
// > SetupShaderEffectPopup::setupSepia @ 0xa06420
// > SetupShaderEffectPopup::setupInvertColor @ 0xa06880
// > SetupShaderEffectPopup::setupHueShift @ 0xa0713c
// > SetupShaderEffectPopup::setupColorChange @ 0xa075d4
// > SetupShaderEffectPopup::setupSplitScreen @ 0xa07e70
// > SetupAreaMoveTriggerPopup::init @ 0xa0b3c0
// > SetupAreaTransformTriggerPopup::init @ 0xa0c868
// > SetupAreaRotateTriggerPopup::init @ 0xa0d550
// > SetupAreaFadeTriggerPopup::init @ 0xa0e098
// > SetupAreaTintTriggerPopup::init @ 0xa0eca4
// > SetupAreaTriggerPopup::init @ 0xa0fb28
// > SetupAreaAnimTriggerPopup::init @ 0xa10744
// > SetupEnterEffectPopup::init @ 0xa13648
// > SetupEnterEffectPopup::init @ 0xa13bc4
// > SetupEnterEffectPopup::init @ 0xa13d8c
// > SetupEnterEffectPopup::init @ 0xa14088
// > SetupEnterEffectPopup::init @ 0xa14264
// > SetupEnterEffectPopup::init @ 0xa1462c
// > SetupAdvFollowPopup::init @ 0xa1866c
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1d4b0
// > SetupAdvFollowRetargetPopup::init @ 0xa1e704
// > SetupBGSpeedTrigger::init @ 0xa216e0
// > SetupGravityTriggerPopup::init @ 0xa2208c
// > SetupKeyframeAnimPopup::init @ 0xa3a518
// > SetupKeyframePopup::init @ 0xa3b4b4
// > SetupReverbPopup::init @ 0xa3f4f8
// > SetupSFXPopup::init @ 0xa403a0
// > SetupSFXEditPopup::init @ 0xa41b34
// > SetupEventLinkPopup::init @ 0xa442d4
// > SetupPlayerControlPopup::init @ 0xa44cfc
// > SetupSpawnParticlePopup::init @ 0xa4573c
// > SetupCheckpointPopup::init @ 0xa4669c
// > MultiTriggerPopup::init @ 0xa46f98
// > UIObjectSettingsPopup::init @ 0xa475cc
// > SetupResetTriggerPopup::init @ 0xa486b4
// > SetupItemEditTriggerPopup::init @ 0xa4a68c
// > SetupItemCompareTriggerPopup::init @ 0xa4cdc8
// > SetupCoinLayer::init @ 0xa4e66c
// > SetupPersistentItemTriggerPopup::init @ 0xa4edb0
// > SetupAudioLineGuidePopup::init @ 0xa4f758
// > SetupCameraGuidePopup::init @ 0xa5024c
// > SetupForceBlockPopup::init @ 0xa50bac
// > SetupArtSwitchPopup::init @ 0xa518dc
// > SetupStopTriggerPopup::init @ 0xa52178
// > SetupObjectControlPopup::init @ 0xa52c70
// > SetupDashRingPopup::init @ 0xa532f4
// > SetupTimerTriggerPopup::init @ 0xa7b704
// > SetupTimerEventTriggerPopup::init @ 0xa7c420
// > SetupTimerControlTriggerPopup::init @ 0xa7cd38
// > ??> @ 0xa99c8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall SetupTriggerPopup::addHelpButton(__int64 a1, float a2)
{
float *v4; // x22
void *v5; // x0
void *v6; // x0
__int64 *v7; // x0
__int64 v8; // x2
cocos2d::CCDirector *v9; // x0
cocos2d::CCNode *v10; // x25
void (__fastcall *v11)(float *, __int64 *, float, float); // x20
unsigned int *v13; // x1
int v14; // w2
unsigned int *v15; // x1
int v16; // w2
float v17; // [xsp+60h] [xbp+60h]
float v18; // [xsp+64h] [xbp+64h]
cocos2d::CCPoint v19; // [xsp+68h] [xbp+68h] BYREF
__int64 v20; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint v21; // 0:kr08_8.8
sub_D18D28(&v19);
sub_D18D28(&v20);
v4 = (float *)InfoAlertButton::create(1.0);
v5 = (void *)(v20 - 24);
if ( (__int64 *)(v20 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v20 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *(_DWORD *)(v20 - 8);
*(_DWORD *)(v20 - 8) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v5);
}
v6 = (void *)(*(_QWORD *)&v19 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v19 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v15 = (unsigned int *)(*(_QWORD *)&v19 - 8LL);
do
v16 = __ldaxr(v15);
while ( __stlxr(v16 - 1, v15) );
}
else
{
v16 = *(_DWORD *)(*(_QWORD *)&v19 - 8LL);
*(_DWORD *)(*(_QWORD *)&v19 - 8LL) = v16 - 1;
}
if ( v16 <= 0 )
operator delete(v6);
}
v7 = *(__int64 **)(a1 + 544);
v8 = *v7;
v4[122] = a2;
(*(void (__fastcall **)(__int64 *, float *))(v8 + 440))(v7, v4);
v9 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v9);
v10 = *(cocos2d::CCNode **)(a1 + 544);
v11 = *(void (__fastcall **)(float *, __int64 *, float, float))(*(_QWORD *)v4 + 184LL);
cocos2d::CCPoint::CCPoint(
&v19,
18.0 - (float)((float)(*(float *)(a1 + 708) * 0.5) - (float)(v17 * 0.5)),
(float)((float)(*(float *)(a1 + 712) * 0.5) + (float)(v18 * 0.5)) - 18.0);
v21 = cocos2d::CCNode::convertToNodeSpace(v10, &v19);
v11(v4, &v20, v21.x, v21.y);
return _stack_chk_guard;
}