Function at 0x4018d7
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Set current directory
Write file on windows

Disassembly:
mov eax, 0x43d321
call fcn.0041de9c
sub esp, 0x1c4
push ebx
push esi
push edi
mov dword [ebp - 0x14], ecx
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x1cf]
mov byte [ebp - 0x1d0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1d0]
mov dword [ebp - 4], 1
push eax
push 0x104
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x401930
mov eax, 0x440680
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x401943
mov eax, 0x440680
mov ecx, dword [ebp - 0x14]
push eax
call fcn.00403eab
mov dword [ebp - 0x2c], eax
mov esi, 0x44e1c8
lea eax, [ebp + 8]
push esi
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.0040354b
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 2
push ecx
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.004035d4
push str..src
push eax
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 3
push eax
call fcn.0040354b
add esp, 0x24
push 1
lea ecx, [ebp - 0xb0]
pop edi
mov byte [ebp - 4], 6
push edi
call fcn.004029a7
push edi
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 5
call fcn.004029a7
lea eax, [ebp + 8]
push esi
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0040354b
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 7
push ecx
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.004035d4
push str..hdr
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 8
push eax
call fcn.0040354b
add esp, 0x24
push edi
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 0xb
call fcn.004029a7
push edi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0xa
call fcn.004029a7
mov al, byte [ebp + 0x18]
sub esp, 0x10
mov esi, esp
mov dword [ebp - 0x1c], esp
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.004029a7
push dword [0x44067c]
lea eax, [ebp + 0x18]
mov ecx, esi
push ebx
push eax
call fcn.004028ad
mov edi, dword [ebp - 0x14]
mov ecx, edi
call fcn.0040119c
mov eax, dword [edi + 0x94]
cmp eax, ebx
je 0x401a54
mov ecx, dword [edi + 0x98]
sub ecx, eax
test ecx, 0xfffffff0
jne 0x401a5c
mov byte [ebp - 0xd], bl
jmp 0x401c3d
mov eax, dword [edi + 0x98]
mov esi, dword [edi + 0x94]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x5c]
cmp eax, ebx
mov dword [ebp - 0x30], esi
jne 0x401a7a
mov eax, 0x440680
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov eax, dword [ebp - 0x5c]
cmp eax, ebx
jne 0x401a8d
mov eax, 0x440680
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x401c1b
cmp esi, dword [ebp - 0x20]
je 0x401bed
mov al, byte [ebp + 0x17]
push ebx
lea ecx, [ebp - 0x50]
mov byte [ebp - 0x50], al
call fcn.004029a7
push dword [0x44067c]
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xc
push ebx
push esi
call fcn.004028ad
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
jne 0x401aec
mov eax, 0x440680
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
je 0x401bc8
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.0041e1f1
pop ecx
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x34]
push ebx
push ecx
push esi
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push 2
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea eax, [ebp - 0x34]
push ebx
push eax
push esi
push dword [ebp - 0x28]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp - 0x28]
call fcn.0041e108
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x18], esi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
pop ecx
mov dword [ebp - 0x38], esi
jne 0x401b76
mov eax, 0x440680
push eax
mov ecx, edi
call fcn.00403eab
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [edi + 0x28]
call fcn.004027eb
mov ecx, eax
call fcn.00401c87
push 1
push ebx
push ebx
lea eax, [ebp - 0xcc]
push ebx
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp eax, ebx
je 0x401bc8
lea eax, [ebp - 0xcc]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xcc]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xa
call fcn.004029a7
mov esi, dword [ebp - 0x30]
add esi, 0x10
mov dword [ebp - 0x30], esi
jmp 0x401aae
mov al, byte [ebp - 0x70]
sub esp, 0x10
mov esi, esp
mov dword [ebp - 0x2c], esp
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.004029a7
push dword [0x44067c]
lea eax, [ebp - 0x70]
mov ecx, esi
push ebx
push eax
call fcn.004028ad
mov ecx, edi
call fcn.00402524
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
lea ecx, [edi + 0x28]
call fcn.00402a81
mov byte [ebp - 0xd], 1
push 1
lea ecx, [ebp - 0x70]
pop esi
mov byte [ebp - 4], 5
push esi
call fcn.004029a7
push esi
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
call fcn.004029a7
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.004029a7
or dword [ebp - 4], 0xffffffff
push esi
lea ecx, [ebp + 0x18]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x20