//
// DemonInfoPopup::createFromString from 0x901628 to 0x90188c (612 bytes)
//
// 2 xrefs:
// > ProfilePage::onStatInfo @ 0x901a7c
// > ??> @ 0x429c0
//
// 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
//
DemonInfoPopup *__fastcall DemonInfoPopup::createFromString(_QWORD *a1)
{
void *v1; // x19
int v2; // w21
int v3; // w24
int v4; // w23
int v5; // w20
int v6; // w0
DemonInfoPopup *v7; // x0
__int64 *v8; // x19
DemonInfoPopup *v9; // x23
__int64 *v10; // x20
__int64 v11; // x1
__int64 *v12; // x0
unsigned int *v13; // x1
int v14; // w2
int v16; // [xsp+78h] [xbp+58h]
int v17; // [xsp+80h] [xbp+60h]
int v18; // [xsp+88h] [xbp+68h]
int v19; // [xsp+90h] [xbp+70h]
int v20; // [xsp+98h] [xbp+78h]
int v21; // [xsp+A0h] [xbp+80h]
int v22; // [xsp+A8h] [xbp+88h]
void *v23; // [xsp+C0h] [xbp+A0h] BYREF
void *p; // [xsp+C8h] [xbp+A8h]
__int64 v25; // [xsp+D0h] [xbp+B0h]
v23 = nullptr;
p = nullptr;
v25 = 0;
sub_900FBC(a1, (__int64)&v23);
v1 = v23;
if ( (unsigned __int64)((_BYTE *)p - (_BYTE *)v23) <= 0x5F )
{
v7 = DemonInfoPopup::create(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
else
{
v2 = atoi(*(const char **)v23);
v16 = atoi(*(const char **)&byte_8[(_QWORD)v1]);
v17 = atoi(*(const char **)((char *)&word_10 + (_QWORD)v1));
v18 = atoi(*(const char **)((char *)&off_18 + (_QWORD)v1));
v19 = atoi(*(const char **)((char *)&qword_20 + (_QWORD)v1));
v20 = atoi(*(const char **)((char *)&qword_28 + (_QWORD)v1));
v21 = atoi(*(const char **)((char *)&dword_30 + (_QWORD)v1));
v22 = atoi(*(const char **)((char *)&word_38 + (_QWORD)v1));
v3 = atoi(*(const char **)((char *)&dword_40 + (_QWORD)v1));
v4 = atoi(*(const char **)((char *)&qword_48 + (_QWORD)v1));
v5 = atoi(*(const char **)((char *)off_50 + (_QWORD)v1));
v6 = atoi(*(const char **)((char *)&qword_58 + (_QWORD)v1));
v7 = DemonInfoPopup::create(v2, v16, v17, v18, v19, v20, v21, v22, v3, v4, v5, v6);
}
v8 = (__int64 *)v23;
v9 = v7;
v10 = (__int64 *)p;
if ( v23 != p )
{
do
{
while ( 1 )
{
v11 = *v8;
v12 = (__int64 *)(*v8 - 24);
if ( v12 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v11 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *(_DWORD *)(v11 - 8);
*(_DWORD *)(v11 - 8) = v14 - 1;
}
if ( v14 <= 0 )
break;
}
if ( v10 == ++v8 )
goto LABEL_12;
}
++v8;
operator delete(v12);
}
while ( v10 != v8 );
LABEL_12:
v10 = (__int64 *)v23;
}
if ( v10 )
operator delete(v10);
return v9;
}