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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov ebx, dword [esp + 0x2c]
mov eax, dword [0x4c2010]
xor eax, esp
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x14]
test eax, eax
jle 0x407f3d
xor esi, esi
nop
mov eax, dword [ebx + 0x1c]
push 0x4b58ef
push dword [eax + esi*4]
call fcn.00419070
add esp, 8
add esi, 1
mov eax, dword [ebx + 0x14]
cmp esi, eax
jl 0x407f20
test eax, eax
je 0x407f6e
cmp byte [0x4c2ca0], 0
je 0x407f75
push str.Cannot_answer_interactive_prompts_in_batch_mode
mov esi, dword [esp + 0x2c]
push esi
call fcn.00418240
add esp, 8
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.0046efa0
mov eax, esi
jmp 0x408210
mov edi, 0xffffffff
jmp 0x407f88
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
cmp eax, 0xffffffff
je 0x408242
mov al, byte [ebx + 8]
test al, al
je 0x407f95
cmp dword [ebx + 4], 0
jne 0x407fa5
cmp dword [ebx + 0xc], 0
jne 0x407fa5
cmp dword [ebx + 0x14], 0
je 0x408218
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esp], eax
cmp eax, 0xffffffff
je 0x40822c
mov al, byte [ebx + 8]
test al, al
je 0x408014
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + 4]
test esi, esi
je 0x408014
push esi
call fcn.004831a0
add esp, 4
mov ebp, eax
lea ebx, [esp + 0xc]
push 0
push ebx
push eax
push esi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 1
push 0x4b586d
push ebp
push esi
call fcn.00416ef0
add esp, 0x14
test al, al
jne 0x408014
push 0
push ebx
push 1
push 0x4b586d
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + 0xc]
test esi, esi
je 0x408068
push esi
call fcn.004831a0
add esp, 4
mov ebp, eax
lea ebx, [esp + 0xc]
push 0
push ebx
push eax
push esi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 1
push 0x4b586d
push ebp
push esi
call fcn.00416ef0
add esp, 0x14
test al, al
jne 0x408068
push 0
push ebx
push 1
push 0x4b586d
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2c]
cmp dword [eax + 0x14], 0
je 0x4081f0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [eax + 0x1c]
mov dword [esp + 4], ecx
mov esi, dword [eax + ecx*4]
lea eax, [esp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov eax, dword [esp + 8]
mov ecx, eax
or ecx, 7
and eax, 0xfffffff8
or eax, 3
cmp byte [esi + 4], 0
cmovne eax, ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov ebx, dword [esi]
push ebx
call fcn.004831a0
add esp, 4
push 0
mov ebp, edi
lea edi, [esp + 0x10]
push edi
push eax
push ebx
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov ebx, dword [eax + 8]
push 0x4000
push eax
call fcn.00414640
add esp, 8
mov dword [esp + 0xc], 0
push 0
push edi
mov edi, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
nop
nop
nop
nop
nop
push 0x4000
push eax
push edi
call ebp
test eax, eax
je 0x408160
mov eax, dword [esp + 0xc]
test eax, eax
je 0x408180
add eax, ebx
push eax
push dword [esi + 8]
call fcn.00414680
add esp, 8
push 0xa
push dword [esi + 8]
call fcn.004146f0
add esp, 8
test al, al
jne 0x4081a0
mov eax, dword [esi + 8]
mov ebx, dword [eax + 8]
push 0x4000
push eax
call fcn.00414640
add esp, 8
mov dword [esp + 0xc], 0
push 0
lea ecx, [esp + 0x10]
push ecx
jmp 0x408100
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_reading_from_console
push dword [esp + 0x30]
call fcn.00419160
add esp, 0xc
xor ebx, ebx
jmp 0x4081af
mov eax, dword [esp + 0x28]
mov dword [eax], 1
mov dword [eax + 8], 0
xor ebx, ebx
jmp 0x4081af
push 0xd
push dword [esi + 8]
call fcn.004146f0
add esp, 8
mov bl, 1
push dword [esp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
cmp byte [esi + 4], 0
jne 0x4081d8
push 0
lea eax, [esp + 0x10]
push eax
push 2
push 0x4b586c
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test bl, bl
je 0x408201
mov ecx, dword [esp + 4]
add ecx, 1
mov eax, dword [esp + 0x2c]
cmp ecx, dword [eax + 0x14]
jb 0x408080
mov eax, dword [esp + 0x28]
mov dword [eax], 3
mov dword [eax + 8], 0
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.0046efa0
mov eax, dword [esp + 0x28]
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
mov dword [esp], 0xffffffff
test al, al
jne 0x407fc0
jmp 0x408014
push 2
call fcn.00472467
add esp, 4
push eax
push 1
push 0x22
push str.Cannot_get_standard_output_handle_n
jmp 0x408256
push 2
call fcn.00472467
add esp, 4
push eax
push 1
push 0x21
push str.Cannot_get_standard_input_handle_n
call fcn.004815e7
add esp, 0x10
push 1
call fcn.00407710
int3