Function at 0x489c00
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62a9db
mov eax, dword fs:[0]
push eax
sub esp, 0x4a4
mov eax, dword [0x8d600c]
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 esi, ecx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x498]
mov edi, dword [ebp + 0xc]
push 0
push 0
push 0x10a6
push str.HPXS::CeSCLDevManager::StartScanCompressed
push 0x129b5b8
push dword [0x12992f8]
mov dword [ebp - 0x4a0], eax
mov dword [ebp - 0x4a4], edi
call fcn.0041f881
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x4cc]
imul eax, dword [esi + 0x4c8]
mov dword [esi + 0x30], 0
mov dword [esi + 0x28], 0
add eax, eax
push eax
mov dword [ebp - 0x4a8], eax
call fcn.005c41fb
mov ebx, eax
mov dword [ebp - 0x4ac], 0
add esp, 4
test ebx, ebx
jne 0x489cc3
mov dword [edi], 8
mov edi, 0x80004005
mov dword [ebp - 0x490], 0x80004005
jmp 0x48a08c
push dword [ebp - 0x4a8]
push 0
push ebx
call fcn.005b9760
mov ecx, dword [esi + 0x40]
add esp, 0xc
mov dword [esi + 0x500], 0
call fcn.00492d10
mov edi, eax
test edi, edi
js 0x48a026
cmp byte [esi + 0x11], 0
jne 0x489dbb
cmp edi, 1
je 0x489dbb
mov ecx, dword [esi + 0x40]
lea eax, [ebp - 0x4ac]
push eax
push dword [ebp - 0x4a8]
push ebx
call fcn.004939a0
mov edi, eax
test edi, edi
js 0x48a026
cmp byte [esi + 0x11], 0
jne 0x489dbb
cmp dword [esi + 0x58], 2
mov eax, dword [esi + 0x40]
sete cl
mov byte [eax + 0xe], cl
lea eax, [esi + 0xd]
mov ecx, dword [ebp - 0x4a0]
push eax
mov edx, dword [ecx]
call dword [edx + 0x4c]
mov ecx, dword [ebp - 0x4a0]
lea eax, [esi + 0xe]
push eax
mov edx, dword [ecx]
call dword [edx + 0x50]
mov ecx, dword [ebp - 0x4a0]
lea eax, [esi + 0xf]
push eax
mov edx, dword [ecx]
call dword [edx + 0x54]
mov ecx, dword [ebp - 0x4a0]
lea eax, [esi + 9]
push eax
mov edx, dword [ecx]
call dword [edx + 0x58]
push edi
push dword [ebp - 0x4ac]
lea eax, [ebp - 0x498]
push dword [ebp - 0x4a8]
push str.Finished_m_peSCLDevice__ReadScan__Compressed__lBufSize_d__bytesRead_d_hr0x_08X
push 0x10c4
push 0x200
push eax
call fcn.0041fc07
mov ecx, dword [esi + 0x40]
lea eax, [ebp - 0x499]
add esp, 0x1c
mov byte [ebp - 0x499], 0
push 0
push eax
call fcn.00492140
mov edi, eax
test edi, edi
js 0x48a026
cmp byte [esi + 0x11], 0
jne 0x48a026
cmp edi, 1
je 0x48a026
lea ecx, [esi + 0x30]
push ecx
mov ecx, dword [esi + 0x40]
lea eax, [esi + 0x2c]
push eax
lea eax, [esi + 0x28]
push eax
call fcn.004938d0
test eax, eax
js 0x489e23
mov ecx, dword [ebp - 0x4ac]
test ecx, ecx
je 0x489e23
cmp word [esi + 0xbc], 1
je 0x489e18
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0x28]
jne 0x489e18
mov eax, dword [esi + 0xa8]
cmp eax, dword [esi + 0x2c]
je 0x489e23
push dword [esi + 0x2c]
push ecx
push ecx
push ebx
call fcn.00489980
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x489e4b
test al, 0x10
jne 0x489e5a
push 0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x218]
push eax
push 0
push 0x7fbc04
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x489e9b
mov eax, dword [ebp - 0x4a4]
mov dword [eax], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_create_temp_file_for_compressed_data__lx
push 0x10e7
jmp 0x489ff8
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4a8], eax
test eax, eax
je 0x489fdb
cmp eax, 0xffffffff
je 0x489fdb
push 0
lea ecx, [ebp - 0x4a0]
mov dword [ebp - 0x4a0], 0
push ecx
push dword [ebp - 0x4ac]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x489f38
mov eax, dword [ebp - 0x4a4]
mov dword [eax], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_failed_in_StartScanCompressed____GetLastError__d
push 0x10f9
lea eax, [ebp - 0x498]
push 0x200
push eax
call fcn.0041fc07
add esp, 0x14
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x48a00c
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.005bccb5
mov eax, dword [ebp - 0x4ac]
add esp, 4
cmp eax, dword [ebp - 0x4a0]
je 0x489fa0
mov eax, dword [ebp - 0x4a4]
mov dword [eax], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_Writing_compressed_file__GetLastError__d
push 0x1103
lea eax, [ebp - 0x498]
push 0x200
push eax
call fcn.0041fc07
add esp, 0x14
mov dword [ebp - 0x490], 0x80004005
mov edi, 0x80004005
jmp 0x48a08c
cmp word [ebp - 0x218], 0
jne 0x489fae
xor ecx, ecx
jmp 0x489fc6
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x489fb7
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0x84]
call fcn.0041bf96
jmp 0x48a02f
mov eax, dword [ebp - 0x4a4]
mov dword [eax], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_create_temp_file_for_compressed_data__lx
push 0x10f0
lea eax, [ebp - 0x498]
push 0x200
push eax
call fcn.0041fc07
add esp, 0x14
push ebx
call fcn.005bccb5
add esp, 4
mov dword [ebp - 0x490], 0x80004005
mov edi, 0x80004005
jmp 0x48a08c
push ebx
call fcn.005bccb5
add esp, 4
cmp byte [esi + 0x11], 0
jne 0x48a04d
cmp edi, 1
je 0x48a04d
test edi, edi
jns 0x48a07e
mov eax, dword [ebp - 0x4a4]
push eax
push edi
call fcn.00486930
jmp 0x48a07e
push str.A_cancel_has_been_received___from_user
push 0x110e
lea eax, [ebp - 0x498]
push 0x200
push eax
call fcn.0041fc07
mov eax, dword [ebp - 0x4a4]
add esp, 0x10
mov ecx, esi
mov dword [eax], 0x10
call fcn.00488480
mov ecx, dword [esi + 0x40]
call fcn.0048d450
mov dword [ebp - 0x490], edi
lea ecx, [ebp - 0x498]
mov dword [ebp - 4], 0xffffffff
call fcn.0041f95a
mov eax, edi
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.00525a3e
mov esp, ebp
pop ebp
ret 8