//
// std::vector>::push_back from 0x373010 to 0x373090 (128 bytes)
//
// 3 xrefs:
// > processTraceOutSource @ 0x3775e0
// > processTrace @ 0x379314
// > processTrace @ 0x3793ce
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall std::vector::push_back(int a1, int a2)
{
int v3; // r3
unsigned int v5; // r0
unsigned int v6; // r6
int v7; // r5
int v8; // r0
int v9; // r7
v3 = *(_DWORD *)(a1 + 4);
if ( v3 == *(_DWORD *)(a1 + 8) )
{
v5 = std::vector::_M_check_len((_DWORD *)a1, 1u, (int)"vector::_M_emplace_back_aux");
v6 = v5;
if ( v5 )
{
if ( v5 > 0x5555555 )
sub_772FB4(v5);
v7 = operator new(48 * v5);
}
else
{
v7 = 0;
}
v8 = v7 + *(_DWORD *)(a1 + 4) - *(_DWORD *)a1;
if ( v8 )
ChainNode::ChainNode(v8, a2);
v9 = sub_365734(*(char **)a1, *(int **)(a1 + 4), v7);
std::_Destroy_aux::__destroy(*(void ***)a1, *(void ***)(a1 + 4));
sub_365126(*(void **)a1);
*(_DWORD *)a1 = v7;
*(_DWORD *)(a1 + 4) = v9 + 48;
*(_DWORD *)(a1 + 8) = v7 + 48 * v6;
}
else
{
if ( v3 )
ChainNode::ChainNode(*(_DWORD *)(a1 + 4), a2);
*(_DWORD *)(a1 + 4) += 48;
}
}