//
// PauseLayer::onChangeStartpos from 0x1003c1b70 to 0x1003c1cca (346 bytes)
//
// 6 xrefs:
// > PauseLayer::customSetup @ 0x1003c0cd7
// > PauseLayer::startPosSelected @ 0x1003c21dd
// > sub_1003C21F0 @ 0x1003c2201
// > PauseLayer::createStartPosPopupClosed @ 0x1003c229d
// > PauseLayer::customSetup @ 0x1003c09ff
// > PauseLayer::customSetup @ 0x1003c0acc
//
// 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:29:33 +0000
//
__int64 __fastcall PauseLayer::onChangeStartpos(__int64 a1, __int64 a2)
{
int v3; // r14d
int v4; // eax
int v5; // esi
__int64 v6; // rax
__int64 *v7; // r14
__int64 *v8; // rdi
__int64 v9; // rax
const char *v10; // rsi
__int64 result; // rax
__int64 v12; // rax
__int64 CString; // rax
char v14; // [rsp+0h] [rbp-30h] BYREF
void *__p; // [rsp+10h] [rbp-20h]
if ( !a2 )
{
v4 = sub_1007FEF90(*(_QWORD *)(a1 + 608));
goto LABEL_7;
}
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v4 = sub_1007FEF90(*(_QWORD *)(a1 + 608));
if ( v3 == 1 )
{
v5 = ++*(_DWORD *)(a1 + 600);
if ( v5 >= 0 )
goto LABEL_8;
LABEL_11:
*(_DWORD *)(a1 + 600) = v4;
v5 = v4;
goto LABEL_12;
}
if ( v3 != -1 )
{
LABEL_7:
v5 = *(_DWORD *)(a1 + 600);
if ( v5 >= 0 )
goto LABEL_8;
goto LABEL_11;
}
v5 = --*(_DWORD *)(a1 + 600);
if ( v5 < 0 )
goto LABEL_11;
LABEL_8:
if ( v5 > v4 )
{
*(_DWORD *)(a1 + 600) = 0;
LABEL_15:
v8 = *(__int64 **)(a1 + 592);
v9 = *v8;
v10 = "None";
LABEL_17:
(*(void (__fastcall **)(__int64 *, const char *))(v9 + 928))(v8, v10);
goto LABEL_18;
}
LABEL_12:
if ( !v5 )
goto LABEL_15;
v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 608), (unsigned int)(v5 - 1));
v7 = *(__int64 **)(a1 + 592);
if ( !v6 )
{
v9 = *v7;
v10 = "-";
v8 = *(__int64 **)(a1 + 592);
goto LABEL_17;
}
StartPosObject::getDisplayName(&v14, v6);
v12 = sub_10088E820("%i: %s", v14);
CString = cocos2d::CCString::getCString(v12);
(*(void (__fastcall **)(__int64 *, __int64))(*v7 + 928))(v7, CString);
if ( (v14 & 1) != 0 )
operator delete(__p);
LABEL_18:
result = cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(a1 + 592), 150.0, 0.5, 0.0);
*(_BYTE *)(a1 + 616) = 1;
return result;
}