//
// sub_82D40 from 0x82d40 to 0x82d94 (84 bytes)
//
// 3 xrefs:
// > sub_83280 @ 0x83334
// > sub_83370 @ 0x83378
// > sub_836EC @ 0x8379c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 sub_82D40()
{
__int64 v0; // x19
int v1; // w20
__int64 v2; // x0
int v3; // w9
int v4; // w8
unsigned int v5; // w19
__int64 v7; // [xsp+0h] [xbp-30h] BYREF
v2 = sub_83A00();
sub_83A20(v2);
if ( v1 )
{
v3 = *(_DWORD *)(v0 + 12);
v4 = *(_DWORD *)(v0 + 16) + v1;
*(_DWORD *)(v0 + 16) = v4;
if ( v4 == v3 )
{
*(_DWORD *)(v0 + 12) = 0;
*(_DWORD *)(v0 + 16) = 0;
}
}
v5 = sub_82CD0();
sub_52090((__int64)&v7);
return v5;
}