//
// sub_10093A6C0 from 0x10093a6c0 to 0x10093a842 (386 bytes)
//
// 3 xrefs:
// > sub_10093B540 @ 0x10093b567
// > ThreadMessageOptionsPopup::FLAlert_Clicked @ 0x10093b6ad
// > sub_10093B6D0 @ 0x10093b6ff
//
// 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:38:28 +0000
//
void __fastcall sub_10093A6C0(__int64 a1, __int64 a2)
{
char v3; // r15
__int64 v4; // r12
int v5; // esi
char updated; // al
char *v7; // rax
const char *CString; // r15
size_t v9; // rax
std::string::size_type v10; // r13
char *data; // r12
size_t v12; // r15
char v13; // r15
__int64 v14; // [rsp+8h] [rbp-58h]
const char *v15; // [rsp+10h] [rbp-50h]
std::string __dst[2]; // [rsp+20h] [rbp-40h] BYREF
if ( a2 <= 0 || *(_QWORD *)(a1 + 1096) )
return;
v3 = *(_BYTE *)(a1 + 791);
v4 = GameLevelManager::sharedState();
v5 = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 56LL);
if ( v3 != 1 )
{
v7 = sub_10088E820("%lli", a2);
CString = (const char *)cocos2d::CCString::getCString((__int64)v7);
v9 = strlen(CString);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v10 = v9;
v14 = v4;
if ( v9 >= 0x17 )
{
v15 = CString;
v12 = 26;
if ( (v9 | 7) != 0x17 )
v12 = (v9 | 7) + 1;
data = (char *)operator new(v12);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v12 + 1;
CString = v15;
__dst[0].__r_.__value_.__l.__size_ = v10;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v9);
data = __dst[0].__r_.__value_.__s.__data_;
if ( !v9 )
goto LABEL_13;
}
memmove(data, CString, v10);
LABEL_13:
data[v10] = 0;
updated = GameLevelManager::updateThread(v14, v5, 12, __dst);
goto LABEL_14;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)26;
strcpy(__dst[0].__r_.__value_.__s.__data_, "deleteMessage");
updated = sub_1005712B0(v4, v5, (__int64)__dst);
LABEL_14:
v13 = updated;
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( v13 )
{
*(_QWORD *)(a1 + 1096) = a2;
*(_QWORD *)(GameLevelManager::sharedState() + 1264) = a1 + 672;
}
}