Function at 0x40d335
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x48fd54]
test eax, eax
push edi
jne 0x40d350
push 3
pop eax
jmp 0x40d896
push ebx
push esi
push str.DeviceImDiskCtl
lea ecx, [ebp - 0x10]
push ecx
call eax
mov esi, 0xc0000000
push esi
lea eax, [ebp - 0x10]
push eax
call dword [0x48fe90]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40d3a6
call ebx
cmp eax, 2
jne 0x40d85d
push str.ImDisk
call dword [0x48fea0]
test eax, eax
je 0x40d86c
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
lea eax, [ebp - 0x10]
push eax
call dword [0x48fe90]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40d375
push eax
call fcn.0040d29f
test eax, eax
pop ecx
jne 0x40d3c1
push 5
pop esi
jmp 0x40d5ad
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 - 8], eax
mov dword [ebp - 0x18], 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 0x40d4ed
push str.DeviceAWEAlloc
lea eax, [ebp - 0x20]
push eax
call dword [0x48fd54]
jmp 0x40d432
call ebx
cmp eax, 2
jne 0x40d449
push str.AWEAlloc
call dword [0x48fea0]
test eax, eax
je 0x40d4a2
push str.AWEAlloc_driver_was_loaded_into_the_kernel.
call fcn.0046759b
pop ecx
lea eax, [ebp - 0x20]
push esi
push eax
call dword [0x48fe90]
cmp eax, 0xffffffff
je 0x40d411
push eax
call dword [0x48fd84]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebp + 0x18], esi
jne 0x40d590
push esi
lea eax, [ebp - 0x10]
push eax
call dword [0x48fd54]
movzx eax, word [ebp - 0x10]
add eax, 0x38
push eax
lea ecx, [ebp - 0x14]
call fcn.0042add7
mov ebx, dword [ebp - 0x14]
cmp ebx, esi
jne 0x40d6ab
push str.Memory_allocation_error
call fcn.004674ee
pop ecx
push dword [ebp - 4]
call edi
lea eax, [ebp - 0x10]
push eax
call dword [0x48fd80]
or esi, 0xffffffff
jmp 0x40d851
call ebx
cmp eax, 2
jb 0x40d4e6
cmp eax, 3
jbe 0x40d4d4
cmp eax, 0x422
je 0x40d4c8
cmp eax, 0x424
jne 0x40d4e6
push 0x48e840
push str.The_AWEAlloc_driver_is_not_installed._r_nPlease_re_install_ImDisk._r_n
jmp 0x40d4de
push 0x48e840
push str.The_AWEAlloc_driver_is_disabled._r_n
jmp 0x40d4de
push 0x48e840
push str.Cannot_load_AWEAlloc_driver._r_nPlease_re_install_ImDisk._r_n
call fcn.0046747d
pop ecx
jmp 0x40d564
push str.Error_loading_AWEAlloc_driver:
jmp 0x40d55f
xor ecx, ecx
cmp dword [ebp - 8], 0x2000
sete cl
or ecx, eax
xor eax, eax
cmp edi, 0x300
sete al
test eax, ecx
je 0x40d449
mov esi, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
push 0
mov edi, str..PIPEImDskSvc
push edi
call esi
test eax, eax
jne 0x40d449
call ebx
cmp eax, 2
jne 0x40d449
push str.ImDskSvc
call dword [0x48fea0]
test eax, eax
jne 0x40d582
call ebx
cmp eax, 2
jb 0x40d55a
cmp eax, 3
jbe 0x40d565
cmp eax, 0x422
je 0x40d565
cmp eax, 0x424
je 0x40d565
push str.Error_starting_ImDisk_Virtual_Disk_Driver_Helper_Service:
call fcn.0040d24e
pop ecx
push 7
jmp 0x40d3bb
call ebx
cmp eax, 2
jne 0x40d449
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push edi
call esi
test eax, eax
je 0x40d56c
jmp 0x40d449
cmp dword [ebp + 0x1c], esi
je 0x40d5bb
push dword [ebp + 0x18]
lea eax, [ebp - 0x10]
push eax
call dword [0x48fd7c]
test eax, eax
jne 0x40d465
or esi, 0xffffffff
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40d859
xor eax, eax
cmp dword [ebp - 8], 0x3000
sete al
xor ecx, ecx
cmp dword [ebp - 0x18], 0x300
sete cl
test ecx, eax
je 0x40d683
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 esi, eax
call ebx
dec eax
dec eax
neg eax
sbb eax, eax
xor ecx, ecx
inc eax
cmp esi, 0xffffffff
sete cl
mov ebx, str.BaseNamedObjects_
test ecx, eax
jne 0x40d615
mov ebx, str.BaseNamedObjectsGlobal_
cmp esi, 0xffffffff
je 0x40d61d
push esi
call edi
push ebx
call fcn.00467467
push dword [ebp + 0x18]
mov esi, eax
call fcn.00467467
pop ecx
pop ecx
lea eax, [esi + eax + 2]
push eax
lea ecx, [ebp - 8]
call fcn.0042aed6
mov esi, dword [ebp - 8]
test esi, esi
jne 0x40d652
push dword [ebp - 4]
call edi
lea ecx, [ebp - 8]
call fcn.0042602e
jmp 0x40d6a3
push ebx
push esi
call fcn.0046744b
push dword [ebp + 0x18]
push esi
call fcn.00467421
add esp, 0x10
push esi
lea eax, [ebp - 0x10]
push eax
call dword [0x48fd7c]
test eax, eax
je 0x40d643
lea ecx, [ebp - 8]
call fcn.0042602e
xor esi, esi
jmp 0x40d465
push esi
push esi
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x18]
call dword [0x48fd78]
test eax, eax
jne 0x40d465
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x40d894
movzx eax, word [ebp - 0x10]
add eax, 0x38
push eax
push 0
push ebx
call fcn.00466780
mov esi, dword [ebp + 0x20]
add esp, 0xc
test esi, esi
je 0x40d70d
push esi
call fcn.00467467
cmp eax, 2
pop ecx
jne 0x40d6dd
xor eax, eax
cmp word [esi + 2], 0x3a
sete al
jmp 0x40d702
push esi
call fcn.00467467
cmp eax, 3
pop ecx
jne 0x40d700
lea eax, [esi + 2]
push 0x47c650
push eax
call fcn.004673ef
neg eax
pop ecx
sbb eax, eax
pop ecx
inc eax
jmp 0x40d702
xor eax, eax
test eax, eax
je 0x40d70d
mov ax, word [esi]
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 - 0x10]
mov word [ebx + 0x2e], ax
cmp word [ebp - 0x10], 0
je 0x40d760
movzx eax, word [ebp - 0x10]
push eax
push dword [ebp - 0xc]
lea eax, [ebx + 0x30]
push eax
call fcn.004669c0
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
call dword [0x48fd80]
movzx eax, word [ebx + 0x2e]
xor esi, esi
push esi
lea ecx, [ebp - 0x24]
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 0x40d7a0
push str.Error_creating_virtual_disk:
call fcn.0040d24e
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 3
pop esi
jmp 0x40d851
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 0x40d851
push dword [ebx]
lea eax, [ebp - 0x22c]
push str.DeviceImDisk_u
push 0x103
push eax
call fcn.0046737f
add esp, 0x10
cmp word [ebx + 0x2c], si
lea eax, [ebp - 0x22c]
push eax
mov word [ebp - 0x26], si
push edi
jne 0x40d83a
call dword [0x48fea4]
test eax, eax
jne 0x40d851
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec eax
je 0x40d835
sub eax, 0x56
je 0x40d835
sub eax, 0x3a
je 0x40d835
sub eax, 0x7a
je 0x40d835
sub eax, 0x101b
je 0x40d835
dec eax
dec eax
je 0x40d822
push str.Error_creating_mount_point:
call fcn.0040d24e
pop ecx
jmp 0x40d835
push edi
push str.Invalid_mount_point_path:__1_ws__n
push 0x48e840
call fcn.0040d1f2
add esp, 0xc
mov word [edi], si
jmp 0x40d851
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
jne 0x40d851
push str.Error_creating_mount_point:
call fcn.0040d24e
pop ecx
lea ecx, [ebp - 0x14]
call fcn.0042602e
mov eax, esi
jmp 0x40d894
push str.Error_controlling_the_ImDisk_Virtual_Disk_Driver:
call fcn.0040d24e
pop ecx
push 6
jmp 0x40d893
call ebx
cmp eax, 2
jb 0x40d886
cmp eax, 3
jbe 0x40d891
cmp eax, 0x422
je 0x40d891
cmp eax, 0x424
je 0x40d891
push str.Error_loading_ImDisk_Virtual_Disk_Driver:
call fcn.0040d24e
pop ecx
push 4
pop eax
pop esi
pop ebx
pop edi
leave
ret