//
// sub_851020 from 0x851020 to 0x851064 (68 bytes)
//
// 2 xrefs:
// > sub_842078 @ 0x842082
// > sub_842078 @ 0x842090
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:02:31 +0000
//
int __fastcall sub_851020(int a1)
{
void (*v2)(void *); // r3
void *v3; // r0
void (*v4)(void *); // r3
void *v5; // r0
void (*v6)(void *); // r3
void *v7; // r0
void (*v8)(void *); // r3
int result; // r0
off_D200B0(*(void **)a1);
*(_DWORD *)a1 = 0;
off_D200B0(*(void **)(a1 + 4));
v2 = off_D200B0;
v3 = *(void **)(a1 + 8);
*(_DWORD *)(a1 + 4) = 0;
v2(v3);
v4 = off_D200B0;
v5 = *(void **)(a1 + 20);
*(_DWORD *)(a1 + 8) = 0;
v4(v5);
v6 = off_D200B0;
v7 = *(void **)(a1 + 24);
*(_DWORD *)(a1 + 20) = 0;
v6(v7);
v8 = off_D200B0;
*(_DWORD *)(a1 + 24) = 0;
result = ((int (__fastcall *)(_DWORD))v8)(*(_DWORD *)(a1 + 28));
*(_DWORD *)(a1 + 28) = 0;
*(_DWORD *)(a1 + 32) = 0;
*(_DWORD *)(a1 + 12) = 0;
*(_BYTE *)(a1 + 16) = 0;
return result;
}