//
// GameToolbox::singleLineSnippet from 0x3d0070 to 0x3d0174 (260 bytes)
//
// 10 xrefs:
// > sub_431C60 @ 0x431cc2
// > GJNotificationCell::loadFromNotification @ 0x431e80
// > AdminActionConfirmPopup::init @ 0x7315c4
// > sub_732820 @ 0x732896
// > AccountReviewPopup::onDeleteRow @ 0x733958
// > AccountReviewPopup::onDeleteFilterRow @ 0x733adc
// > AccountReviewPopup::buildFilterRows @ 0x736f7e
// > AccountReviewPopup::buildHistoryRows @ 0x737e7c
// > AccountReviewPopup::buildReportedRows @ 0x73a1d0
// > ReportPopup::init @ 0x7a09ac
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:46:40 +0000
//
unsigned __int8 *__fastcall GameToolbox::singleLineSnippet(unsigned __int8 *a1, int a2, size_t a3)
{
unsigned int i; // r2
int v6; // r3
int v7; // r1
unsigned int v8; // r3
unsigned __int8 *v9; // r3
unsigned __int8 *v10; // r3
unsigned __int8 *v11; // r3
unsigned __int8 *v12; // r3
int *v13; // r3
int v14; // r1
int v15; // r2
int v16; // r0
int v17; // r1
int v18; // r2
int v20[3]; // [sp+Ch] [bp-20h] BYREF
int v21; // [sp+18h] [bp-14h] BYREF
int v22; // [sp+1Ch] [bp-10h]
int v23; // [sp+20h] [bp-Ch]
std::string::basic_string((int *)a1, a2);
GameToolbox::stripNonBreakingSpaces((int *)a1);
for ( i = 0; ; ++i )
{
v6 = *a1;
v7 = v6 & 1;
if ( (v6 & 1) != 0 )
break;
v8 = v6 >> 1;
if ( i >= v8 )
goto LABEL_17;
v9 = a1 + 1;
LABEL_7:
if ( v9[i] != 10 )
{
v10 = v7 ? *((unsigned __int8 **)a1 + 2) : a1 + 1;
if ( v10[i] != 13 )
continue;
}
if ( v7 )
v11 = *((unsigned __int8 **)a1 + 2);
else
v11 = a1 + 1;
v11[i] = 32;
}
v8 = *((_DWORD *)a1 + 1);
if ( i < v8 )
{
v9 = *((unsigned __int8 **)a1 + 2);
goto LABEL_7;
}
v7 = 1;
LABEL_17:
if ( v8 > a3 )
{
while ( a3 )
{
v12 = v7 ? *((unsigned __int8 **)a1 + 2) : a1 + 1;
if ( (v12[a3] & 0xC0) != 0x80 )
break;
--a3;
}
std::string::basic_string(v20, a1, 0, a3);
v13 = std::string::append(v20, "...");
v14 = v13[1];
v15 = v13[2];
v21 = *v13;
v22 = v14;
v23 = v15;
*v13 = 0;
v13[1] = 0;
v13[2] = 0;
if ( (*a1 & 1) != 0 )
{
**((_BYTE **)a1 + 2) = 0;
*((_DWORD *)a1 + 1) = 0;
}
else
{
a1[1] = 0;
*a1 = 0;
}
std::string::reserve((int *)a1, 0);
v16 = v21;
v17 = v22;
v18 = v23;
v21 = 0;
v22 = 0;
v23 = 0;
*(_DWORD *)a1 = v16;
*((_DWORD *)a1 + 1) = v17;
*((_DWORD *)a1 + 2) = v18;
std::string::~string((int)&v21);
std::string::~string((int)v20);
}
return a1;
}