Function at 0x4019b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.004015d0
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x40
ja 0x401a02
mov dword [esp + 4], 0xfc
mov dword [esp], str.ERR_L_d_:
call fcn.0041ce30
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], str.file_size_0x_x_too_small_n
call fcn.0041ce30
mov eax, 0xfd
jmp 0x401c6d
mov eax, 0x10000
cmp dword [ebp - 0x14], 0x10000
cmovbe eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
je 0x401a80
mov dword [esp + 4], 0x105
mov dword [esp], str.ERR_L_d_:
call fcn.0041ce30
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov dword [esp], str.Want_to_read_0x_x__but_only_read_0x_x_n
call fcn.0041ce30
mov eax, 0x106
jmp 0x401c6d
mov eax, dword [ebp + 0x14]
add eax, 8
mov dword [esp + 8], 8
mov dword [esp + 4], eax
mov dword [esp], str.AML_RES_
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x401bd2
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x10]
cmp dword [ebp - 0x14], eax
jae 0x401aec
mov dword [esp + 4], 0x10c
mov dword [esp], str.ERR_L_d_:
call fcn.0041ce30
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.error__image_size_in_head_0x_x___fileSz_0x_x_n
call fcn.0041ce30
mov eax, 0x10d
jmp 0x401c6d
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
cmp eax, 2
jle 0x401b2b
mov dword [esp + 4], 0x110
mov dword [esp], str.ERR_L_d_:
call fcn.0041ce30
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
mov dword [esp], str.Error__version_0x_x_not_supported_n
call fcn.0041ce30
mov eax, 0x111
jmp 0x401c6d
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
cmp dword [ebp + 0x10], 0
je 0x401b98
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x10]
lea edx, [eax - 4]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 4
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00402d83
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x401b98
mov dword [esp + 4], 0x119
mov dword [esp], str.ERR_L_d_:
call fcn.0041ce30
mov dword [esp], str.Error_when_check_crc_n
call fcn.0041ce30
mov eax, 0x11a
jmp 0x401c6d
mov dword [ebp - 0xc], 0x40
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
cmp eax, 2
jne 0x401bb6
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x14]
shl eax, 6
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
jmp 0x401c47
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
mov dword [esp], str.dbg:
call fcn.0041ce30
mov dword [esp], str.magic_error__try_old_version_image._n
call fcn.0041ce30
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
cmp eax, 0x27051956
je 0x401c23
mov dword [esp + 4], 0x126
mov dword [esp], str.ERR_L_d_:
call fcn.0041ce30
mov dword [esp], str.magic_err__old_version_image_header_not_item_header__n
call fcn.0041ce30
mov eax, 0x127
jmp 0x401c6d
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov dword [esp], str.dbg:
call fcn.0041ce30
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.res_img_ver_is_0x_x_n
call fcn.0041ce30
mov eax, 0
leave
ret