//
// sub_140076820 from 0x140076820 to 0x1400768b9 (153 bytes)
//
// 8 xrefs:
// > sub_140075D90 @ 0x140075ef8
// > sub_140075F50 @ 0x140076069
// > sub_140416540 @ 0x14041665e
// > int `__acrt_get_current_directory<__crt_win32_buffer_internal_dynamic_resizing> @ 0x14068a1a7
// > ??> @ 0x14088a1bf
// > ??> @ 0x14088a3a0
// > ??> @ 0x14088a3b0
// > ??> @ 0x140911b1c
//
// 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:25:51 +0000
//
void __fastcall sub_140076820(_QWORD *a1)
{
__int64 v2; // rbx
__int64 i; // rdi
_QWORD *v4; // rcx
if ( a1[1] )
{
v2 = a1[3];
for ( i = a1[4]; v2 != i; v2 += 32 )
sub_14003D310(v2);
v4 = (_QWORD *)a1[1];
if ( (unsigned __int64)(32LL * a1[2]) >= 0x1000 )
{
if ( (unsigned __int64)v4 - *(v4 - 1) - 8 > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
v4 = (_QWORD *)*(v4 - 1);
}
j_j_free(v4);
}
}