//
// sub_4039BC from 0x4039bc to 0x403a06 (74 bytes)
//
// 2 xrefs:
// > std::__ndk1::vector>::assign @ 0x41061e
// > std::__ndk1::__tree,std::__ndk1::vector>>,std::__ndk1::__map_value_compare,std::__ndk1::__value_type,std::__ndk1::vector>>,std::__ndk1::less>,true>,std::__ndk1::allocator,std::__ndk1::vector>>>>::__emplace_multi const,std::__ndk1::vector>> const&> @ 0x410682
//
// 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:47:26 +0000
//
int __fastcall sub_4039BC(int result, int a2, const void **a3)
{
const void **v3; // r4
int v4; // r5
int v6; // r0
v3 = (const void **)(a2 + 16);
v4 = result;
while ( a3 != v3 - 4 )
{
result = *(_DWORD *)(v4 + 4);
if ( result )
{
v6 = result + 16;
*(_DWORD *)(v6 - 16) = *(v3 - 4);
*(_DWORD *)(v6 - 12) = *(v3 - 3);
*(_DWORD *)(v6 - 8) = *(v3 - 2);
*(_BYTE *)(v6 - 4) = *((_BYTE *)v3 - 4);
result = std::vector::vector(v6, v3);
}
v3 += 7;
*(_DWORD *)(v4 + 4) += 28;
}
return result;
}