Function at 0x10017d40
Capabilities:
Check if file exists
Copy file
Create directory
Delete file
Get common file path
Get file attributes
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9e4
mov eax, dword [0x10048024]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
call fcn.10017ac0
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x42c]
push eax
call fcn.100176c0
add esp, 4
mov byte [ebp - 0x539], al
mov byte [ebp - 0x648], 0
push 0x103
push 0
lea ecx, [ebp - 0x647]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x118], 0
push 0x104
lea edx, [ebp - 0x648]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
jne 0x10017dfd
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9b4], eax
push 0xf3
push 0x10038adc
call fcn.10017a00
add esp, 8
push eax
push 0x10038af0
mov eax, dword [ebp - 0x9b4]
push eax
mov ecx, dword [ebp - 0x9b4]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
xor eax, eax
jmp 0x1001881c
push 0x10038b10
lea ecx, [ebp - 0x648]
push ecx
call fcn.100025e0
add esp, 8
mov dword [ebp - 0x114], eax
mov edx, dword [ebp - 0x114]
lea eax, [ebp - 0x648]
sub edx, eax
mov ecx, 0x104
sub ecx, edx
push ecx
push 0
mov edx, dword [ebp - 0x114]
lea eax, [ebp - 0x648]
sub edx, eax
lea ecx, [ebp + edx - 0x648]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
lea edx, [ebp - 0x648]
push edx
call sub.ntdll.dll_strlen
add esp, 4
movsx eax, byte [ebp + eax - 0x649]
cmp eax, 0x5c
je 0x10017e99
lea ecx, [ebp - 0x648]
push ecx
call sub.ntdll.dll_strlen
add esp, 4
movsx edx, byte [ebp + eax - 0x649]
cmp edx, 0x2f
je 0x10017e99
push 0x10038b14
lea eax, [ebp - 0x648]
push eax
call sub.ntdll.dll_strcat
add esp, 8
mov byte [ebp - 0x538], 0
push 0x103
push 0
lea ecx, [ebp - 0x537]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
push 0x104
lea edx, [ebp - 0x538]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
lea eax, [ebp - 0x538]
push eax
call fcn.10001880
add esp, 8
mov esi, eax
push 0x2f
lea ecx, [ebp - 0x538]
push ecx
call fcn.10001880
add esp, 8
cmp esi, eax
jbe 0x10017f12
push 0x5c
lea edx, [ebp - 0x538]
push edx
call fcn.10001880
add esp, 8
mov dword [ebp - 0x9b8], eax
jmp 0x10017f29
push 0x2f
lea eax, [ebp - 0x538]
push eax
call fcn.10001880
add esp, 8
mov dword [ebp - 0x9b8], eax
mov ecx, dword [ebp - 0x9b8]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jne 0x10017f79
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9bc], eax
push 0x103
push 0x10038b18
call fcn.10017a00
add esp, 8
push eax
push str._s:_Failed.
mov edx, dword [ebp - 0x9bc]
push edx
mov eax, dword [ebp - 0x9bc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
xor eax, eax
jmp 0x1001881c
mov eax, dword [ebp - 4]
mov byte [eax + 1], 0
mov ecx, dword [ebp + 8]
and ecx, 0x100
je 0x10017fbe
push 0x104
push 0
lea edx, [ebp - 0x648]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
movsx eax, byte [ebp - 0x539]
push eax
push 0x10038b38
lea ecx, [ebp - 0x648]
push ecx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
mov byte [ebp - 0x110], 0
push 0x103
push 0
lea edx, [ebp - 0x10f]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0x538]
push eax
lea ecx, [ebp - 0x110]
push ecx
call sub.ntdll.dll_strcpy
add esp, 8
push 0x10038b40
lea edx, [ebp - 0x110]
push edx
call sub.ntdll.dll_strcat
add esp, 8
mov byte [ebp - 0x220], 0
push 0x103
push 0
lea eax, [ebp - 0x21f]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x648]
push ecx
lea edx, [ebp - 0x220]
push edx
call sub.ntdll.dll_strcpy
add esp, 8
push str.amldr
lea eax, [ebp - 0x220]
push eax
call sub.ntdll.dll_strcat
add esp, 8
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x100180bb
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9c0], eax
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x110]
push edx
push 0x119
push 0x10038b50
call fcn.10017a00
add esp, 8
push eax
push 0x10038b64
mov eax, dword [ebp - 0x9c0]
push eax
mov ecx, dword [ebp - 0x9c0]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0x14
push 2
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x538]
push edx
lea eax, [ebp - 0x110]
push eax
call sub.ntdll.dll_strcpy
add esp, 8
push 0x10038b78
lea ecx, [ebp - 0x110]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
lea edx, [ebp - 0x648]
push edx
lea eax, [ebp - 0x220]
push eax
call sub.ntdll.dll_strcpy
add esp, 8
push str.amldr.mbr
lea ecx, [ebp - 0x220]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x1001818d
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9c4], eax
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x110]
push eax
push 0x126
push 0x10038b90
call fcn.10017a00
add esp, 8
push eax
push str._s:_CopyFile__s___s
mov ecx, dword [ebp - 0x9c4]
push ecx
mov edx, dword [ebp - 0x9c4]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0x14
push 2
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [ebp + 8]
and eax, 1
je 0x100184a4
mov byte [ebp - 0x649], 0
push 0x104
lea ecx, [ebp - 0x798]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x10018206
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9c8], eax
push 0x132
push 0x10038bb8
call fcn.10017a00
add esp, 8
push eax
push 0x10038bcc
mov edx, dword [ebp - 0x9c8]
push edx
mov eax, dword [ebp - 0x9c8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
xor eax, eax
jmp 0x1001881c
mov al, byte [ebp - 0x798]
mov byte [ebp - 0x649], al
mov byte [ebp - 0x690], 0
push 0x3f
push 0
lea ecx, [ebp - 0x68f]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
mov edx, dword [ebp + 8]
and edx, 0x100
je 0x10018256
movsx eax, byte [ebp - 0x539]
push eax
push 0x10038bec
lea ecx, [ebp - 0x690]
push ecx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
jmp 0x10018273
movsx edx, byte [ebp - 0x649]
push edx
push 0x10038bf4
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
mov byte [ebp - 0x9a0], 0
push 0x1ff
push 0
lea ecx, [ebp - 0x99f]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x79c], 0xffffffff
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
lea edx, [ebp - 0x690]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x79c], eax
cmp dword [ebp - 0x79c], 0xffffffff
je 0x100184a4
mov dword [ebp - 0x9a4], 0
push 0
lea eax, [ebp - 0x9a4]
push eax
push 0x200
lea ecx, [ebp - 0x9a0]
push ecx
mov edx, dword [ebp - 0x79c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10018338
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9cc], eax
push 0x149
push 0x10038bfc
call fcn.10017a00
add esp, 8
push eax
push str._s:_Read_DBR_failed.
mov eax, dword [ebp - 0x9cc]
push eax
mov ecx, dword [ebp - 0x9cc]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
jmp 0x100183ab
mov dword [ebp - 0x9a8], str.NTLDR
mov dword [ebp - 0x9ac], 0
jmp 0x1001835d
mov ecx, dword [ebp - 0x9ac]
add ecx, 1
mov dword [ebp - 0x9ac], ecx
cmp dword [ebp - 0x9ac], 0x1fb
jge 0x100183ab
push 5
mov edx, dword [ebp - 0x9a8]
push edx
mov eax, dword [ebp - 0x9ac]
lea ecx, [ebp + eax - 0x9a0]
push ecx
call sub.ntdll.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x100183a9
push 5
push str.AMLDR
mov edx, dword [ebp - 0x9ac]
lea eax, [ebp + edx - 0x9a0]
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
jmp 0x1001834e
mov ecx, dword [ebp - 0x79c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x648]
push edx
lea eax, [ebp - 0x220]
push eax
call sub.ntdll.dll_strcpy
add esp, 8
push str.amdbr
lea ecx, [ebp - 0x220]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
mov dword [ebp - 0x79c], 0xffffffff
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x79c], eax
cmp dword [ebp - 0x79c], 0xffffffff
je 0x100184a4
mov dword [ebp - 0x9b0], 0
push 0
lea eax, [ebp - 0x9b0]
push eax
push 0x200
lea ecx, [ebp - 0x9a0]
push ecx
mov edx, dword [ebp - 0x79c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10018488
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9d0], eax
push 0x166
push 0x10038c40
call fcn.10017a00
add esp, 8
push eax
push str._s:_Write_DBR_failed.
mov eax, dword [ebp - 0x9d0]
push eax
mov ecx, dword [ebp - 0x9d0]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
mov ecx, dword [ebp - 0x79c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x104
push 0
lea eax, [ebp - 0x110]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x220]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
lea edx, [ebp - 0x538]
push edx
lea eax, [ebp - 0x110]
push eax
call sub.ntdll.dll_strcpy
add esp, 8
push 0x104
lea ecx, [ebp - 0x648]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
jne 0x10018548
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9d4], eax
push 0x175
push 0x10038c6c
call fcn.10017a00
add esp, 8
push eax
push str._s:_GetSystemDirecotry_failed.
mov edx, dword [ebp - 0x9d4]
push edx
mov eax, dword [ebp - 0x9d4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
xor eax, eax
jmp 0x1001881c
push 0x104
push 0
lea eax, [ebp - 0x648]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x648]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dl, byte [ebp - 0x648]
mov byte [ebp - 0x220], dl
push 0x10038ca0
lea eax, [ebp - 0x220]
push eax
call sub.ntdll.dll_strcat
add esp, 8
push 0x10038ca4
lea ecx, [ebp - 0x220]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10018612
push 0
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x10018603
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9d8], eax
push 0x181
push 0x10038cac
call fcn.10017a00
add esp, 8
push eax
push str._s:_Create_Dir_failed.
mov ecx, dword [ebp - 0x9d8]
push ecx
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
push 2
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x10038cd8
lea eax, [ebp - 0x220]
push eax
call sub.ntdll.dll_strcat
add esp, 8
push 0x10038cdc
lea ecx, [ebp - 0x220]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
push 0x10038ce8
lea edx, [ebp - 0x110]
push edx
call sub.ntdll.dll_strcat
add esp, 8
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100186a3
lea ecx, [ebp - 0x538]
push ecx
lea edx, [ebp - 0x110]
push edx
call sub.ntdll.dll_strcpy
add esp, 8
push 0x10038cf4
lea eax, [ebp - 0x110]
push eax
call sub.ntdll.dll_strcat
add esp, 8
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100186a3
xor eax, eax
jmp 0x1001881c
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x10018704
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9dc], eax
push 0x199
push 0x10038d00
call fcn.10017a00
add esp, 8
push eax
push str._s:_CopyFileA_failed.
mov edx, dword [ebp - 0x9dc]
push edx
mov eax, dword [ebp - 0x9dc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
push 2
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov word [ebp - 0x428], 0
push 0x206
push 0
lea ecx, [ebp - 0x426]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
movsx edx, byte [ebp - 0x648]
push edx
push 0x10038d2c
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.MSVCR80.dll__swprintf]
add esp, 0xc
mov dword [ebp - 0x540], 0xffffffff
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea ecx, [ebp - 0x428]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x540], eax
cmp dword [ebp - 0x540], 0xffffffff
je 0x100187a3
mov edx, dword [ebp - 0x540]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0x540]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100187dd
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9e0], eax
push 0x1af
push 0x10038d3c
call fcn.10017a00
add esp, 8
push eax
push str._s:_FlushFileBuffers_failed.
mov ecx, dword [ebp - 0x9e0]
push ecx
mov edx, dword [ebp - 0x9e0]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x9e4], eax
push 0x1b2
push 0x10038d70
call fcn.10017a00
add esp, 8
push eax
push str._s:_CopyFiletoSystem_OK_OK_OK
mov edx, dword [ebp - 0x9e4]
push edx
mov eax, dword [ebp - 0x9e4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
mov eax, 1
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1000f672
mov esp, ebp
pop ebp
ret