Function at 0x490710
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66282b
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x93500c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xb0], edi
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x88]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
push 0
push 0
push 0x111d
push str.HPXS::CeSCLDevManager::ReadScanEx
push 0x12fd214
push dword [0x12fa964]
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xb4], ebx
call fcn.004203f9
mov eax, dword [ebp - 0x98]
mov dword [ebp - 4], 0
mov dword [ebx], 0
mov dword [ebp - 0xa0], 0
mov dword [eax], 0
cmp dword [edi + 0x58], 2
jne 0x4908f7
cmp dword [edi + 0x500], 0
jne 0x490830
cmp dword [edi + 0x98], 8
lea eax, [edi + 0x84]
jb 0x4907cc
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 0x500], eax
test eax, eax
je 0x4907f4
cmp eax, 0xffffffff
jne 0x490830
mov dword [ebx], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_open_temp_file_for_reading._GetLastError__lx
push 0x112f
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
add esp, 0x14
mov dword [ebp - 0x80], 0x80004005
mov esi, 0x80004005
jmp 0x490c29
push str.Doing_JPG_passthru_reads
push 0x1133
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
add esp, 0x10
push 0
push dword [ebp - 0x98]
push dword [ebp + 0xc]
push esi
push dword [edi + 0x500]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4908b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x98]
push dword [eax]
lea eax, [ebp - 0x88]
push esi
push str.Failed_to_read_data_from_compressed_file__dwBytes_d__dwBytesRead_d__GetLastError__d
push 0x1136
push 0x200
push eax
call fcn.0042077f
add esp, 0x1c
mov dword [ebx], 8
mov esi, 0x80004005
mov dword [ebp - 0x80], 0x80004005
jmp 0x490c29
mov edi, dword [ebp - 0x98]
lea eax, [ebp - 0x88]
mov esi, dword [ebp + 0xc]
push 0
push dword [edi]
push esi
push str.Finished_m_pEsclScan__ReadScan_bytesRequested_d__bytesRead_d_hr0x_08X
push 0x113c
push 0x200
push eax
call fcn.0042077f
mov eax, dword [edi]
add esp, 0x1c
cmp eax, esi
jae 0x4908ea
mov dword [ebx], 0xf
sbb esi, esi
and esi, 0x80004005
jmp 0x490c26
mov ecx, dword [edi + 0x4d0]
xor edx, edx
mov eax, dword [ebp + 0xc]
div ecx
mov dword [ebp - 0x9c], ecx
imul ecx, eax
mov dword [ebp - 0x8c], eax
cmp ecx, dword [ebp + 0xc]
je 0x490952
push str.HPXS::CeSCLDevManager::ReadScanEx
push str._s_mismatch_scan_lines
push 0x1150
lea eax, [ebp - 0x88]
mov dword [ebx], 2
push 0x200
push eax
call fcn.0042077f
add esp, 0x14
mov dword [ebp - 0x80], 0x80004005
mov esi, 0x80004005
jmp 0x490c29
push dword [edi + 0x68]
push eax
push dword [edi + 0x64]
lea eax, [ebp - 0x88]
push str.LineCount___d__lines_this_read___d__trueHeight___d
push 0x1154
push 0x200
push eax
call fcn.0042077f
add esp, 0x1c
cmp byte [edi + 0x10], 0
je 0x4909a3
mov eax, dword [ebp - 0x8c]
mov ecx, dword [edi + 0x64]
add eax, ecx
mov edx, dword [edi + 0x68]
cmp eax, edx
jbe 0x4909a3
mov eax, edx
mov dword [ebp - 0xa0], 1
sub eax, ecx
mov dword [ebp - 0x8c], eax
push dword [ebp + 0xc]
mov dword [ebp - 0x90], 0
call fcn.0052c340
add esp, 4
mov dword [ebp - 0x94], eax
test eax, eax
je 0x49089b
mov edx, dword [ebp + 0xc]
push edx
push 0xff
push eax
call fcn.005e1980
add esp, 0xc
push dword [ebp + 0xc]
push 0xff
push esi
call fcn.005e1980
mov eax, dword [edi + 0x4d0]
add esp, 0xc
mov ecx, dword [ebp - 0x9c]
mov esi, eax
imul esi, dword [ebp - 0x8c]
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0x8c], esi
cmp ecx, eax
jae 0x490a50
push ecx
push eax
push str.Error:_BytesPerLine_mismatch_Src_d___Dest_d
push 0x116e
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
push dword [ebp - 0x94]
mov dword [ebx], 2
call fcn.0052f7e0
add esp, 0x1c
mov dword [ebp - 0x80], 0x80004005
mov esi, 0x80004005
jmp 0x490c29
push esi
push str.Starting_m_pEsclScan__ReadScan_bytesRequesting_d
push 0x1173
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
mov ecx, dword [edi + 0x40]
lea eax, [ebp - 0x90]
add esp, 0x14
push eax
push esi
push dword [ebp - 0x94]
call fcn.00499fd0
mov esi, eax
lea eax, [ebp - 0x88]
push esi
push dword [ebp - 0x90]
mov dword [ebp - 0xac], esi
push str.Finished_m_pEsclScan__ReadScan_bytesRead_d_hr0x_08X
push 0x117a
push 0x200
push eax
call fcn.0042077f
add esp, 0x18
cmp byte [edi + 0x10], 0
jne 0x490ae8
mov ecx, dword [ebp - 0x90]
mov eax, dword [ebp - 0x8c]
cmp ecx, eax
jae 0x490ae8
push eax
push ecx
push str.bytesRead__d__less_than_bytesRequested__d_
push 0x117d
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
add esp, 0x18
cmp byte [edi + 0x11], 0
je 0x490b14
push str.A_cancel_has_been_received___from_user
push 0x1181
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
add esp, 0x10
mov dword [ebx], 0x10
jmp 0x490b5c
test esi, esi
jns 0x490b21
push ebx
push esi
call fcn.0048cfa0
jmp 0x490b57
cmp dword [ebp - 0x90], 0
je 0x490b2f
cmp esi, 1
jne 0x490b57
push str.End_of_ScanData_to_Read
push 0x118b
lea eax, [ebp - 0x88]
push 0x200
push eax
call fcn.0042077f
add esp, 0x10
mov dword [ebp - 0xa0], 1
cmp dword [ebx], 0
je 0x490b7b
push dword [ebp - 0x94]
call fcn.0052f7e0
add esp, 4
mov dword [ebp - 0x80], 0x80004005
mov esi, 0x80004005
jmp 0x490c29
mov eax, dword [ebp - 0x90]
xor edx, edx
div dword [ebp - 0xa4]
mov dword [ebp - 0xb8], eax
test eax, eax
jle 0x490bde
mov esi, dword [ebp - 0x94]
mov ebx, dword [ebp - 0xa8]
mov edi, dword [ebp - 0xa4]
mov dword [ebp - 0x8c], eax
nop dword [eax + eax]
push edi
push esi
push ebx
call fcn.005e1ae0
add ebx, dword [ebp - 0x9c]
add esp, 0xc
add esi, edi
sub dword [ebp - 0x8c], 1
jne 0x490bb0
mov esi, dword [ebp - 0xac]
mov edi, dword [ebp - 0xb0]
mov ebx, dword [ebp - 0xb4]
push dword [ebp - 0x94]
call fcn.0052f7e0
mov ecx, dword [ebp - 0xb8]
add esp, 4
add dword [edi + 0x504], ecx
add dword [edi + 0x64], ecx
mov eax, dword [ebp - 0x9c]
imul eax, ecx
mov ecx, dword [ebp - 0x98]
mov dword [ecx], eax
cmp byte [edi + 0x10], 0
je 0x490c26
cmp dword [ebp - 0xa0], 0
je 0x490c26
mov esi, 0x80004005
mov dword [ebx], 0xf
mov dword [ebp - 0x80], esi
lea ecx, [ebp - 0x88]
call fcn.004204d2
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052bbde
mov esp, ebp
pop ebp
ret 0x10