Function at 0x40d742
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
and dword [ebp - 0x1c], 0
push esi
push edi
lea eax, [ebp - 0x1c]
push eax
push 0x496d6c
mov esi, str.NTDLL.DLL
push esi
push str.RtlCreateUnicodeString
call fcn.00427f74
lea eax, [ebp - 0x1c]
push eax
push 0x496d70
push esi
push str.RtlFreeUnicodeString
call fcn.00427f74
mov eax, dword [0x496d44]
add esp, 0x20
test eax, eax
jne 0x40d792
push 3
pop eax
jmp 0x40dd13
push ebx
push str.DeviceImDiskCtl
lea ecx, [ebp - 0xc]
push ecx
call eax
mov esi, 0xc0000000
push esi
lea eax, [ebp - 0xc]
push eax
call dword [0x496e80]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40d7e7
call ebx
cmp eax, 2
jne 0x40dcdb
push str.ImDisk
call dword [0x496e90]
test eax, eax
je 0x40dcea
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
lea eax, [ebp - 0xc]
push eax
call dword [0x496e80]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40d7b6
push eax
call fcn.0040d6ac
test eax, eax
pop ecx
jne 0x40d802
push 5
pop esi
jmp 0x40da11
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 0x14]
xor ecx, ecx
and eax, 0xf000
and edi, 0xf00
cmp eax, 0x1000
sete cl
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edi
mov eax, ecx
xor ecx, ecx
cmp edi, 0x100
sete cl
xor edx, edx
test edi, edi
sete dl
or ecx, edx
test eax, ecx
je 0x40d951
push str.DeviceAWEAlloc
lea eax, [ebp - 0x24]
push eax
call dword [0x496d44]
jmp 0x40d877
call ebx
cmp eax, 2
jne 0x40d8a9
push str.AWEAlloc
call dword [0x496e90]
test eax, eax
je 0x40d906
push str.AWEAlloc_driver_was_loaded_into_the_kernel.
call fcn.0046d2dc
pop ecx
lea eax, [ebp - 0x24]
push esi
push eax
call dword [0x496e80]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d852
push 0
push 0x496d74
push str.NTDLL.DLL
push str.NtClose
call fcn.00427f74
add esp, 0x10
push edi
call dword [0x496d74]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
xor edi, edi
cmp dword [ebp + 0x18], edi
jne 0x40d9f4
push edi
lea eax, [ebp - 0xc]
push eax
call dword [0x496d44]
movzx eax, word [ebp - 0xc]
add eax, 0x38
push eax
lea ecx, [ebp - 0x18]
call fcn.0042c29e
mov ebx, dword [ebp - 0x18]
cmp ebx, edi
jne 0x40db30
push str.Memory_allocation_error
call fcn.0046d22f
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0xc]
push eax
call dword [0x496d70]
or esi, 0xffffffff
jmp 0x40dcce
call ebx
cmp eax, 2
jb 0x40d94a
cmp eax, 3
jbe 0x40d938
cmp eax, 0x422
je 0x40d92c
cmp eax, 0x424
jne 0x40d94a
push 0x495830
push str.The_AWEAlloc_driver_is_not_installed._r_nPlease_re_install_ImDisk._r_n
jmp 0x40d942
push 0x495830
push str.The_AWEAlloc_driver_is_disabled._r_n
jmp 0x40d942
push 0x495830
push str.Cannot_load_AWEAlloc_driver._r_nPlease_re_install_ImDisk._r_n
call fcn.0046d1be
pop ecx
jmp 0x40d9c8
push str.Error_loading_AWEAlloc_driver:
jmp 0x40d9c3
xor ecx, ecx
cmp dword [ebp - 0x14], 0x2000
sete cl
or ecx, eax
xor eax, eax
cmp edi, 0x300
sete al
test eax, ecx
je 0x40d8a9
mov esi, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
push 0
mov edi, str..PIPEImDskSvc
push edi
call esi
test eax, eax
jne 0x40d8a9
call ebx
cmp eax, 2
jne 0x40d8a9
push str.ImDskSvc
call dword [0x496e90]
test eax, eax
jne 0x40d9e6
call ebx
cmp eax, 2
jb 0x40d9be
cmp eax, 3
jbe 0x40d9c9
cmp eax, 0x422
je 0x40d9c9
cmp eax, 0x424
je 0x40d9c9
push str.Error_starting_ImDisk_Virtual_Disk_Driver_Helper_Service:
call fcn.0040d65b
pop ecx
push 7
jmp 0x40d7fc
call ebx
cmp eax, 2
jne 0x40d8a9
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push edi
call esi
test eax, eax
je 0x40d9d0
jmp 0x40d8a9
cmp dword [ebp + 0x1c], edi
je 0x40da21
push dword [ebp + 0x18]
lea eax, [ebp - 0xc]
push eax
call dword [0x496d6c]
test eax, eax
jne 0x40d8c5
or esi, 0xffffffff
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x40dd12
xor eax, eax
cmp dword [ebp - 0x14], 0x3000
sete al
xor ecx, ecx
cmp dword [ebp - 0x10], 0x300
sete cl
test ecx, eax
je 0x40daf6
xor eax, eax
push eax
push 0x80
push 3
push eax
push 1
push eax
push str._Global
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
call ebx
dec eax
dec eax
neg eax
sbb eax, eax
xor ecx, ecx
inc eax
cmp edi, 0xffffffff
sete cl
mov dword [ebp - 0x14], str.BaseNamedObjects_
test ecx, eax
jne 0x40da7f
mov dword [ebp - 0x14], str.BaseNamedObjectsGlobal_
cmp edi, 0xffffffff
je 0x40da8b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x18]
call esi
push dword [ebp - 0x14]
mov ebx, eax
call esi
lea eax, [eax + ebx + 2]
push eax
lea ecx, [ebp - 0x10]
call fcn.0042c415
mov edi, dword [ebp - 0x10]
test edi, edi
jne 0x40dac4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x10]
call fcn.0042704a
or eax, 0xffffffff
jmp 0x40dd12
push dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
lea eax, [ebp - 0xc]
push eax
call dword [0x496d6c]
test eax, eax
je 0x40daab
lea ecx, [ebp - 0x10]
call fcn.0042704a
xor edi, edi
jmp 0x40d8c5
push edi
push 0x496d68
push str.NTDLL.DLL
push str.RtlDosPathNameToNtPathName_U
call fcn.00427f74
add esp, 0x10
push edi
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x18]
call dword [0x496d68]
test eax, eax
jne 0x40d8c5
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40dabc
movzx eax, word [ebp - 0xc]
add eax, 0x38
push eax
push 0
push ebx
call fcn.0046c4e0
mov edi, dword [ebp + 0x20]
add esp, 0xc
test edi, edi
je 0x40db8a
push edi
call esi
cmp eax, 2
jne 0x40db5e
xor eax, eax
cmp word [edi + 2], 0x3a
sete al
jmp 0x40db7f
push edi
call esi
cmp eax, 3
jne 0x40db7d
lea eax, [edi + 2]
push 0x482740
push eax
call fcn.0046d18c
neg eax
pop ecx
sbb eax, eax
pop ecx
inc eax
jmp 0x40db7f
xor eax, eax
test eax, eax
je 0x40db8a
mov ax, word [edi]
mov word [ebx + 0x2c], ax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov esi, dword [ebp + 0xc]
mov dword [ebx], eax
mov eax, dword [ebp + 0x10]
push 6
lea edi, [ebx + 8]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
mov dword [ebx + 0x20], ecx
mov eax, dword [eax + 4]
mov dword [ebx + 0x24], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x28], eax
mov ax, word [ebp - 0xc]
mov word [ebx + 0x2e], ax
cmp word [ebp - 0xc], 0
je 0x40dbdd
movzx eax, word [ebp - 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebx + 0x30]
push eax
call fcn.0046c720
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
call dword [0x496d70]
movzx eax, word [ebx + 0x2e]
xor esi, esi
push esi
lea ecx, [ebp - 0x28]
push ecx
add eax, 0x38
push eax
push ebx
push eax
push ebx
push 0x8372e004
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40dc1d
push str.Error_creating_virtual_disk:
call fcn.0040d65b
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 3
pop esi
jmp 0x40dcce
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 0x20]
cmp edi, esi
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
je 0x40dcce
push dword [ebx]
lea eax, [ebp - 0x230]
push str.DeviceImDisk_u
push 0x103
push eax
call fcn.0046d11c
add esp, 0x10
cmp word [ebx + 0x2c], si
lea eax, [ebp - 0x230]
push eax
mov word [ebp - 0x2a], si
push edi
jne 0x40dcb7
call dword [0x496e94]
test eax, eax
jne 0x40dcce
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec eax
je 0x40dcb2
sub eax, 0x56
je 0x40dcb2
sub eax, 0x3a
je 0x40dcb2
sub eax, 0x7a
je 0x40dcb2
sub eax, 0x101b
je 0x40dcb2
dec eax
dec eax
je 0x40dc9f
push str.Error_creating_mount_point:
call fcn.0040d65b
pop ecx
jmp 0x40dcb2
push edi
push str.Invalid_mount_point_path:__1_ws__n
push 0x495830
call fcn.0040d5ff
add esp, 0xc
mov word [edi], si
jmp 0x40dcce
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
jne 0x40dcce
push str.Error_creating_mount_point:
call fcn.0040d65b
pop ecx
lea ecx, [ebp - 0x18]
call fcn.0042704a
jmp 0x40da1a
push str.Error_controlling_the_ImDisk_Virtual_Disk_Driver:
call fcn.0040d65b
pop ecx
push 6
jmp 0x40dd11
call ebx
cmp eax, 2
jb 0x40dd04
cmp eax, 3
jbe 0x40dd0f
cmp eax, 0x422
je 0x40dd0f
cmp eax, 0x424
je 0x40dd0f
push str.Error_loading_ImDisk_Virtual_Disk_Driver:
call fcn.0040d65b
pop ecx
push 4
pop eax
pop ebx
pop edi
pop esi
leave
ret