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, 0x43cbe4
call fcn.0041d79c
sub esp, 0x1d0
push ebx
push esi
push edi
mov dword [ebp - 0x28], ecx
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x1db]
mov byte [ebp - 0x1dc], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1dc]
mov dword [ebp - 4], 1
push eax
push 0x104
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x38], 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 - 0x28]
push eax
call fcn.00404087
mov dword [ebp - 0x3c], eax
mov esi, 0x44e1c8
lea eax, [ebp + 8]
push esi
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00403714
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 2
push ecx
push eax
lea eax, [ebp - 0x9c]
push eax
call fcn.0040379d
push str..src
push eax
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 3
push eax
call fcn.00403714
add esp, 0x24
push 1
lea ecx, [ebp - 0x9c]
pop edi
mov byte [ebp - 4], 6
push edi
call fcn.00402b70
push edi
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 5
call fcn.00402b70
lea eax, [ebp + 8]
push esi
push eax
lea eax, [ebp - 0xbc]
push eax
call fcn.00403714
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 7
push ecx
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.0040379d
push str..hdr
push eax
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 8
push eax
call fcn.00403714
add esp, 0x24
push edi
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0xb
call fcn.00402b70
push edi
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 0xa
call fcn.00402b70
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.00402b70
push dword [0x44067c]
lea eax, [ebp + 0x18]
mov ecx, esi
push ebx
push eax
call fcn.00402a76
mov esi, dword [ebp - 0x28]
mov ecx, esi
call fcn.004011a3
mov eax, dword [esi + 0x98]
cmp eax, ebx
je 0x401a5a
mov ecx, dword [esi + 0x9c]
sub ecx, eax
test ecx, 0xfffffff0
jne 0x401a62
mov byte [ebp - 0xd], bl
jmp 0x401cb1
mov eax, dword [esi + 0x98]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x9c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x78]
cmp eax, ebx
jne 0x401a80
mov eax, 0x440680
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x78]
cmp eax, ebx
jne 0x401a93
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 - 0x20], eax
je 0x401c8f
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x18], eax
je 0x401c5f
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov al, byte [ebp + 0x17]
push ebx
lea ecx, [ebp - 0x5c]
mov byte [ebp - 0x5c], al
call fcn.00402b70
push dword [0x44067c]
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0xc
push ebx
push dword [ebp - 0x18]
call fcn.00402a76
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x58]
cmp eax, ebx
jne 0x401afd
mov eax, 0x440680
push ebx
push 0x80
push 3
push ebx
push 1
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x1c], edi
je 0x401c32
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x24], eax
inc eax
push eax
call fcn.0041daf1
pop ecx
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x14]
push ebx
push ecx
push dword [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x20]
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x54]
push ebx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push 4
push eax
push edi
call esi
mov eax, dword [ebp - 0x58]
cmp eax, ebx
jne 0x401b76
mov eax, 0x440680
lea ecx, [ebp - 0x14]
push ebx
push ecx
push dword [ebp - 0x2c]
push eax
push edi
call esi
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 0x24]
push 4
push eax
push edi
call esi
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [edi + 0x70]
push 4
push eax
push dword [ebp - 0x20]
call esi
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x30]
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x30]
call fcn.0041da08
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
pop ecx
mov ecx, dword [ebp - 0x24]
lea eax, [edx + eax + 0xc]
mov dword [ebp - 0x48], eax
add eax, ecx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x58]
cmp eax, ebx
mov dword [ebp - 0x44], ecx
jne 0x401be0
mov eax, 0x440680
push eax
mov ecx, edi
call fcn.00404087
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x40]
push eax
lea ecx, [edi + 0x28]
call fcn.004029b4
mov ecx, eax
call fcn.00401cf8
push 1
push ebx
push ebx
lea eax, [ebp - 0xd8]
push ebx
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp eax, ebx
je 0x401c32
lea eax, [ebp - 0xd8]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xd8]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0xa
call fcn.00402b70
add dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x34]
jne 0x401ac6
mov esi, dword [ebp - 0x28]
push 1
pop edi
mov al, byte [ebp - 0x6c]
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x1c], esp
push ebx
mov dword [ebp - 0x1c], ecx
mov byte [ecx], al
call fcn.00402b70
push dword [0x44067c]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x6c]
push ebx
push eax
call fcn.00402a76
mov ecx, esi
call fcn.004026f2
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x1dc]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esi + 0x28]
call fcn.00402c4a
mov byte [ebp - 0xd], 1
push edi
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 5
call fcn.00402b70
push edi
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 1
call fcn.00402b70
push edi
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.00402b70
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [ebp + 0x18]
call fcn.00402b70
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x20