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

Disassembly:
push ebp
sub esp, 0x164
lea ebp, [esp - 4]
mov eax, dword [0x466b10]
xor eax, ebp
mov dword [ebp + 0x164], eax
push 0x80
mov eax, 0x44ae56
call fcn.00433137
mov edi, ecx
xor ebx, ebx
push 0x103
lea eax, [ebp + 0x61]
push ebx
push eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
mov byte [ebp + 0x60], bl
call fcn.004328f0
add esp, 0xc
lea eax, [ebp + 0x60]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [ebp + 0x188], 0x10
mov eax, dword [ebp + 0x174]
jae 0x4096ab
lea eax, [ebp + 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [ebp + 0x188], 0x10
mov eax, dword [ebp + 0x174]
jae 0x4096c7
lea eax, [ebp + 0x174]
push eax
mov ecx, edi
call fcn.00409f3a
mov dword [ebp - 0x28], eax
mov esi, 0x44fc5c
push esi
lea eax, [ebp + 0x170]
push eax
lea eax, [ebp + 0x44]
push eax
call fcn.00407f8e
lea ecx, [ebp + 0x18c]
push ecx
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 2
call fcn.00407fd5
push str..src
push eax
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp - 4], 3
call fcn.00407f8e
add esp, 0x24
push ebx
push 1
lea ecx, [ebp - 0x54]
call fcn.00401627
push ebx
push 1
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 6
call fcn.00401627
push esi
lea eax, [ebp + 0x170]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00407f8e
lea ecx, [ebp + 0x18c]
push ecx
push eax
lea eax, [ebp - 0x70]
push eax
mov byte [ebp - 4], 7
call fcn.00407fd5
push str..hdr
push eax
lea eax, [ebp]
push eax
mov byte [ebp - 4], 8
call fcn.00407f8e
add esp, 0x24
push ebx
push 1
lea ecx, [ebp - 0x70]
call fcn.00401627
push ebx
push 1
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0xb
call fcn.00401627
sub esp, 0x1c
lea eax, [ebp + 0x18c]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.004019de
mov ecx, edi
call fcn.004094f9
lea esi, [edi + 0xa0]
mov ecx, esi
call fcn.0040763b
test eax, eax
jne 0x409811
mov byte [ebp - 0xd], bl
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp]
call fcn.00401627
push ebx
push esi
lea ecx, [ebp + 0x1c]
call fcn.00401627
push ebx
push esi
lea ecx, [ebp + 0x170]
call fcn.00401627
push ebx
push esi
lea ecx, [ebp + 0x18c]
call fcn.00401627
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x164]
xor ecx, ebp
call fcn.00432980
add ebp, 0x168
leave
ret 0x38
mov eax, dword [esi + 4]
push esi
push eax
lea ecx, [ebp - 0x30]
call fcn.0040bfda
mov eax, dword [esi + 8]
push esi
push eax
lea ecx, [ebp - 0x38]
call fcn.0040bfda
cmp dword [ebp + 0x34], 0x10
mov eax, dword [ebp + 0x20]
jae 0x409837
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 0x34], 0x10
mov eax, dword [ebp + 0x20]
jae 0x40984a
lea eax, [ebp + 0x20]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x4099ca
jmp 0x40999e
push ebx
lea ecx, [ebp + 0x38]
mov dword [ebp + 0x50], 0xf
call fcn.0040155f
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0xc
call fcn.0040768e
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x38]
call fcn.004018b9
cmp dword [ebp + 0x50], 0x10
mov eax, dword [ebp - 0x28]
mov dword [ebp + 0x54], eax
mov eax, dword [ebp + 0x3c]
jae 0x4098ab
lea eax, [ebp + 0x3c]
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 - 0x18], eax
je 0x40997e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.00435fc3
pop ecx
push ebx
lea ecx, [ebp - 0x24]
push ecx
push esi
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 2
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x24]
push eax
push esi
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x14]
call fcn.00436086
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x1c], esi
cmp dword [ebp + 0x50], 0x10
mov dword [ebp + 0x58], eax
mov eax, dword [ebp + 0x3c]
pop ecx
mov dword [ebp + 0x5c], esi
jae 0x409935
lea eax, [ebp + 0x3c]
push eax
mov ecx, edi
call fcn.00409f3a
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x38]
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [edi + 0x28]
call fcn.00408a0e
mov ecx, eax
call fcn.00407ef1
push 1
push ebx
push ebx
push ebx
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp eax, ebx
je 0x40997e
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 0xb
call fcn.00401627
lea ecx, [ebp - 0x30]
call fcn.004076d3
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x30]
call fcn.00407667
test al, al
je 0x409871
sub esp, 0x1c
lea eax, [ebp]
mov ecx, esp
mov dword [ebp - 0x28], esp
push eax
call fcn.004019de
mov ecx, edi
call fcn.00407bcf
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [edi + 0x28]
call fcn.00408256
mov byte [ebp - 0xd], 1
jmp 0x4097b8