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 0x4b590f
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.0046ea50
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.00482c50
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 0x4b588d
push ebp
push esi
call fcn.00416ef0
add esp, 0x14
test al, al
jne 0x408014
push 0
push ebx
push 1
push 0x4b588d
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.00482c50
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 0x4b588d
push ebp
push esi
call fcn.00416ef0
add esp, 0x14
test al, al
jne 0x408068
push 0
push ebx
push 1
push 0x4b588d
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.00482c50
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]
invalid