//
// sub_1009821B0 from 0x1009821b0 to 0x100982215 (101 bytes)
//
// 8 xrefs:
// > ??> @ 0x10098216b
// > ??> @ 0x100982198
// > ??> @ 0x100982b64
// > ??> @ 0x100982b86
// > ??> @ 0x100982bab
// > ??> @ 0x1009833ff
// > ??> @ 0x100983422
// > ??> @ 0x100983964
//
// 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 12:39:00 +0000
//
void __fastcall sub_1009821B0(void **a1)
{
char *v1; // r15
char *v3; // r14
void *v4; // rdi
v1 = (char *)*a1;
if ( *a1 )
{
v3 = (char *)a1[1];
v4 = *a1;
if ( v3 != v1 )
{
do
{
v3 -= 128;
sub_1009865F0(a1, v3);
}
while ( v3 != v1 );
v4 = *a1;
}
a1[1] = v1;
operator delete(v4);
}
}