// // sub_8216B8 from 0x8216b8 to 0x8217d4 (284 bytes) // // 6 xrefs: // > sub_8217E0 @ 0x82181a // > sub_8220F0 @ 0x82220a // > sub_8220F0 @ 0x822392 // > sub_8220F0 @ 0x822440 // > sub_8220F0 @ 0x82247a // > sub_8220F0 @ 0x8224ce // // 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:01:51 +0000 // int __fastcall sub_8216B8(_DWORD **a1, unsigned int a2, const char *a3, int a4, __int64 a5, _QWORD *a6) { __int64 v9; // r8 _DWORD *v10; // r4 int result; // r0 int v12; // r5 int v13; // r5 void *v14; // r0 _WORD v15[24]; // [sp+0h] [bp-6Ch] BYREF __int64 v16; // [sp+30h] [bp-3Ch] v9 = a5; v10 = off_D200AC(0x10u); result = 27; if ( v10 ) { *v10 = 0; if ( a2 > 2 ) { v10[2] = a3; v10[1] = a2; if ( !a6 ) goto LABEL_6; if ( a2 != 4 ) { *a6 += a5; goto LABEL_6; } if ( !strcmp("-", a3) ) { LABEL_6: if ( *a1 ) { result = 0; **a1 = v10; *a1 = v10; } else { *a1 = v10; return 0; } return result; } if ( !stat(a3, (struct stat *)v15) && (v15[8] & 0xF000) != 0x4000 ) { *a6 += v16; goto LABEL_6; } goto LABEL_11; } if ( a5 ) { if ( HIDWORD(a5) - ((_DWORD)a5 != -1) < 0 == __OFSUB__(HIDWORD(a5), 0, (_DWORD)a5 == -1) ) { LABEL_11: v12 = 43; LABEL_12: off_D200B0(v10); return v12; } } else { v9 = strlen(a3); } if ( a2 ) { v14 = off_D200AC(v9 + 1); v13 = v9; v10[2] = v14; if ( !v14 ) { v12 = 27; goto LABEL_12; } memcpy(v14, a3, v9); *(_BYTE *)(v10[2] + v9) = 0; } else { v13 = v9; a2 = 1; v10[2] = a3; } v10[3] = v13; v10[1] = a2; if ( a6 ) *a6 += v9; goto LABEL_6; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source