Function at 0x499340
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6589eb
mov eax, dword fs:[0]
push eax
sub esp, 0x84
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 ebx, ecx
push 0
push 0
push 0xac6
push str.HPXS::CeSCLDevice::StartScan
push 0x12fd24c
push dword [0x12fa964]
lea ecx, [ebp - 0x88]
call fcn.004203f9
mov dword [ebp - 4], 0
cmp byte [ebx + 0xf], 0
je 0x4993d3
cmp byte [ebx + 0xa], 0
je 0x4993d3
push str.StartScan:_we_are_in_an_app_ADF_scan_job_and_we_detected_a_cancel_in_stopscan__report_it_now
push 0xaca
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x10
mov dword [ebp - 0x80], 1
mov esi, 1
jmp 0x49954d
cmp dword [ebx + 0x114], 0
jne 0x499436
push str.StartScan:_m_pIScanJob__NULL
push 0xacf
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x10
mov ecx, ebx
call fcn.004981f0
mov dword [ebp - 0x80], eax
test eax, eax
js 0x4994da
cmp dword [ebx + 0x114], 0
je 0x4994da
push str.HPXS::CeSCLDevice::StartScan
push str._s:_CreateScanJob_succeeded
push 0xad8
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x14
mov ecx, ebx
call fcn.004989c0
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov edx, dword [ebx + 0x114]
mov edi, eax
mov ecx, dword [edx + 4]
add edx, 4
mov ecx, dword [ecx + 8]
add ecx, edx
mov edx, dword [ecx]
call dword [edx + 0xc4]
mov dword [ebp - 0x80], eax
call esi
push dword [ebp - 0x80]
sub eax, edi
push eax
lea ecx, [eax + 0x1f4]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push str.TIME2A_CeSCLDevice::StartScan_m_pIScanJob__StartScan_took__ld_seconds__ld__HR_0x_08X__r_n
push 0xae2
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
mov eax, dword [ebp - 0x80]
add esp, 0x1c
test eax, eax
jns 0x4995c8
cmp eax, 0x83e8ebfb
jne 0x4994ff
push str.HPXS::CeSCLDevice::StartScan
push str._s:_StartScan_returned_E_SCAN_CANCELLED
push 0xae8
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
mov eax, 1
add esp, 0x14
mov dword [ebp - 0x80], eax
jmp 0x499529
push str.HPXS::CeSCLDevice::StartScan
push str._s:_CreateScanJob_failed
push 0xad3
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.0042077f
add esp, 0x14
jmp 0x49954a
cmp eax, 0x83e8ebfc
jne 0x499576
push str.HPXS::CeSCLDevice::StartScan
push str._s:_E_SCAN_CANCELLED
push 0xaed
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x14
mov eax, dword [ebp - 0x80]
push eax
push str.HPXS::CeSCLDevice::StartScan
push str._s:_hr0x_X_n
push 0xb0f
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x18
mov esi, dword [ebp - 0x80]
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
cmp eax, 0x83e8ebff
jne 0x49958e
push str.HPXS::CeSCLDevice::StartScan
push str._s:_E_SCAN_BUSY
push 0xaf1
jmp 0x499515
cmp eax, 0x83e8ebf8
jne 0x4995a9
push str.HPXS::CeSCLDevice::StartScan
push str._s:_E_SCAN_ADF_EMPTY
push 0xaf5
jmp 0x499515
cmp eax, 0x83e8e8c2
jne 0x499529
push str.HPXS::CeSCLDevice::StartScan
push str._s:_E_SM_READ_IO_TIMEOUT
push 0xaf9
jmp 0x499515
mov ecx, dword [ebx + 0x114]
lea esi, [ebx + 0x120]
push esi
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 8]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0x30]
mov eax, dword [esi]
cmp eax, 2
je 0x499612
push eax
push str.HPXS::CeSCLDevice::StartScan
push str._s:_Raw___dont_use_pipe__d
push 0xb01
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x18
jmp 0x499526
push 2
push str.HPXS::CeSCLDevice::StartScan
push str._s:_JPEG___set_up_pipe___d
push 0xb05
lea eax, [ebp - 0x88]
push 0x11
push eax
call fcn.0042077f
add esp, 0x18
cmp byte [ebx + 0xe], 0
jne 0x499526
mov edx, dword [ebx + 0x114]
mov eax, dword [edx + 4]
lea ecx, [edx + 4]
lea edx, [ebp - 0x8c]
push edx
mov eax, dword [eax + 8]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0x50]
push dword [ebp - 0x8c]
mov ecx, ebx
call fcn.00499020
mov dword [ebp - 0x80], eax
jmp 0x499529