//
// GameLevelManager::appendModReason from 0x10055aed0 to 0x10055afe9 (281 bytes)
//
// 5 xrefs:
// > GameLevelManager::deleteServerLevelList @ 0x10055ab88
// > sub_10055C7F0 @ 0x10055ca2d
// > GameLevelManager::deleteServerLevel @ 0x100562535
// > sub_10056E450 @ 0x10056e6c1
// > GameLevelManager::sendAdminAction @ 0x10056ebea
//
// 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:32:07 +0000
//
void __fastcall GameLevelManager::appendModReason(__int64 a1, std::string *a2, std::string *a3, _QWORD *a4)
{
unsigned int v7; // eax
const std::string::value_type *data; // rsi
std::string::size_type size; // rdx
const std::string::value_type *v10; // rsi
std::string::size_type v11; // rdx
std::string v12; // [rsp+0h] [rbp-50h] BYREF
std::string v13; // [rsp+20h] [rbp-30h] BYREF
v7 = (unsigned int)a3->__r_.__value_.__l.0;
if ( (v7 & 1) != 0 )
{
if ( !a3->__r_.__value_.__l.__size_ )
goto LABEL_15;
}
else if ( !(v7 >> 1) )
{
goto LABEL_15;
}
std::string::append(a2, "&reason=");
if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 )
sub_10001AD30(&v12, a3->__r_.__value_.__l.__data_, a3->__r_.__value_.__l.__size_);
else
v12 = *a3;
LevelTools::base64EncodeString(&v13, &v12);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
{
data = v13.__r_.__value_.__l.__data_;
size = v13.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&v13.__r_.__value_.__l.0 >> 1;
data = v13.__r_.__value_.__s.__data_;
}
std::string::append(a2, data, size);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v13.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v12.__r_.__value_.__l.__data_);
LABEL_15:
if ( *a4 != a4[1] )
{
std::string::append(a2, "&categories=");
sub_10056F010(&v13);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
{
v10 = v13.__r_.__value_.__l.__data_;
v11 = v13.__r_.__value_.__l.__size_;
}
else
{
v11 = *(_BYTE *)&v13.__r_.__value_.__l.0 >> 1;
v10 = v13.__r_.__value_.__s.__data_;
}
std::string::append(a2, v10, v11);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v13.__r_.__value_.__l.__data_);
}
}