//
// sub_10091E4F0 from 0x10091e4f0 to 0x10091e79b (683 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b93e18
//
// 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 12:38:15 +0000
//
void __fastcall sub_10091E4F0(__int64 a1)
{
_QWORD *v1; // rax
int v2; // eax
const std::string::value_type *data; // rsi
std::string::size_type size; // rdx
char *v5; // rax
std::string::pointer v6; // rdi
const std::string::value_type *v7; // rsi
std::string::size_type v8; // rdx
char *v9; // rbx
_QWORD v10[2]; // [rsp+8h] [rbp-98h] BYREF
char *v11; // [rsp+18h] [rbp-88h]
std::string __str; // [rsp+20h] [rbp-80h] BYREF
__int128 v13; // [rsp+40h] [rbp-60h] BYREF
void *__p; // [rsp+50h] [rbp-50h]
std::string v15; // [rsp+58h] [rbp-48h] BYREF
int __val; // [rsp+70h] [rbp-30h] BYREF
int v17; // [rsp+74h] [rbp-2Ch] BYREF
std::string v18; // [rsp+78h] [rbp-28h] BYREF
int v19[3]; // [rsp+94h] [rbp-Ch] BYREF
memset(&__str, 0, sizeof(__str));
__val = 0;
v19[0] = 0;
v17 = 0;
v1 = (_QWORD *)GJKeybindManager::sharedState();
v2 = sub_1006196A0(v1, &__str, &__val, v19, &v17);
if ( v2 < 0 )
goto LABEL_25;
if ( !v2 )
{
v11 = (char *)operator new(0x38u);
v10[0] = 57;
v10[1] = 48;
strcpy(v11, "File is invalid, empty, or from a newer version.");
v5 = FLAlertLayer::create_1(0, (int)"Import Failed", (__int64)v10, (int)"OK", 0, 380.0);
(*(void (__fastcall **)(char *))(*(_QWORD *)v5 + 1312LL))(v5);
if ( (v10[0] & 1) == 0 )
goto LABEL_25;
v6 = v11;
goto LABEL_24;
}
*(_DWORD *)(a1 + 704) = 2;
std::string::operator=((std::string *)(a1 + 712), &__str);
*(_DWORD *)(a1 + 736) = v17;
v15.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x28u);
v15.__r_.__value_.__r.__words[0] = 41;
v15.__r_.__value_.__l.__size_ = 34;
strcpy(v15.__r_.__value_.__l.__data_, "Replace current keybinds with ");
std::to_string(&v18, __val);
if ( (*(_BYTE *)&v18.__r_.__value_.__s.0 & 1) != 0 )
{
data = v18.__r_.__value_.__l.__data_;
size = v18.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&v18.__r_.__value_.__l.0 >> 1;
data = v18.__r_.__value_.__s.__data_;
}
std::string::append(&v15, data, size);
if ( (*(_BYTE *)&v18.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v18.__r_.__value_.__l.__data_);
std::string::append(&v15, " actions from file?");
if ( v19[0] > 0 )
{
std::string::append(&v15, " (");
std::to_string(&v18, v19[0]);
if ( (*(_BYTE *)&v18.__r_.__value_.__s.0 & 1) != 0 )
{
v7 = v18.__r_.__value_.__l.__data_;
v8 = v18.__r_.__value_.__l.__size_;
}
else
{
v8 = *(_BYTE *)&v18.__r_.__value_.__l.0 >> 1;
v7 = v18.__r_.__value_.__s.__data_;
}
std::string::append(&v15, v7, v8);
if ( (*(_BYTE *)&v18.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v18.__r_.__value_.__l.__data_);
std::string::append(&v15, " unknown skipped)");
}
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v13, v15.__r_.__value_.__l.__data_, v15.__r_.__value_.__l.__size_);
}
else
{
__p = v15.__r_.__value_.__l.__data_;
v13 = *(_OWORD *)&v15.__r_.__value_.__l.0;
}
v9 = FLAlertLayer::create_1(
(int)a1 + 664,
(int)"Import Keybinds",
(__int64)&v13,
(int)"Cancel",
(int)"Replace",
380.0);
if ( (v13 & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(char *))(*(_QWORD *)v9 + 1312LL))(v9);
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )
{
v6 = v15.__r_.__value_.__l.__data_;
LABEL_24:
operator delete(v6);
}
LABEL_25:
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
}