//
// WriteArchive::processGOArr from 0x1405217b0 to 0x1405219e0 (560 bytes)
//
// 3 xrefs:
// > serializeCheckpoint @ 0x140530956
// > sub_14053D370 @ 0x14053fd15
// > ??> @ 0x14092b448
//
// 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 11:33:38 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall WriteArchive::processGOArr(__int64 a1, cocos2d::CCArray **a2)
{
unsigned int v4; // edi
signed int i; // ebx
struct cocos2d::CCObject *v6; // rax
__int64 v7; // rdx
_BYTE *v8; // rax
size_t v9; // r8
void *v10; // rcx
__int128 v12; // [rsp+30h] [rbp-D0h] BYREF
_BYTE v13[16]; // [rsp+48h] [rbp-B8h] BYREF
void *Block[2]; // [rsp+58h] [rbp-A8h] BYREF
__m128i si128; // [rsp+68h] [rbp-98h]
_BYTE v16[528]; // [rsp+80h] [rbp-80h] BYREF
_OWORD v17[2]; // [rsp+290h] [rbp+190h] BYREF
fmt::BasicWriter::BasicWriter(v16);
v17[0] = 0;
v17[1] = _mm_load_si128((const __m128i *)&xmmword_140836520);
LOWORD(v17[0]) = 124;
if ( *a2 )
v4 = cocos2d::CCArray::count(*a2);
else
v4 = 0;
fmt::BasicWriter::operator<<(v16, v4);
v12 = *(_OWORD *)fmt::BasicStringRef::BasicStringRef(v13, v17);
fmt::BasicWriter::operator<<(v16, &v12);
for ( i = 0; i < (int)v4; ++i )
{
v6 = cocos2d::CCArray::objectAtIndex(*a2, i);
if ( v6 )
v7 = *((unsigned int *)v6 + 231);
else
v7 = 0;
fmt::BasicWriter::operator<<(v16, v7);
v12 = *(_OWORD *)fmt::BasicStringRef::BasicStringRef(v13, v17);
fmt::BasicWriter::operator<<(v16, &v12);
}
v8 = (_BYTE *)fmt::BasicWriter::c_str(v16);
*(_OWORD *)Block = 0;
si128 = 0;
v9 = -1;
do
++v9;
while ( v8[v9] );
sub_14003D230(Block, v8, v9);
v12 = *(_OWORD *)fmt::BasicStringRef::BasicStringRef(v13, Block);
fmt::BasicWriter::operator<<(a1, &v12);
v12 = *(_OWORD *)fmt::BasicStringRef::BasicStringRef(v13, a1 + 528);
fmt::BasicWriter::operator<<(a1, &v12);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v10 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v10 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v10);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
sub_14003D310((__int64)v17);
return fmt::BasicWriter::~BasicWriter(v16);
}