//
// sub_180044BB0 from 0x180044bb0 to 0x180044c25 (117 bytes)
//
// 39 xrefs:
// > sub_18003DC70 @ 0x18003e011
// > sub_18003DC70 @ 0x18003e07d
// > sub_18003E5C0 @ 0x18003e964
// > sub_18003E5C0 @ 0x18003e9cd
// > sub_1800407B0 @ 0x180040858
// > sub_1800407B0 @ 0x1800408af
// > sub_1800407B0 @ 0x1800408ec
// > sub_1800407B0 @ 0x180040918
// > sub_180040E10 @ 0x180040e45
// > sub_180040E10 @ 0x180040eaf
// > fmt::internal::UTF16ToUTF8::UTF16ToUTF8 @ 0x180041266
// > fmt::BasicWriter::operator<< @ 0x1800413be
// > fmt::internal::UTF16ToUTF8::Convert @ 0x1800417a6
// > fmt::internal::PrintfParser::Format @ 0x180042246
// > fmt::internal::PrintfParser::Format @ 0x1800422fb
// > fmt::internal::PrintfParser::Format @ 0x18004234b
// > fmt::internal::PrintfParser::Format @ 0x1800423d0
// > fmt::internal::PrintfParser::Format @ 0x1800423f1
// > fmt::internal::PrintfParser::Format @ 0x180042473
// > sub_180042D70 @ 0x180042e0c
// > sub_180042D70 @ 0x180042e2d
// > sub_180042D70 @ 0x180042e5b
// > sub_180042D70 @ 0x180042f10
// > sub_180042D70 @ 0x180042f31
// > sub_180042FA0 @ 0x18004305e
// > sub_180042FA0 @ 0x1800430e1
// > sub_180042FA0 @ 0x180043102
// > sub_180042FA0 @ 0x180043191
// > sub_180042FA0 @ 0x1800431b2
// > sub_180042FA0 @ 0x1800431e5
// > fmt::BasicFormatter::format @ 0x180043cde
// > fmt::BasicFormatter::format @ 0x180043d65
// > fmt::BasicFormatter::format @ 0x180043db8
// > fmt::BasicFormatter::format @ 0x180043e4f
// > fmt::BasicFormatter::format @ 0x180043e81
// > fmt::BasicFormatter::format @ 0x180043ebc
// > ??> @ 0x18013fb58
// > ??> @ 0x18013fb68
// > ??> @ 0x1801bb6d4
//
// 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:21:40 +0000
//
void __fastcall sub_180044BB0(__int64 a1, size_t a2)
{
size_t v4; // rcx
size_t v5; // r8
size_t v6; // rcx
void *v7; // rsi
void *v8; // rcx
v4 = *(_QWORD *)(a1 + 8);
if ( a2 > v4 )
{
v5 = v4 + (v4 >> 1);
v6 = a2;
if ( a2 < v5 )
v6 = v5;
*(_QWORD *)(a1 + 8) = v6;
v7 = (void *)sub_1800E4C6C(v6);
memmove(v7, *(const void **)(a1 + 16), *(_QWORD *)a1);
v8 = *(void **)(a1 + 16);
if ( v8 != (void *)(a1 + 24) )
j_j_free_0(v8);
*(_QWORD *)(a1 + 16) = v7;
}
*(_QWORD *)a1 = a2;
}