Function at 0x40c42d
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x48ad3c]
push edi
xor edi, edi
cmp eax, edi
jne 0x40c44a
push 3
pop eax
jmp 0x40c8c1
push ebx
push esi
push str.DeviceImDiskCtl
lea ecx, [ebp - 0xc]
push ecx
call eax
mov ebx, 0xc0000000
push ebx
lea eax, [ebp - 0xc]
push eax
call dword [0x48ae84]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40c4af
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
cmp eax, 2
jne 0x40c888
push str.ImDisk
call dword [0x48ae94]
test eax, eax
je 0x40c897
push edi
call dword [sym.imp.KERNEL32.DLL_Sleep]
push ebx
lea eax, [ebp - 0xc]
push eax
call dword [0x48ae84]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40c46f
jmp 0x40c4b5
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [ebp - 4]
call fcn.0040c397
test eax, eax
pop ecx
jne 0x40c4ca
push 5
pop esi
jmp 0x40c5e1
mov ebx, dword [ebp + 0x14]
mov eax, ebx
and ebx, 0xf00
sub ebx, 0x300
and eax, 0xf000
neg ebx
sbb ebx, ebx
xor ecx, ecx
inc ebx
cmp eax, 0x2000
sete cl
xor edx, edx
cmp eax, 0x1000
sete dl
mov dword [ebp - 0x10], eax
or ecx, edx
test ebx, ecx
je 0x40c577
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_WaitNamedPipeW]
push str..PIPEImDskSvc
call edi
test eax, eax
jne 0x40c575
call esi
cmp eax, 2
jne 0x40c575
push str.ImDskSvc
call dword [0x48ae94]
test eax, eax
jne 0x40c568
call esi
cmp eax, 2
jb 0x40c544
cmp eax, 3
jbe 0x40c54f
cmp eax, 0x422
je 0x40c54f
cmp eax, 0x424
je 0x40c54f
push str.Error_starting_ImDisk_Virtual_Disk_Driver_Helper_Service:
call fcn.0040c346
pop ecx
push 7
jmp 0x40c4c4
call esi
cmp eax, 2
jne 0x40c575
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
push 0
push str..PIPEImDskSvc
call edi
test eax, eax
je 0x40c556
xor edi, edi
cmp dword [ebp + 0x18], edi
jne 0x40c5c8
push edi
lea eax, [ebp - 0xc]
push eax
call dword [0x48ad3c]
movzx eax, word [ebp - 0xc]
add eax, 0x38
push eax
lea ecx, [ebp - 0x14]
call fcn.00424576
mov ebx, dword [ebp - 0x14]
cmp ebx, edi
jne 0x40c6d8
push str.Memory_allocation_error
call fcn.004624f7
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xc]
push eax
call dword [0x48ad6c]
or esi, 0xffffffff
jmp 0x40c87c
cmp dword [ebp + 0x1c], edi
je 0x40c5ef
push dword [ebp + 0x18]
lea eax, [ebp - 0xc]
push eax
call dword [0x48ad68]
test eax, eax
jne 0x40c587
or esi, 0xffffffff
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x40c884
xor eax, eax
cmp dword [ebp - 0x10], 0x3000
push edi
sete al
test ebx, eax
je 0x40c6b1
push 0x80
push 3
push edi
push 1
push edi
push str._Global
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
call esi
dec eax
dec eax
neg eax
sbb eax, eax
xor ecx, ecx
inc eax
cmp ebx, 0xffffffff
sete cl
mov edi, str.BaseNamedObjects_
test ecx, eax
jne 0x40c63b
mov edi, str.BaseNamedObjectsGlobal_
cmp ebx, 0xffffffff
je 0x40c647
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edi
call fcn.0046176a
push dword [ebp + 0x18]
mov esi, eax
call fcn.0046176a
pop ecx
pop ecx
lea eax, [esi + eax + 2]
push eax
lea ecx, [ebp - 0x10]
call fcn.0042465d
mov esi, dword [ebp - 0x10]
test esi, esi
jne 0x40c680
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea ecx, [ebp - 0x10]
call fcn.00424686
jmp 0x40c6d0
push edi
push esi
call fcn.004624db
push dword [ebp + 0x18]
push esi
call fcn.004624b1
add esp, 0x10
push esi
lea eax, [ebp - 0xc]
push eax
call dword [0x48ad68]
test eax, eax
je 0x40c66d
lea ecx, [ebp - 0x10]
call fcn.00424686
xor edi, edi
jmp 0x40c587
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x18]
call dword [0x48ad64]
test eax, eax
jne 0x40c587
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
or eax, 0xffffffff
jmp 0x40c8bf
movzx eax, word [ebp - 0xc]
add eax, 0x38
push eax
push edi
push ebx
call fcn.00461780
mov esi, dword [ebp + 0x20]
add esp, 0xc
cmp esi, edi
je 0x40c739
push esi
call fcn.0046176a
cmp eax, 2
pop ecx
jne 0x40c709
xor eax, eax
cmp word [esi + 2], 0x3a
sete al
jmp 0x40c72e
push esi
call fcn.0046176a
cmp eax, 3
pop ecx
jne 0x40c72c
lea eax, [esi + 2]
push 0x4774a0
push eax
call fcn.0046247f
neg eax
pop ecx
sbb eax, eax
pop ecx
inc eax
jmp 0x40c72e
xor eax, eax
cmp eax, edi
je 0x40c739
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 - 0xc]
xor esi, esi
mov word [ebx + 0x2e], ax
cmp word [ebp - 0xc], si
je 0x40c78d
movzx eax, word [ebp - 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebx + 0x30]
push eax
call fcn.00461a50
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
call dword [0x48ad6c]
movzx eax, word [ebx + 0x2e]
push esi
lea ecx, [ebp - 0x18]
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 0x40c7cb
push str.Error_creating_virtual_disk:
call fcn.0040c346
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 3
pop esi
jmp 0x40c87c
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 0x40c87c
push dword [ebx]
lea eax, [ebp - 0x220]
push str.DeviceImDisk_u
push 0x103
push eax
call fcn.0046240f
add esp, 0x10
cmp word [ebx + 0x2c], si
lea eax, [ebp - 0x220]
push eax
mov word [ebp - 0x1a], si
push edi
jne 0x40c865
call dword [0x48ae98]
test eax, eax
jne 0x40c87c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
dec eax
je 0x40c860
sub eax, 0x56
je 0x40c860
sub eax, 0x3a
je 0x40c860
sub eax, 0x7a
je 0x40c860
sub eax, 0x101b
je 0x40c860
dec eax
dec eax
je 0x40c84d
push str.Error_creating_mount_point:
call fcn.0040c346
pop ecx
jmp 0x40c860
push edi
push str.Invalid_mount_point_path:__1_ws__n
push 0x489840
call fcn.0040c2ea
add esp, 0xc
mov word [edi], si
jmp 0x40c87c
push 1
call dword [sym.imp.KERNEL32.DLL_DefineDosDeviceW]
test eax, eax
jne 0x40c87c
push str.Error_creating_mount_point:
call fcn.0040c346
pop ecx
lea ecx, [ebp - 0x14]
call fcn.00424686
mov eax, esi
jmp 0x40c8bf
push str.Error_controlling_the_ImDisk_Virtual_Disk_Driver:
call fcn.0040c346
pop ecx
push 6
jmp 0x40c8be
call esi
cmp eax, 2
jb 0x40c8b1
cmp eax, 3
jbe 0x40c8bc
cmp eax, 0x422
je 0x40c8bc
cmp eax, 0x424
je 0x40c8bc
push str.Error_loading_ImDisk_Virtual_Disk_Driver:
call fcn.0040c346
pop ecx
push 4
pop eax
pop esi
pop ebx
pop edi
leave
ret