//
// Dropdown::openList from 0x778578 to 0x77877a (514 bytes)
//
// 1 xrefs:
// > Dropdown::onToggle @ 0x77879e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:21 +0000
//
char **__fastcall Dropdown::openList(char **this)
{
char **v1; // r4
int v2; // r3
unsigned int v3; // r1
unsigned int i; // r6
char *v5; // r2
unsigned int v6; // r2
unsigned int v7; // r1
const cocos2d::CCPoint *v8; // r0
int *v9; // r0
char *v10; // r0
const cocos2d::CCPoint *v11; // r7
const cocos2d::CCSize *v12; // r0
char *v13; // r7
float v14[4]; // [sp+Ch] [bp-68h] BYREF
DropdownListRow *v15; // [sp+1Ch] [bp-58h] BYREF
DropdownListRow *v16; // [sp+20h] [bp-54h]
DropdownListRow *v17; // [sp+24h] [bp-50h] BYREF
float v18; // [sp+28h] [bp-4Ch] BYREF
float v19; // [sp+2Ch] [bp-48h]
DropdownListRow *v20[2]; // [sp+3Ch] [bp-38h] BYREF
DropdownListRow *v21; // [sp+44h] [bp-30h]
unsigned int v22; // [sp+50h] [bp-24h] BYREF
_DWORD v23[6]; // [sp+54h] [bp-20h] BYREF
v1 = this;
if ( !*(this + 96) && *(this + 68) )
{
v2 = *(this + 72) - *(this + 71);
v15 = (DropdownListRow *)*(this + 96);
v16 = nullptr;
v17 = nullptr;
v3 = -1431655765 * (v2 >> 2);
if ( v3 )
{
std::__split_buffer::__split_buffer(&v18, v3, 0, (int)&v17);
std::vector::__swap_out_circular_buffer((int *)&v15, &v18);
std::__split_buffer::~__split_buffer((int)&v18);
}
for ( i = 0; ; ++i )
{
v5 = v1[71];
if ( i >= -1431655765 * ((v1[72] - v5) >> 2) )
break;
v22 = i;
memset(v23, 0, sizeof(v23));
std::string::operator=((unsigned __int8 *)v23, (unsigned __int8 *)&v5[12 * i]);
if ( v16 == v17 )
{
v6 = -1227133513 * ((v16 - v15) >> 2);
if ( v6 + 1 > 0x9249249 )
sub_38AE28();
if ( v6 > 0x4924923 )
{
v7 = 153391689;
}
else
{
v7 = 1840700270 * ((v16 - v15) >> 2);
if ( v7 < v6 + 1 )
v7 = v6 + 1;
}
std::__split_buffer::__split_buffer(v20, v7, v6, (int)&v17);
if ( v21 )
DropdownListRow::DropdownListRow(v21, (const DropdownListRow *)&v22);
v21 = (DropdownListRow *)((char *)v21 + 28);
std::vector::__swap_out_circular_buffer((int *)&v15, v20);
std::__split_buffer::~__split_buffer((int)v20);
}
else
{
if ( v16 )
DropdownListRow::DropdownListRow(v16, (const DropdownListRow *)&v22);
v16 = (DropdownListRow *)((char *)v16 + 28);
}
DropdownListRow::~DropdownListRow((DropdownListRow *)&v22);
}
v8 = (const cocos2d::CCPoint *)(*((int (__fastcall **)(char **, unsigned int))*v1 + 24))(v1, v3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v8);
LODWORD(v14[2]) = Dropdown::onRowSelected;
v14[3] = 0.0;
v9 = DropdownListPopup::create(
(int)&v15,
(const cocos2d::CCPoint *)v20,
(int)(v1 + 78),
(int)v1,
(int)Dropdown::onRowSelected,
0);
v1[96] = (char *)v9;
if ( v9 )
{
v9[168] = (int)(v1 + 66);
v10 = v1[76];
if ( v10 )
{
v11 = (const cocos2d::CCPoint *)v1[68];
if ( v11 )
{
(*(void (__fastcall **)(char *))(*(_DWORD *)v10 + 96))(v10);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v14, v11);
v12 = (const cocos2d::CCSize *)(*(int (__fastcall **)(char *))(*(_DWORD *)v1[76] + 164))(v1[76]);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v18, v12);
v13 = v1[96];
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v20,
v14[0] - (float)(v18 * 0.5),
v14[1] - (float)(v19 * 0.5),
v18,
v19);
cocos2d::CCRect::operator=(v13 + 652, v20);
}
}
(*(void (__fastcall **)(char *))(*(_DWORD *)v1[96] + 656))(v1[96]);
}
return std::__vector_base::~__vector_base((void **)&v15);
}
return this;
}