Function at 0x490250
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 0x66e7bb
mov eax, dword fs:[0]
push eax
sub esp, 0x4a4
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 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 0x12fd214
push dword [0x12fa964]
mov dword [ebp - 0x4a0], eax
mov dword [ebp - 0x4a4], edi
call fcn.004203f9
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.005ec65b
mov ebx, eax
mov dword [ebp - 0x4ac], 0
add esp, 4
test ebx, ebx
jne 0x490313
mov dword [edi], 8
mov edi, 0x80004005
mov dword [ebp - 0x490], 0x80004005
jmp 0x4906dc
push dword [ebp - 0x4a8]
push 0
push ebx
call fcn.005e1980
mov ecx, dword [esi + 0x40]
add esp, 0xc
mov dword [esi + 0x500], 0
call fcn.00499340
mov edi, eax
test edi, edi
js 0x490676
cmp byte [esi + 0x11], 0
jne 0x49040b
cmp edi, 1
je 0x49040b
mov ecx, dword [esi + 0x40]
lea eax, [ebp - 0x4ac]
push eax
push dword [ebp - 0x4a8]
push ebx
call fcn.00499fd0
mov edi, eax
test edi, edi
js 0x490676
cmp byte [esi + 0x11], 0
jne 0x49040b
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 + 0x50]
mov ecx, dword [ebp - 0x4a0]
lea eax, [esi + 0xe]
push eax
mov edx, dword [ecx]
call dword [edx + 0x54]
mov ecx, dword [ebp - 0x4a0]
lea eax, [esi + 0xf]
push eax
mov edx, dword [ecx]
call dword [edx + 0x58]
mov ecx, dword [ebp - 0x4a0]
lea eax, [esi + 9]
push eax
mov edx, dword [ecx]
call dword [edx + 0x5c]
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.0042077f
mov ecx, dword [esi + 0x40]
lea eax, [ebp - 0x499]
add esp, 0x1c
mov byte [ebp - 0x499], 0
push 0
push eax
call fcn.00498770
mov edi, eax
test edi, edi
js 0x490676
cmp byte [esi + 0x11], 0
jne 0x490676
cmp edi, 1
je 0x490676
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.00499f00
test eax, eax
js 0x490473
mov ecx, dword [ebp - 0x4ac]
test ecx, ecx
je 0x490473
cmp word [esi + 0xbc], 1
je 0x490468
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0x28]
jne 0x490468
mov eax, dword [esi + 0xa8]
cmp eax, dword [esi + 0x2c]
je 0x490473
push dword [esi + 0x2c]
push ecx
push ecx
push ebx
call fcn.0048ffd0
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 0x49049b
test al, 0x10
jne 0x4904aa
push 0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x218]
push eax
push 0
push 0x84bd9c
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x4904eb
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 0x490648
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 0x49062b
cmp eax, 0xffffffff
je 0x49062b
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 0x490588
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.0042077f
add esp, 0x14
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x49065c
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.005e5006
mov eax, dword [ebp - 0x4ac]
add esp, 4
cmp eax, dword [ebp - 0x4a0]
je 0x4905f0
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.0042077f
add esp, 0x14
mov dword [ebp - 0x490], 0x80004005
mov edi, 0x80004005
jmp 0x4906dc
cmp word [ebp - 0x218], 0
jne 0x4905fe
xor ecx, ecx
jmp 0x490616
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x490607
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0x84]
call fcn.0041c91b
jmp 0x49067f
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.0042077f
add esp, 0x14
push ebx
call fcn.005e5006
add esp, 4
mov dword [ebp - 0x490], 0x80004005
mov edi, 0x80004005
jmp 0x4906dc
push ebx
call fcn.005e5006
add esp, 4
cmp byte [esi + 0x11], 0
jne 0x49069d
cmp edi, 1
je 0x49069d
test edi, edi
jns 0x4906ce
mov eax, dword [ebp - 0x4a4]
push eax
push edi
call fcn.0048cfa0
jmp 0x4906ce
push str.A_cancel_has_been_received___from_user
push 0x110e
lea eax, [ebp - 0x498]
push 0x200
push eax
call fcn.0042077f
mov eax, dword [ebp - 0x4a4]
add esp, 0x10
mov ecx, esi
mov dword [eax], 0x10
call fcn.0048ead0
mov ecx, dword [esi + 0x40]
call fcn.00493a90
mov dword [ebp - 0x490], edi
lea ecx, [ebp - 0x498]
mov dword [ebp - 4], 0xffffffff
call fcn.004204d2
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.0052bbde
mov esp, ebp
pop ebp
ret 8