//
// cocos2d::extension::CCEditBoxImplAndroid::setText from 0x5ab418 to 0x5ab516 (254 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall cocos2d::extension::CCEditBoxImplAndroid::setText(int this, char *a2)
{
int v2; // r4
int v3; // r7
int v4; // r0
int v5; // r1
int v6; // r8
int i; // r7
float v8; // s16
int v9; // r0
void *v10; // [sp+0h] [bp-1Ch] BYREF
cocos2d::CCRect v11; // [sp+4h] [bp-18h] BYREF
v2 = this;
if ( a2 )
{
v3 = this + 32;
sub_7753D4(this + 32, a2);
v4 = *(_DWORD *)(v2 + 16);
if ( *(_DWORD *)(*(_DWORD *)(v2 + 32) - 12) )
{
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v4 + 164))(v4, 0);
v10 = &unk_ACDDA8;
if ( *(_DWORD *)(v2 + 24) )
{
sub_775D40(&v10, v3);
}
else
{
v6 = cocos2d::cc_utf8_strlen(*(const char **)(v2 + 32), v5);
for ( i = 0; i < v6; ++i )
sub_774544((int)&v10, byte_9A520E);
}
(*(void (__fastcall **)(_DWORD, void *))(**(_DWORD **)(v2 + 12) + 612))(*(_DWORD *)(v2 + 12), v10);
v8 = *(float *)(v2 + 52) - 10.0;
cocos2d::CCRect::CCRect(&v11, (const cocos2d::CCRect *)(*(_DWORD *)(v2 + 12) + 336));
if ( v11.size.width > v8 )
{
v9 = *(_DWORD *)(v2 + 12);
v11.size.width = v8;
(*(void (__fastcall **)(int, cocos2d::CCRect *))(*(_DWORD *)v9 + 560))(v9, &v11);
}
return sub_774008(&v10);
}
else
{
(*(void (__fastcall **)(int, int))(*(_DWORD *)v4 + 164))(v4, 1);
return (*(int (__fastcall **)(_DWORD, void *))(**(_DWORD **)(v2 + 12) + 612))(*(_DWORD *)(v2 + 12), &unk_939830);
}
}
return this;
}