Function at 0x1006740
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
push esi
push edi
push 0x10051b8
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov esi, dword [sym.imp.imdisk.cpl__ImDiskOpenDeviceByName_8]
push 0xc0000000
lea ecx, [ebp - 0xc]
push ecx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 4], ebx
jne 0x10067cb
mov edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 2
jne 0x1007009
push 0x10051a8
call dword [sym.imp.imdisk.cpl__ImDiskStartService_4]
test eax, eax
je 0x1007027
push 0
call edi
push 0x100516c
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
push 0xc0000000
lea edx, [ebp - 0xc]
push edx
call esi
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 4], eax
je 0x1006780
push ebx
call fcn.010062b0
test eax, eax
jne 0x10067f0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 5
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov eax, dword [ebp + 0x14]
xor ecx, ecx
mov ebx, eax
and eax, 0xf000
and ebx, 0xf00
cmp eax, 0x1000
sete cl
xor edx, edx
cmp ebx, 0x100
sete dl
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ebx
mov eax, ecx
xor ecx, ecx
test ebx, ebx
sete cl
or edx, ecx
test eax, edx
je 0x1006980
push 0x1005148
lea edx, [ebp - 0x18]
push edx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0xc0000000
lea eax, [ebp - 0x18]
push eax
call esi
cmp eax, 0xffffffff
jne 0x100688b
mov edi, dword [sym.imp.msvcrt.dll_puts]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1006a0c
push 0x1005134
call dword [sym.imp.imdisk.cpl__ImDiskStartService_4]
test eax, eax
je 0x1006897
push 0x1005108
call edi
add esp, 4
push 0xc0000000
lea ecx, [ebp - 0x18]
push ecx
call esi
cmp eax, 0xffffffff
je 0x1006853
push eax
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x1006a0c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x422
ja 0x10068d7
je 0x10068c4
add eax, 0xfffffffe
cmp eax, 1
ja 0x10068de
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x10050d0
jmp 0x1006959
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x10050ac
jmp 0x1006959
cmp eax, 0x424
je 0x100694a
push 0
push 0
lea ecx, [ebp + 0x20]
push ecx
push 0
call esi
push eax
push 0
push 0x13ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x10068ff
mov dword [ebp + 0x20], eax
mov edx, dword [ebp + 0x20]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edx
push 0x100506c
add eax, 0x40
push 0x1004590
push eax
call fcn.010061c0
mov eax, dword [ebp + 0x20]
add esp, 0x10
test eax, eax
je 0x1006962
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 7
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1005028
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 7
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
xor ecx, ecx
cmp dword [ebp - 0x10], 0x2000
sete cl
xor edx, edx
or ecx, eax
cmp ebx, 0x300
sete dl
test edx, ecx
je 0x1006a0c
mov esi, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
push 0
push 0x1005000
call esi
test eax, eax
jne 0x1006a0c
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 2
jne 0x1006a09
push 0x1004fec
call dword [sym.imp.imdisk.cpl__ImDiskStartService_4]
test eax, eax
je 0x1006a98
push 0
push 0x1005000
call esi
test eax, eax
jne 0x10069fb
lea ecx, [ecx]
call ebx
cmp eax, 2
jne 0x10069fb
push 0xc8
call edi
push 0
push 0x1005000
call esi
test eax, eax
je 0x10069e0
push 0x1004fb0
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp + 0x18]
test esi, esi
jne 0x1006b31
push esi
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
movzx eax, word [ebp - 0xc]
add eax, 0x38
call fcn.01009980
mov esi, esp
test esi, esi
jne 0x1006a43
push esp
push esi
push 1
push 0xc0000017
call dword [sym.imp.KERNEL32.dll_RaiseException]
movzx edx, word [ebp - 0xc]
add edx, 0x38
push edx
push 0
push esi
call sub.msvcrt.dll_memset
push 0x1004f9c
call dword [sym.imp.msvcrt.dll_puts]
mov edi, dword [ebp + 0x20]
add esp, 0x10
test edi, edi
je 0x1006cff
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006a71
sub eax, edx
sar eax, 1
cmp eax, 2
jne 0x1006c94
xor eax, eax
cmp word [edi + 2], 0x3a
sete al
jmp 0x1006cf4
call ebx
cmp eax, 0x422
ja 0x1006acc
je 0x1006abb
add eax, 0xfffffffe
cmp eax, 1
ja 0x1006ad3
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1004f48
jmp 0x1006b0a
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004f0c
jmp 0x1006b0a
cmp eax, 0x424
je 0x1006afb
push 0x1004e98
call fcn.01006240
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 7
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004e38
call dword [sym.imp.msvcrt.dll_fputs]
mov eax, dword [ebp - 4]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 7
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
cmp dword [ebp + 0x1c], 0
je 0x1006b7e
push esi
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.ntdll.dll_RtlCreateUnicodeString]
test al, al
jne 0x1006a22
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004e1c
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
or eax, 0xffffffff
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
xor edx, edx
cmp dword [ebp - 0x10], 0x3000
push 0
sete dl
xor eax, eax
cmp ebx, 0x300
sete al
test eax, edx
je 0x1006c82
push 0x80
push 3
push 0
push 1
push 0
push 0x1004e04
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 2
sete cl
xor edx, edx
cmp esi, 0xffffffff
sete dl
mov edi, 0x1004ddc
test edx, ecx
jne 0x1006bdd
mov edi, 0x1004da8
cmp esi, 0xffffffff
je 0x1006be9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006bf0
sub eax, edx
sar eax, 1
mov edx, eax
mov eax, dword [ebp + 0x18]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006c07
sub eax, esi
sar eax, 1
add eax, edx
lea eax, [eax + eax + 1]
call fcn.01009980
mov ebx, esp
test ebx, ebx
je 0x1006b4a
mov edx, ebx
mov eax, edi
sub edx, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x1006c31
mov eax, dword [ebp + 0x18]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006c45
mov edi, ebx
sub eax, edx
add edi, 0xfffffffe
jmp 0x1006c60
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x1006c60
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
jmp 0x1006b38
push 0
lea edx, [ebp - 0xc]
push edx
push esi
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
jmp 0x1006b42
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006ca0
sub eax, edx
sar eax, 1
cmp eax, 3
jne 0x1006cff
mov ecx, 0x1004da0
lea eax, [edi + 2]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1006ce6
test dx, dx
je 0x1006ce2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1006ce6
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006cc0
xor eax, eax
jmp 0x1006ceb
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
je 0x1006cff
mov dx, word [edi]
mov word [esi + 0x2c], dx
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov dword [esi + 8], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xc], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x10], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0x14], edx
mov ecx, dword [eax + 0x10]
mov dword [esi + 0x18], ecx
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x1c], edx
mov ecx, dword [eax]
mov dword [esi + 0x20], ecx
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x24], edx
mov dword [esi + 0x28], eax
mov cx, word [ebp - 0xc]
mov word [esi + 0x2e], cx
mov ax, word [ebp - 0xc]
test ax, ax
je 0x1006d6f
movzx edx, ax
mov eax, dword [ebp - 8]
push edx
push eax
lea ecx, [esi + 0x30]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
movzx eax, word [esi + 0x2e]
mov ebx, dword [ebp - 4]
push 0
lea ecx, [ebp - 0x1c]
push ecx
add eax, 0x38
push eax
push esi
push eax
push esi
push 0x8372e004
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1006db8
push 0x1004d64
call fcn.01006240
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 3
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi]
mov dword [edi], edx
mov eax, dword [esi]
push eax
push 0x1004d40
lea ecx, [ebp - 0x224]
push 0x103
push ecx
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
cmp dword [ebp + 0x20], 0
mov word [ebp - 0x1e], 0
je 0x1006f55
cmp word [esi + 0x2c], 0
jne 0x1006f11
mov eax, dword [ebp + 0x20]
lea edx, [ebp - 0x224]
push edx
push eax
call dword [sym.imp.imdisk.cpl__ImDiskCreateMountPoint_8]
test eax, eax
jne 0x1006f55
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x10b
mov ebx, dword [sym.imp.msvcrt.dll_fputs]
ja 0x1006e66
je 0x1006e3e
sub eax, 1
je 0x1006ee0
sub eax, 0x56
je 0x1006e52
sub eax, 0x3a
jne 0x1006e72
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004d08
jmp 0x1006eef
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004c78
jmp 0x1006eef
sub eax, 0x1126
je 0x1006ee0
sub eax, 2
je 0x1006ec3
push 0
push 0
lea eax, [ebp + 0x14]
push eax
push 0
call edi
push eax
push 0
push 0x13ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x1006e93
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [sym.imp.msvcrt.dll__iob]
push ecx
push 0x1004c3c
add edx, 0x40
push 0x1004590
push edx
call fcn.010061c0
mov eax, dword [ebp + 0x14]
add esp, 0x10
test eax, eax
je 0x1006ef4
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1006ef4
mov eax, dword [ebp + 0x20]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push eax
add ecx, 0x40
push 0x1004c18
push ecx
call fcn.010061c0
add esp, 0xc
jmp 0x1006ef4
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004be4
call ebx
add esp, 8
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1004bac
call ebx
mov ecx, dword [ebp + 0x20]
add esp, 8
mov word [ecx], 0
jmp 0x1006f55
mov edi, dword [sym.imp.KERNEL32.dll_GetVersion]
call edi
mov ebx, eax
shr ebx, 8
and ebx, 0xff
call edi
xor edx, edx
mov dh, al
or edx, ebx
cmp edx, 0x501
jae 0x1006f55
mov ecx, dword [ebp + 0x20]
lea eax, [ebp - 0x224]
push eax
push ecx
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
jne 0x1006f55
push 0x1004c3c
call fcn.01006240
cmp dword [ebp + 0x24], 0
je 0x1006f71
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
push 0x1004ba8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 8
jmp 0x1006fa7
mov ecx, dword [ebp + 0x18]
test ecx, ecx
jne 0x1006f7d
mov ecx, 0x1004b88
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x1006f89
mov eax, 0x1004b6c
push ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edx
add eax, 0x20
push 0x1004b44
push eax
call fcn.010061c0
add esp, 0x14
cmp dword [ebp + 0x2c], 0
je 0x1006fd0
push 0x1004b28
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
push esi
call dword [sym.imp.imdisk.cpl__ImDiskSaveRegistrySettings_4]
test eax, eax
jne 0x1006fd0
push 0x1004afc
call fcn.01006240
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x1006ff8
movzx ecx, word [esi + 0x2c]
push eax
push ecx
lea edx, [ebp - 0x224]
push edx
call fcn.01006450
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
xor eax, eax
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push 0x1004a98
call fcn.01006240
mov eax, 6
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
call ebx
cmp eax, 0x422
ja 0x100705b
je 0x100704a
add eax, 0xfffffffe
cmp eax, 1
ja 0x1007062
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1004a64
jmp 0x100708f
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004a34
jmp 0x100708f
cmp eax, 0x424
je 0x1007080
push 0x10049e0
call fcn.01006240
mov eax, 4
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004990
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
mov eax, 4
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28