Function at 0x4014f0
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Set file attributes

Disassembly:
mov eax, 0x88e4
call fcn.00402070
mov ax, word [0x4037d8]
push ebx
push esi
push edi
mov word [esp + 0xe8], ax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xea]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x88f8]
mov edi, dword [esp + 0x88f4]
mov ecx, eax
mov dword [esp + 0xc], 1
sar eax, 0x10
mov dword [esp + 0x24], eax
mov al, byte [edi]
and ecx, 0xffff
test al, al
mov dword [esp + 0x20], ecx
je 0x4016bb
mov ecx, dword [edi + 0xe0]
mov eax, dword [edi + 0xe4]
or ecx, eax
je 0x4016bb
mov eax, dword [edi + 0xd8]
test eax, eax
je 0x4016bb
lea edx, [esp + 0x1ec]
push edx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [esp + 0x1ec]
push eax
call fcn.00401f20
mov edx, dword [0x4036cc]
mov esi, dword [0x403280]
add esp, 4
lea ecx, [esp + 0x2ec]
push 0x200
push ecx
push 0x11
push edx
call esi
lea eax, [esp + 0x2ec]
lea ecx, [esp + 0x1ec]
push eax
lea edx, [esp + 0x7f4]
push ecx
push edx
push 0
call fcn.00401e60
add esp, 0x10
test eax, eax
je 0x4016bb
lea eax, [esp + 0x7f0]
push eax
call fcn.00401f20
mov ebx, dword [0x40327c]
add esp, 4
lea ecx, [esp + 0x7f0]
lea edx, [esp + 0xe8]
push edi
push ecx
push 0x40320c
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0xe8]
push 0
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
je 0x401672
mov edx, dword [0x4036cc]
lea ecx, [esp + 0x68]
push 0x80
push ecx
push 0x12
push edx
call esi
lea eax, [esp + 0xe8]
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x2f0]
push ecx
push edx
call ebx
lea eax, [esp + 0x2f8]
push 0x121
push eax
push 0
call fcn.00401f00
add esp, 0x18
cmp eax, 1
jne 0x4016bb
mov ecx, dword [edi + 0x108]
mov eax, dword [edi + 0x10c]
or ecx, eax
je 0x401687
call fcn.00401dc0
push 0x80
lea edx, [esp + 0xec]
push 0x8301
push edx
call sub.MSVCRT.dll__open
add esp, 0xc
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x4016c7
push 0x10
push str.file_open_error_
push 0
call fcn.00401f00
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x88e4
ret
mov ecx, dword [0x4036cc]
lea eax, [esp + 0x68]
push 0x80
push eax
push 0xc
push ecx
call esi
lea edx, [esp + 0x4ec]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x4ec]
push 0x2e
push eax
call sub.MSVCRT.dll_strrchr
add esp, 8
test eax, eax
je 0x401704
mov byte [eax], 0
mov ecx, dword [0x4036cc]
push ebp
push 0
push 0x402000
push 0
push 0x65
push ecx
call dword [0x403278]
mov ebp, eax
push 5
push ebp
mov dword [esp + 0x1c], ebp
call dword [0x403274]
push ebp
call dword [0x403270]
push 0x3e8
push ebp
call dword [0x40326c]
mov ecx, dword [edi + 0xd8]
mov dword [esp + 0x18], eax
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x1c], eax
jb 0x401b29
jmp 0x401762
mov ebx, dword [0x40327c]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x6f4]
push edx
push str.._03d
push eax
call ebx
push ebp
call fcn.00401fa0
add esp, 0x10
test eax, eax
je 0x401b29
cmp dword [esp + 0x1c], 1
jne 0x4017bd
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4017bd
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x4017bd
mov edx, dword [0x4036cc]
lea ecx, [esp + 0x5f0]
push 0x100
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x4018ee
lea eax, [esp + 0x6f4]
lea ecx, [esp + 0x4f0]
push eax
lea edx, [esp + 0x1f4]
push ecx
push edx
lea eax, [esp + 0x5fc]
push str._s_s_s
push eax
call ebx
add esp, 0x14
lea ecx, [esp + 0x5f0]
push 0
push 0
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
jne 0x4018ee
mov eax, dword [0x4036cc]
lea edx, [esp + 0x2c]
push 0x40
push edx
push 0xa
push eax
call esi
lea ecx, [esp + 0x6f4]
lea edx, [esp + 0x4f0]
push ecx
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x2f8]
push eax
push ecx
call ebx
add esp, 0x10
push 0x20
call dword [0x403268]
lea edx, [esp + 0x2f0]
lea eax, [esp + 0x1f0]
push edx
lea ecx, [esp + 0x1f4]
push eax
push ecx
push ebp
call fcn.00401e60
add esp, 0x10
test eax, eax
jne 0x401894
mov eax, dword [0x4036cc]
lea edx, [esp + 0x2c]
push 0x40
push edx
push 0xb
push eax
call esi
lea ecx, [esp + 0x2c]
push 0x124
push ecx
push ebp
call fcn.00401f00
add esp, 0xc
cmp eax, 6
je 0x401b05
lea edx, [esp + 0x1f0]
push edx
call fcn.00401f20
add esp, 4
lea eax, [esp + 0x6f4]
lea ecx, [esp + 0x4f0]
lea edx, [esp + 0x1f0]
push eax
push ecx
push edx
lea eax, [esp + 0x5fc]
push str._s_s_s
push eax
call ebx
add esp, 0x14
lea ecx, [esp + 0x5f0]
push 0
push 0
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
je 0x401807
lea edx, [esp + 0x5f0]
push 0x8000
push edx
call sub.MSVCRT.dll__open
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
je 0x401b11
cmp dword [esp + 0x1c], 1
jne 0x4019d7
mov eax, dword [esp + 0x18]
mov esi, dword [0x403264]
push 0
push 0x20
push 0x404
push eax
call esi
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x401996
push ebx
call sub.MSVCRT.dll__filelength
mov ecx, dword [edi + 0xd8]
add esp, 4
cdq
mov dword [edi + 0xe0], eax
mov dword [edi + 0xe4], edx
mov eax, dword [edi + 0xe0]
push edx
push eax
push 0
push ecx
call fcn.00402150
mov dword [edi + 0xe0], eax
mov dword [edi + 0xe4], edx
push 0
mov ecx, edx
mov edx, dword [edi + 0xe0]
push 0x400
push ecx
push edx
call fcn.004020a0
push eax
mov eax, dword [esp + 0x1c]
push 0
push 0x406
push eax
call esi
jmp 0x4019d7
mov ecx, dword [edi + 0xe4]
mov edx, dword [edi + 0xe0]
push 0
push 0x400
push ecx
push edx
call fcn.004020a0
push eax
mov eax, dword [esp + 0x1c]
push 0
push 0x406
push eax
call esi
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x4019d7
mov ecx, dword [esp + 0x24]
push 1
push ecx
push ebx
call sub.MSVCRT.dll__lseek
add esp, 0xc
lea edx, [esp + 0x6f4]
lea eax, [esp + 0x4f0]
push edx
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0x2f8]
push ecx
push edx
call sub.MSVCRT.dll_sprintf
add esp, 0x10
lea eax, [esp + 0x2f0]
push eax
push 0x3e9
push ebp
call dword [0x403260]
lea ecx, [esp + 0x8f4]
push 0x8000
push ecx
push ebx
call sub.MSVCRT.dll__read
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x401add
push ebp
call fcn.00401fa0
add esp, 4
test eax, eax
je 0x401add
test esi, esi
je 0x401add
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x8f4]
push esi
push edx
push eax
call sub.MSVCRT.dll__write
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x401add
mov ecx, dword [edi + 0x108]
mov eax, dword [edi + 0x10c]
or ecx, eax
je 0x401a88
lea edx, [esp + 0x8f4]
push esi
push edx
call fcn.00401e10
add esp, 8
cmp esi, 0x8000
push 0
je 0x401aa2
mov eax, dword [esp + 0x1c]
shr esi, 0xa
push esi
push 0x403
push eax
jmp 0x401aae
mov ecx, dword [esp + 0x1c]
push 0
push 0x405
push ecx
call dword [0x403264]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x8f4]
push 0x8000
push edx
push ebx
call sub.MSVCRT.dll__read
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x401a31
push ebx
call sub.MSVCRT.dll__close
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0xd8]
mov esi, dword [0x403280]
add esp, 4
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jbe 0x40175c
jmp 0x401b29
mov dword [0x4036d0], 0xffffffff
jmp 0x401b21
push 0x10
push str.file_read_error_
push ebp
call fcn.00401f00
add esp, 0xc
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x20]
push eax
call sub.MSVCRT.dll__close
mov eax, dword [0x4036d0]
add esp, 4
test eax, eax
jne 0x401c43
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401c43
mov eax, dword [esp + 0x24]
push 0
test eax, eax
je 0x401ccb
push 0x80
push 3
push 0
push 1
lea ecx, [esp + 0x100]
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401c3d
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ebp, ebp
mov ebx, eax
mov eax, dword [esp + 0x20]
push 1
push ebp
push ebp
push eax
call fcn.00402150
mov ecx, dword [edi + 0xe0]
add eax, ebx
adc edx, ebp
cmp ecx, eax
jne 0x401c9c
mov eax, dword [edi + 0xe4]
cmp eax, edx
jne 0x401c9c
lea ecx, [edi + 0xfc]
lea edx, [edi + 0xf4]
push ecx
lea eax, [edi + 0xec]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0xe8]
lea edx, [esp + 0xec]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [edi + 0x108]
mov ecx, dword [edi + 0x10c]
or eax, ecx
je 0x401c39
call fcn.00401e00
mov edx, dword [edi + 0x108]
xor ecx, ecx
cmp eax, edx
jne 0x401c86
cmp ecx, dword [edi + 0x10c]
jne 0x401c86
mov ecx, dword [esp + 0x14]
push 0x40
push str.CRC_Check_OK_
push ecx
call fcn.00401f00
add esp, 0xc
mov ebp, dword [esp + 0x14]
mov esi, dword [0x403280]
mov eax, dword [0x4036d0]
mov byte [esp + 0x2f0], 0
test eax, eax
je 0x401cfb
cmp eax, 1
jne 0x401cfb
mov edx, dword [0x4036cc]
lea ecx, [esp + 0x2f0]
push 0x200
push ecx
push 0xe
push edx
call esi
mov dword [esp + 0x10], 0
jmp 0x401d3d
mov edx, dword [esp + 0x14]
push 0x10
push str.CRC_Error__
mov dword [esp + 0x18], 0xffffffff
push edx
jmp 0x401c31
mov ecx, dword [0x4036cc]
lea eax, [esp + 0x2c]
push 0x40
push eax
push 0xd
push ecx
call dword [0x403280]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push 0x10
push edx
mov dword [esp + 0x18], 0xffffffff
push eax
jmp 0x401c31
mov ecx, dword [edi + 0xe4]
mov edx, dword [edi + 0xe0]
push 0x400
push ecx
push edx
call fcn.004020a0
push eax
mov eax, dword [esp + 0x1c]
push 0
push 0x402
push eax
call dword [0x403264]
jmp 0x401c43
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x401d39
mov ecx, dword [0x4036cc]
lea eax, [esp + 0x6c]
push 0x80
push eax
push 0xf
push ecx
mov esi, 0x40
call dword [0x403280]
lea edx, [esp + 0xec]
lea eax, [esp + 0x6c]
push edx
lea ecx, [esp + 0x2f4]
push eax
push ecx
jmp 0x401d6e
test eax, eax
jne 0x401daa
mov eax, dword [0x4036cc]
lea edx, [esp + 0x6c]
mov esi, 0x10
push 0x80
push edx
push esi
push eax
call dword [0x403280]
lea ecx, [esp + 0xec]
lea edx, [esp + 0x6c]
push ecx
lea eax, [esp + 0x2f4]
push edx
push eax
call dword [0x40327c]
mov al, byte [esp + 0x2fc]
add esp, 0xc
test al, al
je 0x401d94
lea ecx, [esp + 0x2f0]
push esi
push ecx
push ebp
call fcn.00401f00
add esp, 0xc
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401daa
lea edx, [esp + 0xec]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
call dword [0x40325c]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x88e4
ret