//
// sub_140075B80 from 0x140075b80 to 0x140075cc3 (323 bytes)
//
// 3 xrefs:
// > GameToolbox::stringSetupToMap @ 0x14006fbc1
// > AutoBackupPopup::assignRevs @ 0x1400ca474
// > ??> @ 0x140911960
//
// 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:25:51 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall sub_140075B80(__int64 *a1, _QWORD *a2)
{
__int64 v4; // rbp
__int64 v5; // rbx
__int64 v6; // rdi
int v7; // eax
unsigned int v8; // ecx
__int64 *v9; // rax
_OWORD *v10; // rdi
__int128 v12; // [rsp+20h] [rbp-48h] BYREF
__int128 v13; // [rsp+30h] [rbp-38h]
v4 = *a1;
v5 = *(_QWORD *)(*a1 + 8);
*(_QWORD *)&v13 = v5;
DWORD2(v13) = 0;
v6 = v4;
if ( !*(_BYTE *)(v5 + 25) )
{
do
{
*(_QWORD *)&v13 = v5;
v7 = sub_14003D160((_QWORD *)(v5 + 32), a2);
v8 = (unsigned int)v7 >> 31;
if ( v7 >= 0 )
{
DWORD2(v13) = 1;
v6 = v5;
}
else
{
DWORD2(v13) = 0;
}
v9 = (__int64 *)(v5 + 16);
if ( !(_BYTE)v8 )
v9 = (__int64 *)v5;
v5 = *v9;
}
while ( !*(_BYTE *)(*v9 + 25) );
}
if ( *(_BYTE *)(v6 + 25) || sub_14003D160(a2, (_QWORD *)(v6 + 32)) < 0 )
{
if ( a1[1] == 0x2AAAAAAAAAAAAAALL )
sub_14005BD90();
v10 = operator new(0x60u);
sub_14003F4F0((__int64)(v10 + 2), (__int64)a2);
v10[4] = 0;
*((_QWORD *)v10 + 10) = 0;
*((_QWORD *)v10 + 11) = 15;
*((_BYTE *)v10 + 64) = 0;
*(_QWORD *)v10 = v4;
*((_QWORD *)v10 + 1) = v4;
*((_QWORD *)v10 + 2) = v4;
*((_WORD *)v10 + 12) = 0;
v12 = v13;
v6 = sub_14006A770(a1, (__int64)&v12, (__int64)v10);
}
return v6 + 64;
}