//
// FindObjectPopup::init from 0x8d25d4 to 0x8d27c0 (492 bytes)
//
// 3 xrefs:
// > FindObjectPopup::create @ 0x8d2d9c
// > ??> @ 0x3fc48
// > ??> @ 0x119b390
//
// 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
//
bool FindObjectPopup::init(FindObjectPopup *a1)
{
int v2; // w23
cocos2d::CCPoint *p_m_textOffset; // x0
void *v4; // x0
cocos2d::CCDirector *v5; // x0
unsigned int *v7; // x1
int v8; // w2
unsigned int *p_m_caption; // x1
int m_data; // w2
__int64 v11; // [xsp+68h] [xbp+58h] BYREF
ButtonSprite *v12; // [xsp+70h] [xbp+60h] BYREF
sub_D153B8((int)&v11, "Find GroupID");
sub_D153B8((int)&v12, "OK");
v2 = (unsigned __int8)SetIDPopup::init(a1, 0, 0, 9999999, 0.0, (__int64)&v11, &v12, 0, 0, 1, 0);
p_m_textOffset = &v12[-1].m_textOffset;
if ( &v12[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_caption = (unsigned int *)&v12[-1].m_caption;
do
m_data = __ldaxr(p_m_caption);
while ( __stlxr(m_data - 1, p_m_caption) );
}
else
{
m_data = (int)v12[-1].m_caption.m_data.m_data;
LODWORD(v12[-1].m_caption.m_data.m_data) = m_data - 1;
}
if ( m_data <= 0 )
operator delete(p_m_textOffset);
}
v4 = (void *)(v11 - 24);
if ( (__int64 *)(v11 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v11 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *(_DWORD *)(v11 - 8);
*(_DWORD *)(v11 - 8) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v4);
}
if ( v2 )
{
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v5);
}
return v2;
}