[General Topics] melontini:
/* This file was generated by the Hex-Rays decompiler version 8.2.0.221215.
Copyright (c) 2007-2021 Hex-Rays <info@hex-rays.com>

Detected compiler: GNU C++
*/

#include <defs.h>

//-------------------------------------------------------------------------
// Function declarations

void __fastcall __noreturn sub_9FA003B0(int a1, int a2, int a3);
void __fastcall sub_9FA1376A(int a1, unsigned int a2, unsigned int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15, int a16, int a17, int a18, int a19, int a20, int a21, int a22, int a23, int a24, int a25, int a26, int a27, int a28, int a29, int a30, int a31);
void __fastcall sub_9FA1DDD4(int a1);

//----- (9FA003B0) --------------------------------------------------------
void __fastcall __noreturn sub_9FA003B0(int a1, int a2, int a3)
{
int v3; // r5

*(_BYTE *)(v3 + 8) = *(_DWORD *)(a2 + 96);
__asm { LDMDB.W R2, {R0,R2,R7,R8,R10,PC} }
}
// 9FA003C0: unbalanced stack, ignored a potential tail call
// 9FA003BA: variable 'v3' is possibly undefined

//----- (9FA1376A) --------------------------------------------------------
// positive sp value has been detected, the output may be wrong!
void __fastcall sub_9FA1376A(
int a1,
unsigned int a2,
unsigned int a3,
int a4,
int a5,
int a6,
int a7,
int a8,
int a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
int a16,
int a17,
int a18,
int a19,
int a20,
int a21,
int a22,
int a23,
int a24,
int a25,
int a26,
int a27,
int a28,
int a29,
int a30,
int a31)
{
int v31; // r3
_DWORD *v35; // r7
int v36; // r6
unsigned int v37; // r4
unsigned int v38; // r2
char *v40; // r7
unsigned int v41; // r4
unsigned int *v42; // r6
_DWORD *v43; // r7

STACK[0x2D4] = a3;
*v43 = a1;
v43[1] = a2;
v43[2] = a3;
v35 = v43 + 3;
*(_WORD *)(v41 + 14) = a1;
*(_WORD *)(v41 + 46) = a2;
*v42 = a2;
v42[1] = v41;
v42[2] = (unsigned int)v35;
v36 = (int)(v42 + 3);
__asm { STCL p5, c5, [R0,#-0x318] }
*((_BYTE *)v35 + 26) = a1;
*(_DWORD *)(a1 + 36) = v36;
v37 = v41 - 249;
v38 = a3 - 221;
_VF = __OFADD__(v35, 217);
v40 = (char *)v35 + 217;
if ( !(v36 >> 30) )
JUMPOUT(0x9FA13648);
*(_BYTE *)(v38 + 31) = a2;
*(_DWORD *)(a2 >> 12) = v38;
*(_DWORD *)((a2 >> 12) + 4) = v40;
if ( !_VF && v37 >> 2 != 0 )
{
STACK[0x338] = v38;
JUMPOUT(0x9FA1319C);
}
v31 = *(__int16 *)(v37 + a31);
*((_WORD *)v40 + 3) = a2 + 151;
*(_WORD *)(v31 + 28) = v38;
__asm { STC p2, c6, [LR], {0x2E} ; '.' }
*(_DWORD *)((v37 >> 2) + a2 + 71) = v38;
*(_DWORD *)(v38 + v37 + 72) = v38 + v37;
*(_BYTE *)(v38 + a31 - 53) = v38;
__asm { BX R8 }
}
// 9FA1311C: positive sp value 38 has been found
// 9FA13028: control flows out of bounds to 9FA1302A
// 9FA1312E: control flows out of bounds to 9FA13130
// 9FA1319A: control flows out of bounds to 9FA1319C
// 9FA13570: control flows out of bounds to 9FA13572
// 9FA13646: control flows out of bounds to 9FA13648
// 9FA13588: control flows out of bounds to 9F8E227A
// 9FA13622: variable 'v43' is possibly undefined
// 9FA1362C: variable 'v41' is possibly undefined
// 9FA13630: variable 'v42' is possibly undefined
// 9FA13404: using guessed type int dword_9FA13404[27];

//----- (9FA1DDD4) --------------------------------------------------------
void __fastcall sub_9FA1DDD4(int a1)
{
MEMORY[0x9FC61AE0](a1);
JUMPOUT(0x9FA1D9AA);
}
// 9FA1D9A8: control flows out of bounds to 9FA1D9AA

// nfuncs=8 queued=3 decompiled=3 lumina nreq=0 worse=0 better=0
// ALL OK, 3 function(s) have been successfully decompiled

Nothing useful, although Snowman spat out 168012 lines of c++ code. It mostly calls ASM

void fun_9fa20e80() {
int1_t less1;
int32_t r12_2;
int32_t r9_3;
int1_t c4;
int1_t less5;
int1_t c6;
int1_t less_or_equal7;
int1_t z8;
int1_t n9;
int1_t less10;

if (less1) {
*reinterpret_cast<signed char*>(reinterpret_cast<uint32_t>(0x605df178 - r12_2) >> 4) = static_cast<signed char>(r9_3);
}
if (!c4) {
__asm__("ldclo p4, c11, [lr, #0x278]!");
}
if (less5) {
__asm__("teqlt r2, sp, asr #16");
}
__asm__("ldmda r3, {r0, r6, r8, sl, fp, sp, lr}");
if (c6) {
__asm__("ldmdbhs r0!, {r0, r1, r3, r4, r6, sl, fp, ip, sp, lr}");
}
if (less_or_equal7) {
__asm__("ldrbtle fp, [r5], -sl, lsl #12");
}
if (!z8) {
__asm__("ldrtne ip, [sl], #-0xa8a");
}
if (!n9) {
}
if (less10) {
__asm__("mrclt p1, #3, r6, c4, c9, #6");
}
}