//
// sub_1001ED0B0 from 0x1001ed0b0 to 0x1001ed1e0 (304 bytes)
//
// 2 xrefs:
// > DS_Dictionary::copyFile @ 0x1001ea014
// > DS_Dictionary::copyFile @ 0x1001ea09c
//
// This function is hookable on this platform (idp: arm, 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 11:00:36 +0000
//
__int64 __fastcall sub_1001ED0B0(__int64 a1, char *__filename, int a3)
{
int v4; // w20
signed int v5; // w9
const char *v6; // x8
FILE *v7; // x1
if ( *(_QWORD *)(a1 + 120) )
return 0;
v4 = a1;
v5 = a3 & 0xFFFFFFFD;
v6 = "w";
if ( (int)(a3 & 0xFFFFFFFD) <= 47 )
{
switch ( v5 )
{
case 1:
case 17:
v6 = "a";
goto LABEL_21;
case 5:
case 21:
v6 = "ab";
goto LABEL_21;
case 8:
v6 = "r";
goto LABEL_21;
case 9:
case 25:
v6 = "a+";
goto LABEL_21;
case 12:
v6 = "rb";
goto LABEL_21;
case 13:
case 29:
v6 = "a+b";
goto LABEL_21;
case 16:
goto LABEL_21;
case 20:
goto LABEL_9;
case 24:
v6 = "r+";
goto LABEL_21;
case 28:
v6 = "r+b";
goto LABEL_21;
default:
return 0;
}
}
if ( v5 > 55 )
{
if ( v5 == 56 )
{
v6 = "w+";
goto LABEL_21;
}
if ( v5 == 60 )
{
v6 = "w+b";
goto LABEL_21;
}
return 0;
}
if ( v5 != 48 )
{
if ( v5 == 52 )
{
LABEL_9:
v6 = "wb";
goto LABEL_21;
}
return 0;
}
LABEL_21:
v7 = fopen(__filename, v6);
return sub_1001ED334(v4, v7);
}