Function at 0x40eaf7
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0042b680
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp word [esi + 0x89e], bx
je 0x40eb63
push str.Reading_spooled_print_data_from_WilCom
push dword [esi + 0x58]
call fcn.0041e63d
push 0x80
lea eax, [esi + 0x308e]
push ebx
push eax
call fcn.0042b620
add esp, 0x14
mov word [esi + 0x1a76], 1
mov word [esi + 0x1a74], bx
mov dword [esi + 0x350c], 0x30305046
mov word [esi + 0x3c56], bx
mov word [esi + 0x3512], bx
jmp 0x40edc9
lea edi, [esi + 0x1aec]
push edi
push 0x4524e4
push dword [ebp + 8]
call fcn.00407697
add esp, 0xc
push edi
push str.Open_fax_file___s_
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x1a6c], eax
jne 0x40ebf8
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x1004]
push 0x1000
push eax
call edi
push eax
call fcn.00424a92
add esp, 0xc
push eax
push str.Cant_open_fax_file____s
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
call edi
test eax, 0xffffff80
je 0x40ebea
mov eax, 0x8030
jmp 0x40ee0d
xor ecx, ecx
mov ch, al
or cx, 0x8030
jmp 0x40ee0b
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xffffff80
cmp eax, 0xffffffff
mov dword [esi + 0x884], eax
jne 0x40ec27
call ebx
test eax, eax
je 0x40ec27
push str.Error_reading_size_of_fax_document
jmp 0x40ede8
cmp dword [ebp + 8], 0
je 0x40ec34
or dword [esi + 0x884], 0xffffffff
lea ecx, [ebp - 4]
push 0
mov edi, 0x80
lea eax, [esi + 0x308e]
push ecx
push edi
push eax
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ede3
cmp dword [ebp - 4], edi
jne 0x40ede3
cmp dword [esi + 0x308e], 0x4844464c
lea eax, [esi + 0x308e]
jne 0x40edce
xor ebx, ebx
cmp word [esi + 0x3092], bx
jne 0x40edce
push edi
push eax
call fcn.0040e839
pop ecx
test al, al
pop ecx
je 0x40ecae
push str.Fax_document_header_checksum_is_incorrect
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8032
pop ecx
jmp 0x40ee0d
mov ax, word [esi + 0x309e]
mov ecx, 0x451740
sub ax, word [esi + 0x30aa]
cmp ax, 1
mov word [esi + 0x1a5e], ax
je 0x40ecd3
mov ecx, 0x439348
movzx edx, word [esi + 0x1a56]
movzx eax, ax
push edx
push ecx
push eax
push str.Fax_document_contains__u_page_s__starting_to_send_from_page__u
push dword [esi + 0x58]
call fcn.0041e63d
movzx eax, word [esi + 0x30b4]
mov ecx, dword [esi + 0x3504]
add esp, 0x14
not ecx
test eax, ecx
je 0x40ed0d
push str.Fax_document_contains_unsupported_fax_resolutions
jmp 0x40eda6
movzx ecx, word [esi + 0x30b2]
mov edx, dword [esi + 0x34e4]
not edx
test ecx, edx
je 0x40ed27
push str.Fax_document_contains_unsupported_fax_widths
jmp 0x40eda6
movzx edx, word [esi + 0x30b6]
test edx, 0xffffffee
je 0x40ed3d
push str.Fax_document_contains_unsupported_fax_compression_methods
jmp 0x40eda6
movzx edx, word [esi + 0x30ae]
test edx, 0xfffffffe
je 0x40ed53
push str.Fax_document_contains_mandatory_unsupported_sub_document_types
jmp 0x40ed67
movzx edx, word [esi + 0x30a0]
cmp edx, dword [esi + 0x3508]
jbe 0x40ed7a
push str.Fax_document_contains_page_length_longer_than_is_supported
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8045
pop ecx
jmp 0x40ee0d
cmp word [0x452ca8], bx
jne 0x40ed91
lea edx, [ecx - 1]
test ecx, edx
je 0x40ed91
push str.Fax_document_contains_multiple_fax_widths
jmp 0x40eda6
cmp word [0x452caa], bx
jne 0x40edb6
lea ecx, [eax - 1]
test eax, ecx
je 0x40edb6
push str.Fax_document_contains_multiple_fax_resolutions
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8046
pop ecx
jmp 0x40ee0d
mov eax, dword [esi + 0x3096]
mov word [esi + 0x1a76], bx
mov dword [esi + 0x1a88], eax
xor ax, ax
jmp 0x40ee0d
push str.Fax_document_is_invalid
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8031
pop ecx
jmp 0x40ee0d
push str.Error_reading_fax_document_header
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
pop ecx
call ebx
test eax, 0xffffff80
je 0x40ee02
mov eax, 0x8037
jmp 0x40ee0d
xor ecx, ecx
mov ch, al
or cx, 0x8037
mov eax, ecx
pop edi
pop esi
pop ebx
leave
ret 4