//
// StarInfoPopup::createFromStringMoons from 0x1007bec20 to 0x1007bee5a (570 bytes)
//
// 1 xrefs:
// > ProfilePage::onStatInfo @ 0x1007bc994
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
StarInfoPopup *__fastcall StarInfoPopup::createFromStringMoons(__int64 a1)
{
char *v1; // r14
int v2; // edi
int v3; // esi
int v4; // r12d
int v5; // r13d
int v6; // ebx
int v7; // r15d
int v8; // eax
int v9; // eax
bool v10; // zf
const char *v11; // r14
int v12; // eax
StarInfoPopup *result; // rax
void **v14; // rbx
StarInfoPopup *v15; // r14
void **v16; // r15
void *v17; // rdi
void *__p[2]; // [rsp+20h] [rbp-50h] BYREF
__int64 v19; // [rsp+30h] [rbp-40h]
int v20; // [rsp+40h] [rbp-30h]
int v21; // [rsp+44h] [rbp-2Ch]
*(_OWORD *)__p = 0;
v19 = 0;
sub_1007C0FA0(a1, __p);
v1 = (char *)__p[0];
v2 = 0;
v3 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = 0;
v8 = 0;
if ( 0xAAAAAAAAAAAAAAABLL * (((char *)__p[1] - (char *)__p[0]) >> 3) >= 7 )
{
if ( (*(_BYTE *)__p[0] & 1) != 0 )
{
v20 = atoi(*((const char **)__p[0] + 2));
if ( (v1[24] & 1) != 0 )
{
LABEL_4:
v9 = atoi(*((const char **)v1 + 5));
v10 = (v1[48] & 1) == 0;
v21 = v9;
if ( !v10 )
goto LABEL_5;
goto LABEL_12;
}
}
else
{
v20 = atoi((const char *)__p[0] + 1);
if ( (v1[24] & 1) != 0 )
goto LABEL_4;
}
v12 = atoi(v1 + 25);
v10 = (v1[48] & 1) == 0;
v21 = v12;
if ( !v10 )
{
LABEL_5:
v4 = atoi(*((const char **)v1 + 8));
if ( (v1[72] & 1) != 0 )
goto LABEL_6;
goto LABEL_13;
}
LABEL_12:
v4 = atoi(v1 + 49);
if ( (v1[72] & 1) != 0 )
{
LABEL_6:
v5 = atoi(*((const char **)v1 + 11));
if ( (v1[96] & 1) != 0 )
goto LABEL_7;
goto LABEL_14;
}
LABEL_13:
v5 = atoi(v1 + 73);
if ( (v1[96] & 1) != 0 )
{
LABEL_7:
v6 = atoi(*((const char **)v1 + 14));
if ( (v1[120] & 1) != 0 )
goto LABEL_8;
goto LABEL_15;
}
LABEL_14:
v6 = atoi(v1 + 97);
if ( (v1[120] & 1) != 0 )
{
LABEL_8:
v7 = atoi(*((const char **)v1 + 17));
if ( (v1[144] & 1) != 0 )
{
LABEL_9:
v11 = *((const char **)v1 + 20);
LABEL_17:
v8 = atoi(v11);
v2 = v20;
v3 = v21;
goto LABEL_18;
}
LABEL_16:
v11 = v1 + 145;
goto LABEL_17;
}
LABEL_15:
v7 = atoi(v1 + 121);
if ( (v1[144] & 1) != 0 )
goto LABEL_9;
goto LABEL_16;
}
LABEL_18:
result = StarInfoPopup::create(v2, v3, v4, v5, v6, v7, 0, 0, v8, 1);
v14 = (void **)__p[0];
if ( __p[0] )
{
v15 = result;
v16 = (void **)__p[1];
v17 = __p[0];
if ( __p[1] != __p[0] )
{
do
{
if ( (*(_BYTE *)(v16 - 3) & 1) != 0 )
operator delete(*(v16 - 1));
v16 -= 3;
}
while ( v16 != v14 );
v17 = __p[0];
}
__p[1] = v14;
operator delete(v17);
return v15;
}
return result;
}