Function at 0x10068b0
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
push esi
push edi
push 0x10052e8
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
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.msvcrt.dll_puts]
mov dword [ebp - 4], eax
jne 0x1006935
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x100716d
push 0x10052d8
call dword [sym.imp.imdisk.cpl__ImDiskStartService_4]
test eax, eax
je 0x100718b
push 0
call ebx
push 0x100529c
call edi
add esp, 4
push 0xc0000000
lea edx, [ebp - 0xc]
push edx
call esi
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x10068f2
mov eax, dword [ebp - 4]
push eax
call fcn.01006420
test eax, eax
jne 0x1006960
mov ecx, dword [ebp - 4]
push ecx
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 ecx, dword [ebp + 0x14]
mov eax, ecx
and eax, 0xf00
cmp eax, 0x100
mov dword [ebp - 0x10], eax
je 0x100697c
test eax, eax
jne 0x1006b8a
and ecx, 0xf000
cmp ecx, 0x1000
jne 0x1006b8a
push 0x1005278
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 0x10069e8
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10069ef
push 0x1005264
call dword [sym.imp.imdisk.cpl__ImDiskStartService_4]
test eax, eax
je 0x1006aa1
push 0x1005238
call edi
add esp, 4
push 0xc0000000
lea ecx, [ebp - 0x18]
push ecx
call esi
cmp eax, 0xffffffff
je 0x10069b0
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x1006cbc
push eax
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
movzx eax, word [ebp - 0xc]
add eax, 0x38
call fcn.01009af0
mov esi, esp
test esi, esi
jne 0x1006a26
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 0x1005224
call dword [sym.imp.msvcrt.dll_puts]
mov eax, dword [ebp + 0x20]
add esp, 0x10
test eax, eax
je 0x1006e63
movzx ebx, word [eax]
test bx, bx
je 0x1006e63
lea edi, [eax + 2]
mov ecx, 0x1005220
mov eax, edi
jmp 0x1006a70
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1006e1c
test dx, dx
je 0x1006a9a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1006e1c
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006a70
xor eax, eax
jmp 0x1006e21
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x422
ja 0x1006ae1
je 0x1006ace
add eax, 0xfffffffe
cmp eax, 1
ja 0x1006ae8
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x10051e8
jmp 0x1006b63
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x10051c4
jmp 0x1006b63
cmp eax, 0x424
je 0x1006b54
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 0x1006b09
mov dword [ebp + 0x20], eax
mov edx, dword [ebp + 0x20]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edx
push 0x1005184
add eax, 0x40
push 0x10046c0
push eax
call fcn.01006330
mov eax, dword [ebp + 0x20]
add esp, 0x10
test eax, eax
je 0x1006b6c
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 0x1005140
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
cmp eax, 0x300
jne 0x10069ef
mov eax, dword [ebp + 0x14]
and eax, 0xf000
cmp eax, 0x2000
je 0x1006baf
cmp eax, 0x1000
jne 0x10069ef
mov esi, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
push 0
push 0x100511c
call esi
test eax, eax
jne 0x10069ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10069ef
push 0x1005108
call dword [sym.imp.imdisk.cpl__ImDiskStartService_4]
test eax, eax
je 0x1006c1f
push 0
push 0x100511c
call esi
test eax, eax
jne 0x1006c10
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1006c10
push 0xc8
call ebx
push 0
push 0x100511c
call esi
test eax, eax
je 0x1006bf1
push 0x10050cc
call edi
add esp, 4
jmp 0x10069ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
ja 0x1006c57
je 0x1006c46
add eax, 0xfffffffe
cmp eax, 1
ja 0x1006c5e
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1005078
jmp 0x1006c95
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x100503c
jmp 0x1006c95
cmp eax, 0x424
je 0x1006c86
push 0x1004fc8
call fcn.010063b0
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 0x1004f68
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 0x1006d09
push eax
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.ntdll.dll_RtlCreateUnicodeString]
test al, al
jne 0x1006a05
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 0x1004f4c
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
cmp dword [ebp - 0x10], 0x300
jne 0x1006e08
mov edx, dword [ebp + 0x14]
and edx, 0xf000
cmp edx, 0x3000
jne 0x1006e08
push 0
push 0x80
push 3
push 0
push 1
push 0
push 0x1004f34
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1006d5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1006d5e
mov edi, 0x1004f0c
jmp 0x1006d6f
cmp esi, 0xffffffff
mov edi, 0x1004ed8
je 0x1006d6f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006d74
sub eax, edx
sar eax, 1
mov edx, eax
mov eax, dword [ebp + 0x18]
lea esi, [eax + 2]
jmp 0x1006d90
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006d90
sub eax, esi
sar eax, 1
add eax, edx
lea eax, [eax + eax + 1]
call fcn.01009af0
mov ebx, esp
test ebx, ebx
je 0x1006cd5
mov edx, ebx
mov eax, edi
sub edx, edi
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x1006dc0
mov eax, dword [ebp + 0x18]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006dd4
mov edi, ebx
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x1006de6
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 0x1006cc3
push 0
push 0
lea edx, [ebp - 0xc]
push edx
push eax
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
jmp 0x1006ccd
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1006e5f
mov ecx, 0x1004ed0
mov eax, edi
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1006e56
test dx, dx
je 0x1006e52
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1006e56
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006e30
xor eax, eax
jmp 0x1006e5b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x1006e63
mov word [esi + 0x2c], bx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
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 0x1006ed3
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 edi, 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 edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1006f1c
push 0x1004e94
call fcn.010063b0
push edi
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 edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi]
mov dword [ebx], edx
mov eax, dword [esi]
push eax
push 0x1004e70
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 0x10070b9
cmp word [esi + 0x2c], 0
jne 0x1007075
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 0x10070b9
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x10b
mov ebx, dword [sym.imp.msvcrt.dll_fputs]
ja 0x1006fca
je 0x1006fa2
sub eax, 1
je 0x1007044
sub eax, 0x56
je 0x1006fb6
sub eax, 0x3a
jne 0x1006fd6
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004e38
jmp 0x1007053
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004da8
jmp 0x1007053
sub eax, 0x1126
je 0x1007044
sub eax, 2
je 0x1007027
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 0x1006ff7
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [sym.imp.msvcrt.dll__iob]
push ecx
push 0x1004d6c
add edx, 0x40
push 0x10046c0
push edx
call fcn.01006330
mov eax, dword [ebp + 0x14]
add esp, 0x10
test eax, eax
je 0x1007058
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1007058
mov eax, dword [ebp + 0x20]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push eax
add ecx, 0x40
push 0x1004d48
push ecx
call fcn.01006330
add esp, 0xc
jmp 0x1007058
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004d14
call ebx
add esp, 8
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1004cdc
call ebx
mov ecx, dword [ebp + 0x20]
add esp, 8
mov word [ecx], 0
jmp 0x10070b9
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 0x10070b9
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 0x10070b9
push 0x1004d6c
call fcn.010063b0
cmp dword [ebp + 0x24], 0
je 0x10070d5
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
push 0x1004cd8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 8
jmp 0x100710b
mov ecx, dword [ebp + 0x18]
test ecx, ecx
jne 0x10070e1
mov ecx, 0x1004cb8
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x10070ed
mov eax, 0x1004c9c
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 0x1004c74
push eax
call fcn.01006330
add esp, 0x14
cmp dword [ebp + 0x2c], 0
je 0x1007134
push 0x1004c58
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
push esi
call dword [sym.imp.imdisk.cpl__ImDiskSaveRegistrySettings_4]
test eax, eax
jne 0x1007134
push 0x1004c2c
call fcn.010063b0
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x100715c
movzx ecx, word [esi + 0x2c]
push eax
push ecx
lea edx, [ebp - 0x224]
push edx
call fcn.010065c0
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 0x1004bc8
call fcn.010063b0
mov eax, 6
lea esp, [ebp - 0x230]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
ja 0x10071c3
je 0x10071b2
add eax, 0xfffffffe
cmp eax, 1
ja 0x10071ca
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1004b94
jmp 0x10071f7
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004b64
jmp 0x10071f7
cmp eax, 0x424
je 0x10071e8
push 0x1004b10
call fcn.010063b0
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 0x1004ac0
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