//
// sub_140378790 from 0x140378790 to 0x140378845 (181 bytes)
//
// 8 xrefs:
// > sub_140374400 @ 0x1403745f8
// > sub_14054FC90 @ 0x14054fdf3
// > sub_1406ABFF0 @ 0x1406abff7
// > sub_1406C04B0 @ 0x1406c04b7
// > ??> @ 0x1408bbeaf
// > ??> @ 0x1408bc8d0
// > ??> @ 0x1408bc8e0
// > ??> @ 0x140922580
//
// 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:31:02 +0000
//
void __fastcall sub_140378790(_QWORD *a1)
{
__int64 v2; // rbx
__int64 i; // rsi
_QWORD *v4; // rcx
if ( a1[1] )
{
v2 = a1[3];
for ( i = a1[4]; v2 != i; v2 += 520 )
{
sub_140069730(v2 + 488);
sub_1403620A0(v2 + 440);
}
v4 = (_QWORD *)a1[1];
if ( (unsigned __int64)(520LL * 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);
}
}