//
// ReadArchive::process_2 from 0x140528d30 to 0x140528f2c (508 bytes)
//
// 3 xrefs:
// > sub_140540A70 @ 0x1405410d7
// > sub_140545920 @ 0x140546c9d
// > ??> @ 0x14092b6a0
//
// 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:40 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall ReadArchive::process_2(__int64 *a1, __int64 *a2)
{
__int64 v4; // r8
__int64 v5; // rdx
size_t *v6; // r8
void *v7; // rdx
__int64 v8; // rax
int v9; // edx
__int64 v10; // rcx
const char *v11; // rcx
__int64 v12; // rdi
__int64 v13; // rbx
int v14; // ecx
__int64 v15; // rdx
__int64 v16; // rsi
const char *v17; // rcx
float v18; // xmm1_4
void *v19; // rcx
int v20; // [rsp+30h] [rbp-19h] BYREF
__int128 v21; // [rsp+38h] [rbp-11h] BYREF
__int64 v22; // [rsp+48h] [rbp-1h]
int v23; // [rsp+50h] [rbp+7h]
__int64 v24; // [rsp+58h] [rbp+Fh]
void *Block[2]; // [rsp+60h] [rbp+17h] BYREF
__m128i si128; // [rsp+70h] [rbp+27h]
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
v4 = *a1;
v5 = *((int *)a1 + 6);
if ( (int)v5 < (int)((a1[1] - *a1) >> 5) )
{
*((_DWORD *)a1 + 6) = v5 + 1;
v6 = (size_t *)(32 * v5 + v4);
if ( Block != (void **)v6 )
{
v7 = v6;
if ( v6[3] > 0xF )
v7 = (void *)*v6;
sub_1400405A0(Block, v7, v6[2]);
}
}
v8 = a1[4];
v21 = 0;
v22 = 0;
v23 = 0;
v24 = v8;
sub_1401C5360((__int64 *)Block, (unsigned __int8 *)&word_14070D07C, (__int64 *)&v21);
v9 = 0;
v10 = v23;
if ( v23 < (int)((__int64)(*((_QWORD *)&v21 + 1) - v21) >> 5) )
{
++v23;
v11 = (const char *)(32 * v10 + v21);
if ( *((_QWORD *)v11 + 3) > 0xFu )
v11 = *(const char **)v11;
v9 = atoi(v11);
}
v20 = 0;
v12 = v9;
sub_1405028C0((__int64)a2, v9, &v20);
if ( v12 > 0 )
{
v13 = 0;
v14 = v23;
v15 = v21;
do
{
v16 = *a2;
if ( v14 < (int)((*((_QWORD *)&v21 + 1) - v15) >> 5) )
{
v23 = v14 + 1;
v17 = (const char *)(32LL * v14 + v15);
if ( *((_QWORD *)v17 + 3) > 0xFu )
v17 = *(const char **)v17;
v18 = atof(v17);
*(float *)(v16 + 4 * v13) = v18;
v14 = v23;
v15 = v21;
}
++v13;
}
while ( v13 < v12 );
}
sub_1400760C0((__int64 *)&v21);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v19 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v19 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v19 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v19);
}
}