//
// sub_69B160 from 0x69b160 to 0x69b264 (260 bytes)
//
// 7 xrefs:
// > GameToolbox::extractServerPopup @ 0x6a3c60
// > GameToolbox::extractServerPopup @ 0x6a3dc0
// > GameToolbox::extractServerPopup @ 0x6a3efc
// > GameToolbox::extractServerPopup @ 0x6a3fd8
// > GameToolbox::extractServerPopup @ 0x6a41d4
// > GameToolbox::extractServerPopup @ 0x6a430c
// > GameToolbox::extractServerPopup @ 0x6a43b8
//
// 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 12:50:40 +0000
//
__int64 __fastcall sub_69B160(__int64 *a1, unsigned __int64 a2, __int64 a3, __int64 a4)
{
__int64 v5; // x0
__int64 v6; // x19
__int64 v7; // x0
__int64 v8; // x2
std::logic_error *exception; // x21
__int64 v11; // [xsp+38h] [xbp+38h]
_QWORD v12[3]; // [xsp+48h] [xbp+48h] BYREF
a1[3] = 0;
v5 = _stack_chk_guard;
a1[4] = a4;
v12[2] = v5;
if ( a2 )
{
if ( a2 > 0x1FFFFFFFFFFFFFFFLL )
{
std::logic_error::logic_error(
(std::logic_error *)v12,
"allocator::allocate(size_t n) 'n' exceeds maximum supported size");
v12[0] = off_1536D28;
exception = (std::logic_error *)_cxa_allocate_exception((size_t)&word_10);
std::logic_error::logic_error(exception, (const std::logic_error *)v12);
*(_QWORD *)exception = off_1536D28;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::length_error,
(void (*)(void *))std::logic_error::~logic_error);
}
v6 = 8 * a2;
v11 = a3;
v7 = operator new(8 * a2);
a3 = v11;
}
else
{
v6 = 0;
v7 = 0;
}
v8 = v7 + 8 * a3;
*a1 = v7;
a1[3] = v7 + v6;
a1[2] = v8;
a1[1] = v8;
return _stack_chk_guard;
}