//
// ThreadViewPopup::startSearch from 0xc78adc to 0xc78b98 (188 bytes)
//
// 2 xrefs:
// > ThreadSearchPopup::onSearch @ 0xc78e9c
// > ??> @ 0x473c8
//
// 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 13:05:34 +0000
//
__int64 __fastcall ThreadViewPopup::startSearch(__int64 result, __int64 a2)
{
__int64 v2; // x3
__int64 *v3; // x19
cocos2d::CCObject *v5; // x0
GameLevelManager *v6; // x0
GameLevelManager *v7; // x0
const void *v8; // x1
size_t v9; // x2
if ( !*(_QWORD *)(result + 1040) && !*(_BYTE *)(result + 790) )
{
v2 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v2 = *(_QWORD *)(a2 + 8);
if ( v2 )
{
v3 = (__int64 *)result;
v5 = (cocos2d::CCObject *)GameLevelManager::sharedState((GameLevelManager *)result);
result = (unsigned __int8)GameLevelManager::searchThreadMessages(
v5,
(char *)*(unsigned int *)(v3[94] + 56),
(char *)a2,
0);
if ( (_BYTE)result )
{
v6 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)result);
*((_QWORD *)v6 + 158) = v3 + 84;
v7 = (GameLevelManager *)GameLevelManager::sharedState(v6);
GameLevelManager::makeTimeStamp(v7, "threadSearch");
if ( (__int64 *)a2 != v3 + 139 )
{
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v8 = *(const void **)(a2 + 16);
v9 = *(_QWORD *)(a2 + 8);
}
else
{
v8 = (const void *)(a2 + 1);
v9 = *(_BYTE *)a2 >> 1;
}
std::string::assign(v3 + 139, v8, v9);
}
return ThreadViewPopup::showLoading((ThreadViewPopup *)v3);
}
}
}
return result;
}