//
// TextArea::setString from 0x6b2b64 to 0x6b2e78 (788 bytes)
//
// 58 xrefs:
// > TextArea::fitString @ 0x6b2f04
// > TextArea::fitString @ 0x6b2f5c
// > TextArea::fitString @ 0x6b304c
// > TextArea::fitString @ 0x6b3120
// > TextArea::init @ 0x6b32e8
// > CCTextInputNode::updateLabel @ 0x6c35e8
// > CCTextInputNode::onTextFieldAttachWithIME @ 0x6c421c
// > AchievementCell::loadFromDict @ 0x7421ac
// > sub_749E58 @ 0x749f40
// > UploadPopup::levelUploadFinished @ 0x7f2890
// > UploadPopup::levelUploadFailed @ 0x7f2a84
// > UploadPopup::init @ 0x7f4f90
// > LevelBrowserLayer::loadPage @ 0x7f9068
// > LevelBrowserLayer::loadPage @ 0x7f91c4
// > LevelBrowserLayer::loadPage @ 0x7f927c
// > EndLevelLayer::customSetup @ 0x8fd168
// > EndLevelLayer::customSetup @ 0x8fd62c
// > EndLevelLayer::customSetup @ 0x8fd6d8
// > EndLevelLayer::customSetup @ 0x8fd71c
// > EndLevelLayer::customSetup @ 0x8fd7a8
// > EndLevelLayer::customSetup @ 0x8fd7ec
// > EndLevelLayer::customSetup @ 0x8fd858
// > EndLevelLayer::customSetup @ 0x8fd8ac
// > LeaderboardsLayer::loadLeaderboardFailed @ 0x94ec8c
// > LeaderboardsLayer::loadLeaderboardFailed @ 0x94ecc0
// > LeaderboardsLayer::loadLeaderboardFailed @ 0x94ed1c
// > AccountLayer::backupAccountFinished @ 0x98d1c0
// > AccountLayer::syncAccountFinished @ 0x98d2fc
// > AccountLayer::syncAccountFailed @ 0x98d458
// > AccountLayer::syncAccountFailed @ 0x98d4d4
// > AccountLayer::syncAccountFailed @ 0x98d524
// > AccountLayer::updatePage @ 0x98d764
// > AccountLayer::updatePage @ 0x98d9a0
// > AccountLayer::updatePage @ 0x98da64
// > AccountHelpLayer::updatePage @ 0x98e5c0
// > AccountHelpLayer::updatePage @ 0x98e6e4
// > AccountHelpLayer::updatePage @ 0x98e780
// > AccountLayer::backupAccountFailed @ 0x98ecfc
// > AccountLayer::backupAccountFailed @ 0x98edd8
// > AccountLayer::backupAccountFailed @ 0x98ee40
// > UpdateAccountSettingsPopup::updateSettingsFinished @ 0xa2479c
// > UpdateAccountSettingsPopup::updateSettingsFailed @ 0xa248b4
// > UploadActionPopup::showSuccessMessage @ 0xa28fe4
// > UploadActionPopup::showFailMessage @ 0xa291e8
// > GJWriteMessagePopup::updateText @ 0xa2f424
// > GJWriteMessagePopup::updateText @ 0xa2f4f4
// > LevelLeaderboard::loadLeaderboardFailed @ 0xa82980
// > LevelLeaderboard::loadLeaderboardFailed @ 0xa82a20
// > UploadListPopup::listUploadFinished @ 0xbaaca8
// > UploadListPopup::listUploadFailed @ 0xbb0adc
// > SecretLayer5::fadeInSubmitMessage @ 0xbc5810
// > ThreadDescPopup::textChanged @ 0xc6e2c4
// > MessageThreadsPage::applyThreadList @ 0xc76b60
// > MessageThreadsPage::threadListFailed @ 0xc76cfc
// > ThreadViewPopup::measureBody @ 0xc852bc
// > ThreadViewPopup::mountVirtualRow @ 0xc8b87c
// > SoundPackDescPopup::textChanged @ 0xcce750
// > ??> @ 0xc0d78
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:50:51 +0000
//
__int64 __fastcall TextArea::setString(__int64 *a1, char *a2)
{
unsigned __int8 v4; // w22
int v5; // w27
size_t v6; // x25
int v7; // w26
size_t v8; // x24
const void *v9; // x0
char *v10; // x1
size_t v11; // x2
char *v12; // x22
unsigned __int8 v13; // w0
__int64 v14; // x0
size_t v15; // x1
float v16; // s9
float v17; // s8
_DWORD *v18; // x2
float v19; // s2
__int64 v20; // x1
float v21; // s3
void (__fastcall *v22)(__int64 *, _BYTE *); // x23
_BYTE v24[16]; // [xsp+70h] [xbp+70h] BYREF
__int64 v25; // [xsp+80h] [xbp+80h] BYREF
size_t v26; // [xsp+88h] [xbp+88h]
void *v27; // [xsp+90h] [xbp+90h]
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, &byte_11B8890, 0);
v4 = *a2;
v5 = *a2 & 1;
v6 = (unsigned __int8)*a2 >> 1;
if ( (*a2 & 1) != 0 )
v6 = *((_QWORD *)a2 + 1);
v7 = v25 & 1;
v8 = (unsigned __int8)v25 >> 1;
if ( v7 )
v8 = v26;
v9 = a2 + 1;
if ( (*a2 & 1) != 0 )
v9 = *((const void **)a2 + 2);
v10 = (char *)&v25 + 1;
if ( v7 )
v10 = (char *)v27;
if ( v8 > v6 )
v11 = v6;
else
v11 = v8;
if ( !v11 || !memcmp(v9, v10, v11) )
{
if ( v6 == v8 )
goto LABEL_19;
if ( v5 )
goto LABEL_15;
}
else if ( v5 )
{
LABEL_15:
if ( *((_QWORD *)a2 + 1) )
goto LABEL_16;
goto LABEL_19;
}
if ( v4 >> 1 )
{
LABEL_16:
if ( v7 )
operator delete(v27);
goto LABEL_22;
}
LABEL_19:
if ( v7 )
operator delete(v27);
std::string::assign((__int64 *)a2, &byte_11E1A70, 1u);
LABEL_22:
if ( a1[76] )
{
TextArea::hideAll((TextArea *)a1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[76] + 584LL))(a1[76], 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[76] + 528LL))(a1[76], 1);
a1[76] = 0;
}
v12 = (char *)a1 + 625;
if ( (a1[78] & 1) != 0 )
v12 = (char *)a1[80];
v13 = *a2;
v25 = 0;
v26 = 0;
v27 = nullptr;
if ( (v13 & 1) != 0 )
{
std::string::__init(&v25, *((void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v14 = *(_QWORD *)a2;
v15 = *((_QWORD *)a2 + 1);
v27 = *((void **)a2 + 2);
v25 = v14;
v26 = v15;
}
v16 = *((float *)a1 + 167);
v17 = *((float *)a1 + 154);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, (const cocos2d::CCPoint *)(a1 + 82));
v18 = (_DWORD *)MultilineBitmapFont::createWithFont(
v12,
(__int64)&v25,
(const cocos2d::CCPoint *)v24,
(int)*((float *)a1 + 162),
*((_BYTE *)a1 + 596),
*((_BYTE *)a1 + 597),
*((_DWORD *)a1 + 150),
v16,
v17,
*((float *)a1 + 151));
a1[76] = (__int64)v18;
if ( (v25 & 1) != 0 )
{
operator delete(v27);
v18 = (_DWORD *)a1[76];
}
*((_DWORD *)a1 + 169) = v18[169];
*((_DWORD *)a1 + 168) = v18[168];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, (const cocos2d::CCPoint *)(v18 + 170));
cocos2d::CCPoint::operator=((char *)a1 + 684, v24);
v19 = (float)*((int *)a1 + 169);
v20 = *a1;
v21 = (float)*((int *)a1 + 168);
*((_DWORD *)a1 + 170) = *(_DWORD *)(a1[76] + 688);
v22 = *(void (__fastcall **)(__int64 *, _BYTE *))(v20 + 1136);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v24, 0.0, 0.0, v19, v21);
v22(a1, v24);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(*a1 + 464))(a1, a1[76], 1);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v24,
roundf((float)*((int *)a1 + 169) * *((float *)a1 + 164)),
roundf((float)*((int *)a1 + 168)) * *((float *)a1 + 165));
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[76] + 184LL))(a1[76], (__int64)a1 + 684);
return _stack_chk_guard;
}