Function at 0x4133c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x2078
call fcn.0044d8e0
sub esp, eax
mov eax, dword [esp + eax]
mov dword [esp + 8], 0x8000
mov dword [ebp - 0x2064], eax
lea eax, [ebp - 0x2050]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__pipe]
mov dword [esp + 4], 0x400
mov dword [ebp - 0x2068], eax
call eax
test eax, eax
js 0x413f60
mov ebx, dword [ebp - 0x2064]
mov eax, ebx
call fcn.0040a320
mov dword [esp + 4], 0x45a517
mov dword [ebp - 0x2030], eax
lea eax, [ebp - 0x2048]
mov dword [ebp - 0x2024], eax
mov eax, dword [ebp - 0x2050]
mov dword [ebp - 0x202c], 0x45a50a
mov dword [esp + 8], eax
lea eax, [ebp - 0x2048]
mov dword [esp], eax
mov dword [ebp - 0x2028], str.pipes
call fcn.0040aaa0
lea eax, [ebp - 0x203c]
mov dword [esp + 4], 0x45a517
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x203c]
mov dword [esp], eax
call fcn.0040aaa0
lea eax, [ebp - 0x2030]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__spawnvp]
mov dword [ebp - 0x201c], 0
mov dword [esp], 1
mov dword [ebp - 0x206c], eax
call eax
mov dword [0x46d7b0], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__close]
mov dword [ebp - 0x2060], eax
call eax
mov dword [esp + 4], 0x8fe
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
mov eax, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x205c], eax
call eax
mov eax, dword [eax]
mov dword [esp + 4], str.unable_to_close__d:__d_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
sete al
xor ebx, ebx
mov dword [esp], eax
call fcn.0044cad0
lea eax, [ebp - 0x2018]
mov dword [esp + 8], 0xfff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x902
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0xb
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.i__d__got__d_n
mov dword [esp], eax
call fcn.0044cad0
test esi, esi
jle 0x41357f
mov byte [ebp + esi - 0x2018], 0
mov dword [esp + 4], 0x905
mov edi, str.Hello_world
lea esi, [ebp - 0x2018]
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov ecx, 0xc
repe cmpsb byte [esi], byte es:[edi]
lea edi, [ebp - 0x2018]
mov dword [esp + 8], str.Hello_world
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.expected_to_read__s__got__s_n
seta al
sbb al, 0
test al, al
sete al
add ebx, 1
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
cmp ebx, 3
jne 0x41351c
mov eax, dword [ebp - 0x2050]
mov dword [esp + 8], 0xfff
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x909
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.expected_to_read_0_bytes__got__d_n
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
mov eax, dword [ebp - 0x2060]
call eax
mov dword [esp + 4], 0x90b
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
mov eax, dword [eax]
mov dword [esp + 4], str.unable_to_close__d:__d_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2050]
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
sete al
mov dword [esp], eax
call fcn.0044cad0
lea eax, [ebp - 0x2050]
mov dword [esp + 8], 0x8000
mov dword [esp], eax
mov eax, dword [ebp - 0x2068]
mov dword [esp + 4], 0x400
call eax
test eax, eax
js 0x413fc0
lea eax, [ebp - 0x2048]
mov esi, 3
mov dword [esp + 4], 0x45a517
mov dword [ebp - 0x2024], eax
mov eax, dword [ebp - 0x2050]
mov dword [ebp - 0x202c], 0x45a50a
mov dword [esp + 8], eax
lea eax, [ebp - 0x2048]
mov dword [esp], eax
mov dword [ebp - 0x2028], str.pipes
call fcn.0040aaa0
lea eax, [ebp - 0x203c]
mov dword [esp + 4], 0x45a517
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x203c]
mov dword [esp], eax
call fcn.0040aaa0
lea eax, [ebp - 0x2030]
mov dword [ebp - 0x201c], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2064]
mov dword [esp], 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x206c]
call eax
mov dword [0x46d7b4], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2060]
call eax
mov dword [esp + 4], 0x91b
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
mov eax, dword [eax]
mov dword [esp + 4], str.unable_to_close__d:__d_n
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
lea ebx, [ebp - 0x1018]
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov dword [esp + 4], 0x45af56
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__fdopen]
mov byte [ebp - 0x1018], 0
mov edi, eax
mov edx, ebx
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4137cc
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
mov ecx, eax
add cl, al
sbb edx, 3
mov dword [edx], 0x6c6c6548
mov dword [edx + 4], 0x6f77206f
mov dword [edx + 8], 0x646c72
sub esi, 1
jne 0x4137ca
lea eax, [ebp - 0x2018]
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_fread]
mov dword [esp + 8], 0xfff
mov dword [esp + 4], 1
mov dword [ebp - 0x2070], eax
call eax
mov dword [esp + 4], 0x926
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x206c], eax
call fcn.0044c860
mov eax, dword [sym.imp.msvcrt.dll_ferror]
mov dword [esp], edi
mov dword [ebp - 0x2074], eax
call eax
mov ecx, ebx
mov esi, dword [ecx]
add ecx, 4
lea edx, [esi - 0x1010101]
not esi
and edx, esi
and edx, 0x80808080
je 0x41386b
mov esi, edx
mov dword [ebp - 0x2064], eax
shr esi, 0x10
test edx, 0x8080
mov dword [esp + 4], str.fread___returned__d:_ferror_d_n
cmove edx, esi
lea esi, [ecx + 2]
cmove ecx, esi
mov esi, dword [ebp - 0x206c]
mov eax, edx
add al, dl
mov eax, dword [ebp - 0x2064]
mov dword [esp + 8], esi
sbb ecx, 3
sub ecx, ebx
mov dword [esp + 0xc], eax
xor eax, eax
cmp esi, ecx
sete al
mov dword [esp], eax
call fcn.0044cad0
test esi, esi
jle 0x4138dc
mov byte [ebp + esi - 0x2018], 0
mov dword [esp + 4], 0x929
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x2018]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 0xc], ebx
lea ebx, [ebp - 0x2018]
test eax, eax
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got__s_expected__s_n
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], 0x64
call dword [sym.imp.kernel32.dll_Sleep]
mov eax, dword [ebp - 0x2070]
sub esp, 4
mov dword [esp], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xfff
mov dword [esp + 4], 1
call eax
mov dword [esp + 4], 0x92e
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.fread___returned__d_instead_of_0_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x92f
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov esi, dword [ebp - 0x2074]
mov dword [esp], edi
call esi
mov dword [esp], edi
mov ebx, eax
call esi
mov dword [esp + 8], ebx
test eax, eax
mov dword [esp + 4], str.got_ferror_____d_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x930
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 4], str.feof___is_false__n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp + 4], 0x933
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
mov eax, dword [eax]
mov dword [esp + 4], str.unable_to_close_the_pipe:__d_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
sete al
mov dword [esp], eax
call fcn.0044cad0
lea eax, [ebp - 0x2050]
mov dword [esp + 8], 0x8000
mov dword [esp], eax
mov eax, dword [ebp - 0x2068]
mov dword [esp + 4], 0x400
call eax
test eax, eax
js 0x413fa0
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], 7
lea edi, [ebp - 0x2018]
mov dword [esp + 4], str._r_n_rab_r_n
mov ebx, dword [sym.imp.msvcrt.dll__write]
mov dword [esp], eax
call ebx
mov dword [esp + 4], 0x93c
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
mov eax, dword [eax]
mov dword [esp + 8], esi
mov dword [esp + 4], str.write_returned__d__errno___d_n
mov dword [esp + 0xc], eax
xor eax, eax
cmp esi, 7
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov dword [esp + 4], 0x4000
mov esi, dword [sym.imp.msvcrt.dll__setmode]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x2050]
mov dword [esp + 4], edi
mov dword [esp + 8], 1
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x93f
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
xor eax, eax
cmp edi, 1
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.read_returned__d__expected_1_n
lea edi, [ebp - 0x2018]
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x940
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, byte [ebp - 0x2018]
mov dword [esp + 4], str.buf_0____x__expected__n_n
cmp dl, 0xa
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov dword [esp + 4], edi
mov dword [esp + 8], 1
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x942
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
xor eax, eax
cmp edi, 1
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.read_returned__d__expected_1_n
lea edi, [ebp - 0x2018]
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x943
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, byte [ebp - 0x2018]
mov dword [esp + 4], str.buf_0____x__expected__r_n
cmp dl, 0xd
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov dword [esp + 4], edi
mov dword [esp + 8], 1
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x945
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
xor eax, eax
cmp edi, 1
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.read_returned__d__expected_1_n
lea edi, [ebp - 0x2018]
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x946
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, byte [ebp - 0x2018]
mov dword [esp + 4], str.buf_0____x__expected_a_n
cmp dl, 0x61
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov dword [esp + 4], edi
mov dword [esp + 8], 2
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x948
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
xor eax, eax
cmp edi, 2
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.read_returned__d__expected_1_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x949
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, byte [ebp - 0x2018]
mov dword [esp + 4], str.buf_0____x__expected_b_n
cmp dl, 0x62
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x94a
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, byte [ebp - 0x2017]
mov dword [esp + 4], str.buf_1____x__expected__n_n
cmp dl, 0xa
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov ecx, dword [0x46d7ac]
test ecx, ecx
je 0x413fd0
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], 3
mov dword [esp + 4], 0x45c0bb
mov dword [esp], eax
call ebx
mov dword [esp + 4], 0x950
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
mov eax, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.write_returned__d__errno___d_n
mov dword [esp + 0xc], eax
xor eax, eax
cmp edi, 3
lea edi, [ebp - 0x2018]
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, 0x7a7a
mov dword [esp + 4], 0x10000
mov word [ebp - 0x2016], ax
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x2050]
mov dword [esp + 8], 4
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x955
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 2
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.read_returned__d__expected_2_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x956
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
mov dword [esp + 4], str.read_returned_incorrect_data_n
cmp dword [ebp - 0x2018], 0x7a620061
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x204c]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x45c0fb
mov dword [esp], eax
call ebx
mov dword [esp + 4], 0x958
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
mov eax, dword [eax]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.write_returned__d__errno___d_n
mov dword [esp + 0xc], eax
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x2050]
mov edx, 0x7a7a
mov dword [esp + 8], 2
mov word [ebp - 0x2018], dx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 4], 0x95c
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.read_returned__d__expected_0_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x95d
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
mov dword [esp + 4], str.read_returned_incorrect_data_n
cmp word [ebp - 0x2018], 0x7a00
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x204c]
mov ebx, dword [ebp - 0x2060]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 0x8f2
mov dword [esp], 0x45a2c0
call fcn.0044c860
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 4], str.pipe_failed_with_errno__d_n
mov dword [esp], 0
mov dword [esp + 8], eax
call fcn.0044cad0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 0x938
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x205c]
call eax
jmp 0x413f7a
mov dword [esp + 4], 0x910
jmp 0x413fa8
mov dword [esp + 4], 0x961
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], str.unicode_mode_tests_on_pipe_n
call fcn.0044cbe0
jmp 0x413f36