//
// sub_1008700D0 from 0x1008700d0 to 0x1008701ab (219 bytes)
//
// 1 xrefs:
// > FRequestProfilePage::init @ 0x10086f5f1
//
// This function is hookable on this platform (idp: pc, 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:36:50 +0000
//
void __fastcall sub_1008700D0(__int64 a1, __int64 a2, std::string::size_type size, std::string::pointer data)
{
__int64 v4; // rsi
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v5; // al
unsigned __int8 v6; // si
bool v7; // zf
std::string::value_type *v8; // rax
std::string::size_type v9; // rcx
__int64 v10; // rdx
__int64 v11; // rax
std::string v12; // [rsp+0h] [rbp-20h] BYREF
v4 = *(_QWORD *)(a1 + 864);
if ( v4 )
{
CCTextInputNode::getString(&v12, v4);
v5 = v12.__r_.__value_.__s.0;
data = v12.__r_.__value_.__l.__data_;
size = v12.__r_.__value_.__l.__size_;
}
else
{
*(_WORD *)&v12.__r_.__value_.__l.0 = 0;
v5 = 0;
}
v6 = *(unsigned __int8 *)&v5 >> 1;
v7 = (*(_BYTE *)&v5 & 1) == 0;
v8 = v12.__r_.__value_.__s.__data_;
if ( !v7 )
v8 = data;
v9 = v6;
if ( !v7 )
v9 = size;
if ( v9 )
{
v10 = 0;
while ( v8[v10] == 32 )
{
if ( v9 == ++v10 )
goto LABEL_16;
}
if ( v10 != -1 )
{
v11 = GameLevelManager::sharedState();
if ( sub_100578FA0(v11, &v12) )
{
*(_QWORD *)(GameLevelManager::sharedState() + 1368) = a1 + 696;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 776) + 344LL))(*(_QWORD *)(a1 + 776), 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 792) + 344LL))(*(_QWORD *)(a1 + 792), 1);
}
}
}
LABEL_16:
if ( (*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v12.__r_.__value_.__l.__data_);
}