Function at 0x411360
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x10038
call fcn.004a1290
sub esp, eax
cmp edx, 0xfffffff5
mov eax, dword [esp + eax]
mov dword [ebp - 0x10024], eax
je 0x4115a6
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [ebp - 0x1002c], str.stderr
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll__fileno_1
cmp eax, 0xffffffff
je 0x4115c9
test eax, eax
js 0x411460
mov dword [esp], eax
call sub.msvcrt.dll__dup
cmp eax, 0xffffffff
mov esi, eax
je 0x411610
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__setmode]
cmp eax, 0xffffffff
je 0x411648
mov dword [esp + 4], 0x525983
mov dword [esp], esi
call sub.msvcrt.dll__fdopen
test eax, eax
mov ebx, eax
je 0x41168b
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_setvbuf
cmp eax, 0xffffffff
jne 0x411462
call dword [sym.imp.msvcrt.dll__errno]
mov esi, 1
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp + 4], str.Failed_to_unbuffer__s:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1002c]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
jmp 0x411507
xor ebx, ebx
lea edi, [ebp - 0x10020]
lea esi, [ebp - 0x10018]
nop
mov eax, dword [ebp - 0x10024]
mov dword [ebp - 0x10020], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x10000
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x411534
test ebx, ebx
je 0x411470
mov eax, dword [ebp - 0x10020]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 1
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.0042a550
mov edx, dword [ebp - 0x10020]
cmp eax, edx
je 0x411470
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov esi, 1
mov ecx, dword [ebp - 0x1002c]
mov dword [esp + 0xc], edx
mov dword [esp + 4], str.Only_wrote__zu_of__lu_bytes_to__s_n
add eax, 0x40
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call fcn.0042a420
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov eax, dword [ebp - 0x10024]
test eax, eax
je 0x41152a
mov dword [esp], eax
lea ecx, [ebp - 0x10024]
call fcn.004247b0
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
cmp eax, 0x6d
je 0x411599
lea edx, [ebp - 0x1001c]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.0042ecc0
mov eax, dword [ebp - 0x1001c]
mov dword [esp + 4], str.Failed_to_read_from__s:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1002c]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
mov eax, dword [ebp - 0x1001c]
lea esi, [eax - 0xc]
cmp esi, 0x51ef30
jne 0x4116b8
mov esi, 1
test ebx, ebx
jne 0x411507
jmp 0x41150f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [ebp - 0x1002c], str.stdout
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll__fileno_1
cmp eax, 0xffffffff
jne 0x4113a8
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp + 4], str.Failed_to_get_file_descriptor_for__s:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1002c]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
mov esi, 1
jmp 0x41150f
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp + 4], str.Failed_to_duplicate_file_descriptor_for__s:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1002c]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
jmp 0x4115ff
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp + 4], str.Failed_to_set_binary_mode_for_duplicate_of__s:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1002c]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
mov dword [esp], esi
call sub.msvcrt.dll__close
jmp 0x4115ff
nop
lea esi, [esi]
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp + 4], str.Failed_to_open_duplicate_stream_for__s:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1002c]
mov dword [esp + 8], eax
jmp 0x41166e
sub eax, 4
call fcn.00515d58
test eax, eax
jg 0x411594
lea eax, [ebp - 0x10025]
mov ecx, esi
mov dword [esp], eax
call fcn.004e2310
push eax
jmp 0x411594