Function at 0x4019e5
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x14], 1
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov edx, dword [0x4098b0]
and edx, 0x1000
neg edx
sbb edx, edx
inc edx
mov dword [0x4178f4], edx
mov dword [0x41bd04], 0
cmp dword [ebp - 0xc], 0
je 0x401bf0
cmp dword [ebp - 0xc], 0x4000
jbe 0x401a4c
mov dword [ebp - 0x20], 0x4000
jmp 0x401a52
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0x14]
and eax, 0x2000000
test eax, eax
je 0x401a93
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push 0x417900
call fcn.00404bd0
add esp, 0xc
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], ecx
jmp 0x401aac
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
push 0x417900
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 8]
je 0x401ac0
mov dword [ebp - 0x14], 0
jmp 0x401bf0
mov eax, dword [ebp + 0x14]
and eax, 0x8002000
test eax, eax
je 0x401ae7
mov ecx, dword [ebp + 0x14]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 0x417900
call fcn.004035a0
add esp, 0xc
cmp dword [0x4098ec], 0
je 0x401b25
mov eax, dword [ebp - 0x18]
push eax
push 0x417900
call dword [0x4098ec]
add esp, 8
test eax, eax
jne 0x401b25
mov dword [0x4098b0], 0
cmp dword [0x41bd04], 0
je 0x401b25
mov dword [ebp - 0x14], 0
jmp 0x401bf0
mov ecx, dword [ebp + 0x14]
and ecx, 0x8000
test ecx, ecx
je 0x401b4d
cmp dword [0x4098ac], 0
je 0x401b4d
mov edx, dword [ebp - 0x18]
push edx
push 0x417900
call dword [0x4098ac]
add esp, 8
mov eax, dword [ebp + 0x14]
and eax, 0xff
test eax, eax
je 0x401b81
mov ecx, dword [ebp + 0x14]
and ecx, 0x2000
test ecx, ecx
jne 0x401b81
mov edx, dword [ebp + 0x14]
and edx, 0xff
push edx
mov eax, dword [ebp - 0x18]
push eax
push 0x417900
call fcn.004035a0
add esp, 0xc
mov ecx, dword [ebp + 0x14]
and ecx, 0x1000000
test ecx, ecx
je 0x401bb4
mov edx, dword [ebp - 8]
push edx
push 0x417900
mov eax, dword [ebp - 0x10]
push eax
call fcn.00404bd0
add esp, 0xc
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 4], edx
jmp 0x401bcd
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0x417900
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
je 0x401beb
mov dword [ebp - 0x14], 0
jmp 0x401bf0
jmp 0x401a30
mov dword [0x4098b4], 0
cmp dword [0x4178f4], 0
jne 0x401c0a
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret