//
// AccountRegisterLayer::updateLabel from 0x14008e020 to 0x14008e286 (614 bytes)
//
// 2 xrefs:
// > AccountRegisterLayer::registerAccountFailed @ 0x14008dff0
// > ??> @ 0x140912998
//
// 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::updateLabel(_QWORD *a1, int a2)
{
const char *v3; // rdx
__int64 v4; // rcx
__int64 (__fastcall ***v5)(_QWORD, __int16 *); // rcx
__int16 v7; // [rsp+38h] [rbp+10h] BYREF
char v8; // [rsp+3Ah] [rbp+12h]
switch ( a2 )
{
case -99:
(**(void (__fastcall ***)(__int64, const char *))(a1[95] + 360LL))(a1[95] + 360LL, "Emails do not match");
v4 = a1[95];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -15:
(**(void (__fastcall ***)(__int64, const char *))(a1[92] + 360LL))(a1[92] + 360LL, "Too common");
v4 = a1[92];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -14:
(**(void (__fastcall ***)(__int64, const char *))(a1[92] + 360LL))(a1[92] + 360LL, "Invalid characters");
v4 = a1[92];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -9:
v3 = "Too short. Minimum 3 characters";
goto LABEL_14;
case -8:
(**(void (__fastcall ***)(__int64, const char *))(a1[92] + 360LL))(a1[92] + 360LL, "Minimum 8 characters");
v5 = (__int64 (__fastcall ***)(_QWORD, __int16 *))(a1[92] + 368LL);
v7 = -21896;
v8 = -16;
return (**v5)(v5, &v7);
case -7:
(**(void (__fastcall ***)(__int64, const char *))(a1[93] + 360LL))(a1[93] + 360LL, "Passwords do not match");
v4 = a1[93];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -6:
(**(void (__fastcall ***)(__int64, const char *))(a1[94] + 360LL))(a1[94] + 360LL, "Cannot use this email");
v4 = a1[94];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -5:
(**(void (__fastcall ***)(__int64, const char *))(a1[92] + 360LL))(a1[92] + 360LL, "Password is invalid");
v4 = a1[92];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -4:
v3 = "Username is invalid";
goto LABEL_14;
case -3:
(**(void (__fastcall ***)(__int64, const char *))(a1[94] + 360LL))(a1[94] + 360LL, "Email is already in use");
v4 = a1[94];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
case -2:
v3 = "Username is already in use";
goto LABEL_14;
default:
v3 = "Something went wrong.";
LABEL_14:
(**(void (__fastcall ***)(__int64, const char *))(a1[90] + 360LL))(a1[90] + 360LL, v3);
v4 = a1[90];
return (**(__int64 (__fastcall ***)(__int64, __int16 *))(v4 + 368))(v4 + 368, &word_140702D00);
}
}