//
// AccountRegisterLayer::resetLabel from 0x14008e290 to 0x14008e3d6 (326 bytes)
//
// 2 xrefs:
// > AccountRegisterLayer::textInputClosed @ 0x14008f15f
// > ??> @ 0x1409129a4
//
// 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:59 +0000
//
__int64 __fastcall AccountRegisterLayer::resetLabel(_QWORD *a1, int a2)
{
int v3; // edx
int v4; // edx
int v5; // edx
int v6; // edx
__int64 v7; // rcx
__int64 result; // rax
__int64 v9; // rcx
v3 = a2 - 1;
if ( !v3 )
{
(**(void (__fastcall ***)(__int64, __int128 *))(a1[90] + 360LL))(a1[90] + 360LL, &xmmword_1407169B0);
v7 = a1[90];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v7 + 368))(v7 + 368, &word_140702D04);
}
v4 = v3 - 1;
if ( v4 )
{
v5 = v4 - 1;
if ( v5 )
{
v6 = v5 - 1;
if ( v6 )
{
if ( v6 != 1 )
return result;
}
else
{
(**(void (__fastcall ***)(__int64, int *))(a1[94] + 360LL))(a1[94] + 360LL, &dword_140716A8C);
(**(void (__fastcall ***)(__int64, __int16 *))(a1[94] + 368LL))(a1[94] + 368LL, &word_140702D04);
}
(**(void (__fastcall ***)(__int64, __int64 *))(a1[95] + 360LL))(a1[95] + 360LL, &qword_140716A28);
v7 = a1[95];
}
else
{
(**(void (__fastcall ***)(__int64, __int128 *))(a1[93] + 360LL))(a1[93] + 360LL, &xmmword_140716A60);
v7 = a1[93];
}
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v7 + 368))(v7 + 368, &word_140702D04);
}
(**(void (__fastcall ***)(__int64, __int64 *))(a1[91] + 360LL))(a1[91] + 360LL, &qword_140716968);
result = (**(__int64 (__fastcall ***)(__int64, __int16 *))(a1[91] + 368LL))(a1[91] + 368LL, &word_140702D04);
v9 = a1[92];
if ( v9 )
return (**(__int64 (__fastcall ***)(__int64, char *))(v9 + 360))(v9 + 360, &byte_1406ED6E0);
return result;
}