Function at 0x14016f9e0
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:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0xa10
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + Ordinal_2562], rax
mov r12d, ecx
call fcn.14016f6a0
mov ecx, eax
call fcn.14016f250
lea rcx, [rsp + 0x2c1]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x2c0], 0
movzx r13d, al
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x2c0]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x14016fb2a
call fcn.140049470
lea rsi, [0x140c47fe0]
xor edx, edx
mov rcx, rsi
mov r8d, 0x80
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, [0x140364fc8]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
jne 0x14016fa93
xor esi, esi
jmp 0x14016fb10
xor eax, eax
lea rdx, [0x140365dd0]
lea rcx, [rsp + 0x48]
mov r8d, 0xf3
mov byte [rsp + 0x48], 0
mov qword [rsp + 0x49], rax
mov word [rsp + 0x51], ax
mov byte [rsp + 0x53], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rsi
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rdx + rcx - 1], al
jne 0x14016fad0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x48]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x14016fb00
mov rax, qword [rbx]
lea rdx, [0x140364fe8]
mov r8, rsi
mov rcx, rbx
call qword [rax + 0x10]
xor eax, eax
jmp 0x14017061a
lea rdx, [0x140364cc4]
lea rcx, [rsp + 0x2c0]
call qword [sym.imp.ntdll.dll_strstr]
lea r8, [rsp + 0x3c4]
xor edx, edx
sub r8, rax
mov rcx, rax
call sub.ntdll.dll_memset
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x2c0]
repne scasb al, byte [rdi]
lea rax, [rsp + 0x2c0]
not rcx
movzx edx, byte [rcx + rax - 2]
cmp dl, 0x5c
je 0x14016fb99
cmp dl, 0x2f
je 0x14016fb99
xor eax, eax
lea rdi, [rsp + 0x2c0]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x140364d2c]
mov word [rdi - 1], ax
lea rcx, [rsp + 0x3d1]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x3d0], 0
call sub.ntdll.dll_memset
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [rsp + 0x3d0]
mov r8d, Ordinal_265
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rsp + 0x3d0]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
lea rcx, [rsp + 0x3d0]
mov edx, 0x2f
mov rdi, rax
call qword [sym.imp.ntdll.dll_strrchr]
cmp rdi, rax
jbe 0x14016fc18
lea rcx, [rsp + 0x3d0]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
jmp 0x14016fc2b
lea rcx, [rsp + 0x3d0]
mov edx, 0x2f
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
jne 0x14016fd0a
call fcn.140049470
lea rsi, [0x140c47fe0]
xor edx, edx
mov rcx, rsi
mov r8d, 0x80
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, [0x140365008]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
jne 0x14016fc71
xor esi, esi
jmp 0x14016fcf0
xor eax, eax
lea rdx, [0x140365dd0]
lea rcx, [rsp + 0x48]
mov r8d, 0x103
mov byte [rsp + 0x48], 0
mov qword [rsp + 0x49], rax
mov word [rsp + 0x51], ax
mov byte [rsp + 0x53], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rsi
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rdx + rcx - 1], al
jne 0x14016fcb0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x48]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x14016fce0
mov rax, qword [rbx]
lea rdx, str._s:_Failed.
mov r8, rsi
mov rcx, rbx
call qword [rax + 0x10]
xor eax, eax
jmp 0x14017061a
mov qword [rsp + Ordinal_2610], rbp
mov ebp, r12d
mov byte [rax + 1], 0
and ebp, 0x100
je 0x14016fd4f
lea rcx, [rsp + 0x2c0]
xor edx, edx
mov r8d, Ordinal_265
call sub.ntdll.dll_memset
lea rdx, [0x140365034]
lea rcx, [rsp + 0x2c0]
movsx r8d, r13b
call qword [sym.imp.ntdll.dll_sprintf]
lea rcx, [rsp + 0x1b1]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x1b0], 0
call sub.ntdll.dll_memset
xor esi, esi
mov rcx, rsi
movzx eax, byte [rsp + rcx + 0x3d0]
add rcx, 1
test al, al
mov byte [rsp + rcx + reloc.MFC80U.DLL_Ordinal_431], al
jne 0x14016fd71
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x1b0]
repne scasb al, byte [rdi]
mov eax, dword [0x14036503c]
lea rcx, [rsp + 0xa1]
mov dword [rdi - 1], eax
movzx eax, word [0x140365040]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0xa0], sil
mov word [rdi + 3], ax
call sub.ntdll.dll_memset
mov rdx, rsi
nop
movzx eax, byte [rsp + rdx + 0x2c0]
add rdx, 1
test al, al
mov byte [rsp + rdx + 0x9f], al
jne 0x14016fdd0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
mov eax, dword [str.amldr]
lea rcx, [rsp + 0xa0]
mov dword [rdi - 1], eax
movzx eax, word [0x140365048]
mov word [rdi + 3], ax
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x1b0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14016fe77
call fcn.140049470
lea rcx, [0x140365050]
mov edx, Ordinal_285
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
mov r8, rax
lea rax, [rsp + 0xa0]
lea r9, [rsp + 0x1b0]
lea rdx, [0x140365070]
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [rbx + 0x10]
lea rcx, [rsp + 0xa0]
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rdx, rsi
nop
movzx eax, byte [rsp + rdx + 0x3d0]
add rdx, 1
test al, al
mov byte [rsp + rdx + reloc.MFC80U.DLL_Ordinal_431], al
jne 0x14016fe90
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x1b0]
repne scasb al, byte [rdi]
mov rax, qword [0x140365088]
mov rcx, rsi
mov qword [rdi - 1], rax
movzx eax, word [0x140365090]
mov word [rdi + 7], ax
movzx eax, byte [rsp + rcx + 0x2c0]
add rcx, 1
test al, al
mov byte [rsp + rcx + 0x9f], al
jne 0x14016fed0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
mov rax, qword [str.amldr.mbr]
lea rcx, [rsp + 0xa0]
mov qword [rdi - 1], rax
movzx eax, word [0x1403650a0]
mov word [rdi + 7], ax
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x1b0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14016ff79
call fcn.140049470
lea rcx, [0x1403650a8]
mov edx, reloc.MFC80U.DLL_Ordinal_294
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
mov r8, rax
lea rax, [rsp + 0xa0]
lea r9, [rsp + 0x1b0]
lea rdx, str._s:_CopyFile__s___s
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [rbx + 0x10]
lea rcx, [rsp + 0xa0]
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test r12b, 1
je 0x140170274
lea rcx, [rsp + 0x6e0]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x14016ffe0
call fcn.140049470
lea rcx, [0x1403650e0]
mov edx, 0x132
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, [0x140365100]
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x140170612
xor eax, eax
test ebp, ebp
mov byte [rsp + 0x60], sil
mov qword [rsp + 0x61], rax
mov qword [rsp + 0x69], rax
mov qword [rsp + 0x71], rax
mov qword [rsp + 0x79], rax
mov qword [rsp + 0x81], rax
mov qword [rsp + 0x89], rax
mov qword [rsp + 0x91], rax
mov dword [rsp + 0x99], eax
mov word [rsp + 0x9d], ax
mov byte [rsp + 0x9f], al
je 0x140170045
lea rdx, [0x140365120]
lea rcx, [rsp + 0x60]
movsx r8d, r13b
call qword [sym.imp.ntdll.dll_sprintf]
jmp 0x140170060
movsx r8d, byte [rsp + 0x6e0]
lea rdx, [0x140365128]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_sprintf]
lea rcx, [rsp + 0x4e1]
xor edx, edx
mov r8d, Ordinal_512
mov byte [rsp + 0x4e0], sil
call sub.ntdll.dll_memset
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x60]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
mov rbp, rax
je 0x140170274
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x4e0]
mov r8d, reloc.MFC80U.DLL_Ordinal_512
mov rcx, rax
mov dword [rsp + 0x40], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14017010d
call fcn.140049470
lea rcx, [0x140365130]
mov edx, Ordinal_332
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_Read_DBR_failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
jmp 0x140170178
lea rdi, [rsp + 0x4e0]
lea r8, [rsp + 0x4e0]
mov r9d, Ordinal_512
lea r10, [0x140000000]
nop
nop
mov edx, dword [r8]
cmp edx, dword [r10 + 0x365168]
jne 0x14017014d
mov dl, byte [r8 + 4]
cmp dl, byte [r10 + 0x36516c]
jne 0x14017014d
mov eax, esi
jmp 0x140170152
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x14017016a
mov eax, dword [r10 + 0x365170]
mov dword [rdi], eax
movzx eax, byte [r10 + 0x365174]
mov byte [rdi + 4], al
add r8, 1
add rdi, 1
sub r9, 1
jne 0x140170130
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, rsi
nop
nop
nop
movzx eax, byte [rsp + rdx + 0x2c0]
add rdx, 1
test al, al
mov byte [rsp + rdx + 0x9f], al
jne 0x140170190
xor eax, eax
or rcx, 0xffffffffffffffff
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rdi, [rsp + 0xa0]
lea r8d, [r9 + 3]
repne scasb al, byte [rdi]
mov eax, dword [str.amdbr]
lea rcx, [rsp + 0xa0]
mov dword [rdi - 1], eax
movzx eax, word [0x14036517c]
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
mov word [rdi + 3], ax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
mov rbp, rax
je 0x140170274
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x4e0]
mov r8d, reloc.MFC80U.DLL_Ordinal_512
mov rcx, rax
mov dword [rsp + 0x44], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140170258
call fcn.140049470
lea rcx, [0x140365180]
mov edx, Ordinal_362
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_Write_DBR_failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0xa0]
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rsp + 0x1b0]
xor edx, edx
mov r8d, Ordinal_265
call sub.ntdll.dll_memset
lea rcx, [rsp + 0xa0]
xor edx, edx
mov r8d, Ordinal_265
call sub.ntdll.dll_memset
mov rdx, rsi
movzx eax, byte [rsp + rdx + 0x3d0]
add rdx, 1
test al, al
mov byte [rsp + rdx + reloc.MFC80U.DLL_Ordinal_431], al
jne 0x1401702a1
lea rcx, [rsp + 0x2c0]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x140170302
call fcn.140049470
lea rcx, [0x1403651b8]
mov edx, Ordinal_376
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_GetSystemDirecotry_failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x140170612
lea rcx, [rsp + 0x2c0]
xor edx, edx
mov r8d, Ordinal_265
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x2c0]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
movzx edx, byte [rsp + 0x2c0]
xor eax, eax
mov byte [rsp + 0xa0], dl
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
movzx eax, word [0x140364e6c]
or rcx, 0xffffffffffffffff
mov word [rdi - 1], ax
movzx eax, byte [0x140364e6e]
mov byte [rdi + 1], al
xor eax, eax
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
mov eax, dword [0x1403651f8]
lea rcx, [rsp + 0xa0]
mov dword [rdi - 1], eax
movzx eax, word [0x1403651fc]
mov word [rdi + 3], ax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1401703e8
lea rcx, [rsp + 0xa0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1401703d5
call fcn.140049470
lea rcx, [0x140365200]
mov edx, 0x181
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_Create_Dir_failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
lea rcx, [rsp + 0xa0]
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
movzx eax, word [0x140364f24]
or rcx, 0xffffffffffffffff
mov word [rdi - 1], ax
xor eax, eax
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
mov rax, qword [0x140365238]
or rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
movzx eax, word [0x140365240]
mov word [rdi + 7], ax
movzx eax, byte [0x140365242]
mov byte [rdi + 9], al
xor eax, eax
lea rdi, [rsp + 0x1b0]
repne scasb al, byte [rdi]
mov rax, qword [0x140365248]
lea rcx, [rsp + 0x1b0]
mov qword [rdi - 1], rax
movzx eax, byte [0x140365250]
mov byte [rdi + 7], al
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1401704c4
mov rcx, rsi
nop
movzx eax, byte [rsp + rcx + 0x3d0]
add rcx, 1
test al, al
mov byte [rsp + rcx + reloc.MFC80U.DLL_Ordinal_431], al
jne 0x140170470
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x1b0]
repne scasb al, byte [rdi]
mov rax, qword [0x140365258]
lea rcx, [rsp + 0x1b0]
mov qword [rdi - 1], rax
movzx eax, word [0x140365260]
mov word [rdi + 7], ax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1401702fb
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x1b0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14017051b
call fcn.140049470
lea rcx, [0x140365268]
mov edx, 0x199
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_CopyFileA_failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
lea rcx, [rsp + 0xa0]
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rsp + 0x7f2]
xor edx, edx
mov r8d, 0x206
mov word [rsp + Ordinal_2037], si
call sub.ntdll.dll_memset
movsx r8d, byte [rsp + 0x2c0]
lea rdx, str.._c:
lea rcx, [rsp + 0x7f0]
call qword [sym.imp.MSVCR80.dll__swprintf]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x7f0]
lea r8d, [r9 + 3]
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x1401705b5
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401705e1
call fcn.140049470
lea rcx, [0x1403652b0]
mov edx, reloc.MFC80U.DLL_Ordinal_431
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_FlushFileBuffers_failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
call fcn.140049470
lea rcx, [0x1403652f0]
mov edx, Ordinal_438
mov rbx, qword [rax]
mov rdi, rax
call fcn.14016f510
lea rdx, str._s:_CopyFiletoSystem_OK_OK_OK
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
mov eax, 1
mov rbp, qword [rsp + 0xa30]
mov rcx, qword [rsp + 0xa00]
xor rcx, rsp
call fcn.140161080
lea r11, [rsp + 0xa10]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret