//
// GJGameLevel::dtExpandOrder from 0x140265830 to 0x14026594c (284 bytes)
//
// 24 xrefs:
// > DeathTrackerPopup::init @ 0x1401046e8
// > DeathTrackerPopup::parseSessions @ 0x140105fbd
// > DeathTrackerPopup::parseGlobal @ 0x140106563
// > DeathTrackerPopup::countsForScope @ 0x1401067a8
// > DeathTrackerPopup::countsForScope @ 0x140106855
// > DeathTrackerPopup::countsForScope @ 0x140106928
// > DeathTrackerPopup::countsForScope @ 0x140106995
// > DeathTrackerPopup::refreshView @ 0x140106c89
// > DeathTrackerPopup::refreshView @ 0x140106ce3
// > DeathTrackerPopup::refreshView @ 0x140106d77
// > DeathTrackerPopup::refreshView @ 0x140106daf
// > DeathTrackerPopup::buildAttemptLine @ 0x1401096be
// > DeathTrackerPopup::buildAttemptLine @ 0x140109782
// > DeathTrackerPopup::buildList @ 0x14010a651
// > DeathTrackerPopup::buildList @ 0x14010a6e5
// > DeathTrackerPopup::buildList @ 0x14010a7e3
// > DeathTrackerPopup::buildList @ 0x14010a853
// > DeathTrackerPopup::buildHistory @ 0x14010c419
// > DeathTrackerPopup::buildHistory @ 0x14010c43a
// > GJGameLevel::rollSession @ 0x140265f03
// > PlayLayer::resetLevel @ 0x1405197b1
// > ??> @ 0x1408ac08c
// > ??> @ 0x1408ac09c
// > ??> @ 0x14091c928
//
// 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:28:49 +0000
//
void __fastcall GJGameLevel::dtExpandOrder(_QWORD *a1, __int64 a2, __int64 a3)
{
unsigned __int64 v3; // r12
unsigned __int64 v4; // rbp
_QWORD *v7; // r14
unsigned __int64 v8; // rax
char *v9; // rdi
__int64 v10; // rax
unsigned __int64 v11; // r15
unsigned __int64 v12; // rdi
_QWORD *v13; // rax
const char *v14; // r14
const char *v15; // rcx
int v16; // ebp
int v17; // eax
__int64 v18; // rdi
_BYTE *v19; // rdx
int v20; // [rsp+50h] [rbp+8h] BYREF
v3 = a1[2];
v4 = 0;
if ( v3 )
{
while ( 1 )
{
v7 = a1;
if ( a1[3] > 0xFu )
v7 = (_QWORD *)*a1;
v8 = a1[2];
if ( v4 >= v8
|| (v9 = (char *)v7 + v8,
LOBYTE(a3) = 44,
v10 = sub_140677120((char *)v7 + v4, (char *)v7 + v8, a3),
(char *)v10 == v9)
|| (v11 = v10 - (_QWORD)v7, v10 - (_QWORD)v7 == -1) )
{
v11 = v3;
}
v12 = a1[3];
v13 = a1;
if ( v12 > 0xF )
v13 = (_QWORD *)*a1;
v14 = (const char *)memchr((char *)v13 + v4, 120, v11 - v4);
v15 = (const char *)a1;
if ( v12 > 0xF )
v15 = (const char *)*a1;
v20 = atoi(&v15[v4]);
v16 = v20;
if ( !v14 )
break;
v17 = atoi(v14 + 1);
if ( v17 > 0 )
goto LABEL_16;
LABEL_21:
v4 = v11 + 1;
if ( v11 + 1 >= v3 )
return;
}
v17 = 1;
LABEL_16:
v18 = (unsigned int)v17;
do
{
v19 = *(_BYTE **)(a2 + 8);
if ( v19 == *(_BYTE **)(a2 + 16) )
{
sub_140069B30((const void **)a2, v19, &v20);
}
else
{
*(_DWORD *)v19 = v16;
*(_QWORD *)(a2 + 8) += 4LL;
}
--v18;
}
while ( v18 );
goto LABEL_21;
}
}