Function at 0x414a20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x33c
mov eax, dword [sym.imp.msvcrt.dll__open]
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8101
mov dword [esp], str.fdopen.tst
mov dword [ebp - 0x334], eax
call eax
mov dword [esp + 8], 0x14
mov ebx, eax
mov dword [esp + 4], str.0_1_2_3_4_5_6_7_8_9
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__write]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__close]
mov dword [ebp - 0x330], 0
mov dword [esp + 4], 0x8000
mov eax, dword [ebp - 0x334]
mov dword [esp], str.fdopen.tst
call eax
mov dword [esp + 4], 0x45b429
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__fdopen]
mov dword [esp + 0xc], 0x800
mov edi, eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_setvbuf]
test esi, esi
je 0x4155a5
mov dword [esp + 4], 0x9b
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 4], str.file___base__NULL_n
mov edx, dword [edi + 8]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x9c
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 8], esi
mov dword [esp + 4], str.strlen_sizeof_error_for_bufmode_x_n
mov dword [esp], 1
call fcn.0044cad0
mov dword [esp + 4], 0x9d
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x318]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x100
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_fgets]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fgets_failed_unexpected_for_bufmode_x_n
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x9e
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x318]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x100
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_fgets]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fgets_didnt_signal_EOF_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x9f
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.feof_doesnt_signal_EOF_for_bufmode_x_n
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_rewind]
mov dword [esp + 4], 0xa1
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x318]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x13
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_fgets]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fgets_failed_unexpected_for_bufmode_x_n
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xa2
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea edx, [ebp - 0x318]
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x414c66
mov ecx, eax
mov dword [esp + 8], esi
shr ecx, 0x10
test eax, 0x8080
mov dword [esp + 4], str.fgets_didnt_read_right_size_for_bufmode_x_n
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
mov ecx, eax
add cl, al
lea eax, [ebp - 0x318]
sbb edx, 3
sub edx, eax
xor eax, eax
cmp edx, 0x12
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xa3
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x318]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x14
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_fgets]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fgets_failed_unexpected_for_bufmode_x_n
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xa4
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea edx, [ebp - 0x318]
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x414d1f
mov ecx, eax
mov dword [esp + 8], esi
mov ebx, 0x30
shr ecx, 0x10
test eax, 0x8080
mov dword [esp + 4], str.fgets_dropped_chars_for_bufmode_x_n
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
mov ecx, eax
add cl, al
lea eax, [ebp - 0x318]
sbb edx, 3
sub edx, eax
xor eax, eax
cmp edx, 1
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xa5
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
cmp byte [ebp - 0x318], 0x39
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.fgets_exchanged_chars_for_bufmode_x_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_rewind]
xor edx, edx
mov dword [ebp - 0x32c], esi
mov esi, edx
jmp 0x414dc8
movsx ebx, byte [esi + str.0_1_2_3_4_5_6_7_8_9]
mov dword [esp + 4], 0xaa
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetc]
mov ecx, dword [ebp - 0x32c]
mov dword [esp + 4], str.fgetc_returned_wrong_data_for_bufmode_x_n
cmp ebx, eax
sete al
mov dword [esp + 8], ecx
add esi, 1
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
cmp esi, 0x14
jne 0x414dc1
mov dword [esp + 4], 0xac
mov esi, dword [ebp - 0x32c]
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetc]
mov dword [esp + 8], esi
mov ebx, eax
xor eax, eax
mov dword [esp + 4], str.getc_did_not_return_EOF_for_bufmode_x_n
cmp ebx, 0xffffffff
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xad
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.feof_did_not_return_EOF_for_bufmode_x_n
call fcn.0044cad0
mov dword [esp + 4], 0xae
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], ebx
mov dword [esp + 4], edi
call dword [sym.imp.msvcrt.dll_ungetc]
mov dword [esp + 8], esi
cmp eax, 0xffffffff
mov dword [esp + 4], str.ungetc_EOF__did_not_return_EOF_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xaf
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.feof_after_ungetc_EOF__did_not_return_EOF_for_bufmode_x_n
call fcn.0044cad0
mov dword [esp + 4], 0xb0
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetc]
mov dword [esp + 8], esi
cmp eax, 0xffffffff
mov dword [esp + 4], str.getc_did_not_return_EOF_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb2
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll_ungetc]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.ungetc_did_not_return_its_input_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb3
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.feof_after_ungetc_returned_EOF_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb4
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetc]
mov dword [esp + 8], esi
mov ebx, eax
xor eax, eax
mov dword [esp + 4], str.getc_after_ungetc_returned_EOF_for_bufmode_x_n
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb5
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
test ebx, ebx
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.getc_did_not_return_ungetcd_data_for_bufmode_x_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb7
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.feof_after_getc_returned_EOF_prematurely_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb8
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetc]
mov dword [esp + 8], esi
cmp eax, 0xffffffff
mov dword [esp + 4], str.getc_did_not_return_EOF_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xb9
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.feof_after_getc_did_not_return_EOF_for_bufmode_x_n
call fcn.0044cad0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_rewind]
mov dword [esp + 4], 0xbc
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x320]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_fgetpos]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fgetpos_failed_unexpected_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xbd
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x31c]
mov edx, dword [ebp - 0x320]
test eax, eax
je 0x415290
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0x45c726
call fcn.0040eab0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x320]
or eax, dword [ebp - 0x31c]
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 4], str.Unexpected_result_of_fgetpos__s_for_bufmode_x_n
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xbf
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x320], 0x14
mov dword [ebp - 0x31c], 0
call fcn.0044c860
lea eax, [ebp - 0x320]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_fsetpos]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fsetpos_failed_unexpected_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xc0
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x320]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_fgetpos]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.fgetpos_failed_unexpected_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xc1
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x31c]
mov edx, dword [ebp - 0x320]
test eax, eax
je 0x415590
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0x45c726
call fcn.0040eab0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x320]
mov dword [esp + 0xc], esi
xor eax, 0x14
or eax, dword [ebp - 0x31c]
mov dword [esp + 4], str.Unexpected_result_of_fgetpos__s_for_bufmode_x_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fclose]
cmp dword [ebp - 0x330], 1
je 0x4152a5
mov dword [ebp - 0x330], 1
mov esi, 4
jmp 0x414a80
mov dword [esp + 4], edx
mov dword [esp], 0x45c72f
call fcn.0040eab0
jmp 0x41513a
mov dword [esp + 4], 0x4000
mov eax, dword [ebp - 0x334]
lea ebx, [ebp - 0x218]
mov dword [esp], str.fdopen.tst
call eax
mov dword [esp + 4], 0x45b14a
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__fdopen]
mov dword [esp + 4], 0xc7
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
mov edi, dword [sym.imp.msvcrt.dll_fgetws]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x100
mov dword [esp], ebx
call edi
mov dword [esp + 4], str.fgetws_failed_unexpected_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xc8
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 8], esi
mov dword [esp + 4], 0x100
mov dword [esp], ebx
call edi
mov dword [esp + 4], str.fgetws_didnt_signal_EOF_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xc9
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 4], str.feof_doesnt_signal_EOF_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_rewind]
mov dword [esp + 4], 0xcb
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 8], esi
mov dword [esp + 4], 0x13
mov dword [esp], ebx
call edi
mov dword [esp + 4], str.fgetws_failed_unexpected_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xcc
mov dword [esp], 0x45a2c0
call fcn.0044c860
cmp word [ebp - 0x218], 0
je 0x4155e0
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x4153f4
sub eax, ebx
cmp eax, 0x24
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.fgetws_didnt_read_right_size_n
call fcn.0044cad0
mov dword [esp + 4], 0xcd
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 8], esi
mov dword [esp + 4], 0x14
mov dword [esp], ebx
call edi
mov dword [esp + 4], str.fgets_failed_unexpected_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xce
mov dword [esp], 0x45a2c0
call fcn.0044c860
cmp word [ebp - 0x218], 0
je 0x4155e7
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x415480
sub eax, ebx
cmp eax, 2
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.fgets_dropped_chars_n
call fcn.0044cad0
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp + 4], 0x45b429
mov dword [esp], str.fdopen.tst
call dword [sym.imp.msvcrt.dll_fopen]
mov dword [esp + 4], 0xd2
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.fopen_failed_n
setne al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xd4
mov dword [esp], 0x45a2c0
call fcn.0044c860
lea eax, [ebp - 0x318]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x100
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_fread]
mov dword [esp + 4], str.fread_test_failed_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0xd6
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_feof]
mov dword [esp + 4], str.feof_after_fread_failed_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp], str.fdopen.tst
call dword [sym.imp.msvcrt.dll__unlink]
add esp, 0x33c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], edx
mov dword [esp], 0x45c72f
call fcn.0040eab0
jmp 0x41523a
mov dword [esp + 4], 0x9a
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [edi + 0x18]
mov dword [esp + 4], str.file___bufsiz___d_n
cmp eax, 0x800
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
jmp 0x414acf
xor eax, eax
jmp 0x415408
xor eax, eax
jmp 0x415494