//
// sub_14038CEE0 from 0x14038cee0 to 0x14038cfa6 (198 bytes)
//
// 11 xrefs:
// > GJKeybindManager::loadDefaults @ 0x14038ab82
// > GJKeybindManager::loadDefaults @ 0x14038ab8b
// > GJKeybindManager::parseBindsBlob @ 0x14038b88e
// > GJKeybindManager::parseBindsBlob @ 0x14038b897
// > GJKeybindManager::applyNewDefaults @ 0x14038bcdd
// > GJKeybindManager::applyNewDefaults @ 0x14038bce5
// > ??> @ 0x1408be024
// > ??> @ 0x1408be038
// > ??> @ 0x1408be06c
// > ??> @ 0x140922dcc
// > ??> @ 0x140922dd8
//
// 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:09 +0000
//
void __fastcall sub_14038CEE0(_QWORD *a1)
{
unsigned __int64 v2; // rcx
void ***v3; // rsi
void **v4; // rsi
void **v5; // rbx
unsigned __int64 *v6; // rdx
unsigned __int64 *v7; // rcx
unsigned __int64 v8; // [rsp+30h] [rbp+8h] BYREF
v2 = a1[2];
if ( v2 )
{
v3 = (void ***)a1[1];
if ( a1[7] >> 3 <= v2 )
{
*v3[1] = nullptr;
v4 = *v3;
if ( v4 )
{
do
{
v5 = (void **)*v4;
sub_1400BD560(v4 + 3, (__int64)(v4 + 3));
j_j_free(v4);
v4 = v5;
}
while ( v5 );
}
*(_QWORD *)a1[1] = a1[1];
*(_QWORD *)(a1[1] + 8LL) = a1[1];
a1[2] = 0;
v6 = (unsigned __int64 *)a1[4];
v7 = (unsigned __int64 *)a1[3];
v8 = a1[1];
sub_14003EC90(v7, v6, &v8);
}
else
{
sub_14038D390(a1, *v3, a1[1]);
}
}
}