Function at 0x415d20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x10038
call fcn.004d6f00
sub esp, eax
cmp edx, 0xfffffff5
mov eax, dword [esp + eax]
mov dword [ebp - 0x10024], eax
je 0x415f66
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 0x415f89
test eax, eax
js 0x415e20
mov dword [esp], eax
call sub.msvcrt.dll__dup
cmp eax, 0xffffffff
mov esi, eax
je 0x415fd0
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__setmode]
cmp eax, 0xffffffff
je 0x416008
mov dword [esp + 4], 0x561814
mov dword [esp], esi
call sub.msvcrt.dll__fdopen
test eax, eax
mov ebx, eax
je 0x41604b
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 0x415e22
call dword [sym.imp.msvcrt.dll__errno]
mov esi, 1
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00434820
mov dword [esp + 4], str.adb:_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.004342f0
jmp 0x415ec7
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 0x415ef4
test ebx, ebx
je 0x415e30
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.00434420
mov edx, dword [ebp - 0x10020]
cmp eax, edx
je 0x415e30
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.adb:_error:_only_wrote__zu_of__lu_bytes_to__s_n
add eax, 0x40
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call fcn.004342f0
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov eax, dword [ebp - 0x10024]
test eax, eax
je 0x415eea
mov dword [esp], eax
lea ecx, [ebp - 0x10024]
call fcn.0042f4e0
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 0x415f59
lea edx, [ebp - 0x1001c]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.0043c720
mov eax, dword [ebp - 0x1001c]
mov dword [esp + 4], str.adb:_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.004342f0
mov eax, dword [ebp - 0x1001c]
lea ecx, [eax - 0xc]
cmp ecx, 0x55c3f0
jne 0x416078
mov esi, 1
test ebx, ebx
jne 0x415ec7
jmp 0x415ecf
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 0x415d68
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00434820
mov dword [esp + 4], str.adb:_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.004342f0
mov esi, 1
jmp 0x415ecf
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00434820
mov dword [esp + 4], str.adb:_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.004342f0
jmp 0x415fbf
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00434820
mov dword [esp + 4], str.adb:_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.004342f0
mov dword [esp], esi
call sub.msvcrt.dll__close
jmp 0x415fbf
nop
lea esi, [esi]
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00434820
mov dword [esp + 4], str.adb:_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 0x41602e
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x415f54
lea eax, [ebp - 0x10025]
mov dword [esp], eax
call fcn.0051c400
push eax
jmp 0x415f54