//
// KeybindingsSettingsPopup::FLAlert_Clicked from 0x1403d9d80 to 0x1403d9efe (382 bytes)
//
// 2 xrefs:
// > ??> @ 0x140786a78
// > ??> @ 0x140924be4
//
// 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:31:38 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall KeybindingsSettingsPopup::FLAlert_Clicked(__int64 a1, __int64 a2, char a3)
{
int v4; // eax
__m128i si128; // xmm3
__int64 v6; // rcx
__int128 v7; // xmm2
int v8; // esi
__int64 v9; // rax
__int64 v10; // rbx
__int64 *v11; // r8
__int64 v12; // rcx
__int64 v13; // rdx
void *v14; // rcx
void *Block[2]; // [rsp+30h] [rbp-38h] BYREF
__m128i v16; // [rsp+40h] [rbp-28h]
v4 = *(_DWORD *)(a1 + 40);
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
v16 = si128;
LOBYTE(Block[0]) = 0;
v6 = a1 + 48;
if ( Block != (void **)v6 )
{
v7 = *(_OWORD *)Block;
*(_OWORD *)Block = *(_OWORD *)v6;
v16 = *(__m128i *)(v6 + 16);
*(_OWORD *)v6 = v7;
*(__m128i *)(v6 + 16) = si128;
}
v8 = *(_DWORD *)(a1 + 80);
*(_DWORD *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 80) = 0;
if ( a3 )
{
if ( v4 == 1 )
{
v9 = GJKeybindManager::sharedState();
GJKeybindManager::loadDefaults(v9);
}
else
{
if ( v4 != 2 )
goto LABEL_11;
v10 = GJKeybindManager::sharedState();
LOBYTE(v11) = 1;
GJKeybindManager::parseBindsBlob(v10, Block, v11, nullptr, nullptr);
GJKeybindManager::applyNewDefaults(v10, v8);
}
v12 = *(_QWORD *)(a1 + 8);
if ( v12 )
cocos2d::CCNode::scheduleOnce(v12, FLAlertLayer::rebuildContentDeferred);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 664) + 992LL))(a1 - 664, 0);
LOBYTE(v13) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(a1 - 664) + 520LL))(a1 - 664, v13);
}
LABEL_11:
if ( v16.m128i_i64[1] > 0xFuLL )
{
v14 = Block[0];
if ( (unsigned __int64)(v16.m128i_i64[1] + 1) >= 0x1000 )
{
v14 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v14);
}
}