Function at 0x1005550
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
push ebx
push esi
push edi
push 0x1004258
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0xc0000000
lea ecx, [ebp - 8]
push ecx
call sub.imdisk.cpl__ImDiskOpenDeviceByName_8
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.msvcrt.dll_puts]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xc], edi
jne 0x10055da
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
jne 0x1005bd3
push 0x1004248
call sub.imdisk.cpl__ImDiskStartService_4
test eax, eax
je 0x1005bf1
push 0
call ebx
push 0x100420c
call esi
add esp, 4
push 0xc0000000
lea edx, [ebp - 8]
push edx
call sub.imdisk.cpl__ImDiskOpenDeviceByName_8
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x1005591
push edi
call fcn.01005470
test eax, eax
jne 0x10055ff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 5
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [ebp + 0x14]
xor ecx, ecx
mov esi, eax
and eax, 0xf00
and esi, 0xf000
cmp eax, 0x300
sete cl
xor edx, edx
cmp esi, 0x2000
sete dl
mov dword [ebp - 0x14], esi
mov eax, ecx
xor ecx, ecx
cmp esi, 0x1000
sete cl
mov dword [ebp - 0x10], eax
or edx, ecx
test eax, edx
je 0x10056ad
mov esi, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
push 0
push 0x10041e8
call esi
test eax, eax
jne 0x10056ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10056ad
push 0x10041d4
call sub.imdisk.cpl__ImDiskStartService_4
test eax, eax
je 0x100570f
push 0
push 0x10041e8
call esi
test eax, eax
jne 0x100569f
lea ebx, [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x100569f
push 0xc8
call ebx
push 0
push 0x10041e8
call esi
test eax, eax
je 0x1005680
push 0x1004198
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x10057a6
push eax
lea edx, [ebp - 8]
push edx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
movzx edi, word [ebp - 8]
add edi, 0x38
mov eax, edi
call fcn.010089f0
mov esi, esp
test esi, esi
jne 0x1005932
push 0x1004180
call dword [sym.imp.msvcrt.dll_perror]
mov ecx, dword [ebp - 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 8]
push edx
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
or eax, 0xffffffff
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
ja 0x1005747
je 0x1005737
add eax, 0xfffffffe
cmp eax, 1
ja 0x100574e
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004128
jmp 0x1005782
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x10040e4
jmp 0x1005782
cmp eax, 0x424
je 0x1005773
push 0x1004070
call fcn.01005400
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 7
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004010
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 7
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
cmp dword [ebp + 0x1c], 0
je 0x10057f0
push eax
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ntdll.dll_RtlCreateUnicodeString]
test al, al
jne 0x10056c3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1003ff4
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
or eax, 0xffffffff
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp - 0x10]
xor edx, edx
cmp dword [ebp - 0x14], 0x3000
push 0
sete dl
test ecx, edx
je 0x1005908
push 0x80
push 3
push 0
push 1
push 0
push 0x1003fdc
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp eax, 2
sete dl
xor eax, eax
cmp esi, 0xffffffff
sete al
mov ebx, 0x1003fb4
test eax, edx
jne 0x1005847
mov ebx, 0x1003f80
cmp esi, 0xffffffff
mov dword [ebp + 0x1c], ebx
je 0x1005856
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
lea edx, [eax + 2]
jmp 0x1005860
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1005860
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 0x1005877
sub eax, esi
sar eax, 1
add eax, edx
lea eax, [eax + eax + 1]
call fcn.010089f0
mov ebx, esp
test ebx, ebx
je 0x10057bf
mov eax, dword [ebp + 0x1c]
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x10058a2
mov eax, dword [ebp + 0x18]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10058b6
mov edi, ebx
sub eax, edx
add edi, 0xfffffffe
jmp 0x10058d0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x10058d0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
lea edx, [ebp - 8]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ntdll.dll_RtlCreateUnicodeString]
test al, al
jne 0x10056c3
mov eax, dword [ebp - 0xc]
push eax
jmp 0x10057c0
push 0
lea edx, [ebp - 8]
push edx
push eax
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
jne 0x10056c3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
jmp 0x10057d0
push edi
push 0
push esi
call sub.msvcrt.dll_memset
push 0x1003f6c
call dword [sym.imp.msvcrt.dll_puts]
mov edi, dword [ebp + 0x20]
add esp, 0x10
test edi, edi
je 0x10059e0
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1005960
sub eax, edx
sar eax, 1
cmp eax, 2
jne 0x1005980
xor eax, eax
cmp word [edi + 2], 0x3a
sete al
jmp 0x10059d5
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1005985
sub eax, edx
sar eax, 1
cmp eax, 3
jne 0x10059e0
mov ecx, 0x1003f64
lea eax, [edi + 2]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10059c7
test dx, dx
je 0x10059c3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10059c7
add eax, 4
add ecx, 4
test dx, dx
jne 0x10059a1
xor eax, eax
jmp 0x10059cc
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
je 0x10059e0
mov dx, word [edi]
mov word [esi + 0x2c], dx
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 - 8]
mov word [esi + 0x2e], cx
mov ax, word [ebp - 8]
test ax, ax
je 0x1005a50
movzx edx, ax
mov eax, dword [ebp - 4]
push edx
push eax
lea ecx, [esi + 0x30]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea edx, [ebp - 8]
push edx
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
movzx eax, word [esi + 0x2e]
mov edi, dword [ebp - 0xc]
push 0
lea ecx, [ebp - 0x18]
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 0x1005a99
push 0x1003f28
call fcn.01005400
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 3
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x20], 0
mov edx, dword [esi]
mov dword [ebx], edx
je 0x1005bc2
mov eax, dword [esi]
push eax
push 0x1003f04
lea ecx, [ebp - 0x220]
push 0x103
push ecx
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
cmp word [esi + 0x2c], 0
lea edx, [ebp - 0x220]
mov word [ebp - 0x1a], 0
push edx
jne 0x1005ba8
mov edi, dword [ebp + 0x20]
push edi
call sub.imdisk.cpl__ImDiskCreateMountPoint_8
test eax, eax
jne 0x1005bc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x10b
mov esi, dword [sym.imp.msvcrt.dll_fputs]
ja 0x1005b39
je 0x1005b18
sub eax, 1
je 0x1005b6b
sub eax, 0x56
je 0x1005b29
sub eax, 0x3a
jne 0x1005b45
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1003ecc
jmp 0x1005b79
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1003e38
jmp 0x1005b79
sub eax, 0x1126
je 0x1005b6b
sub eax, 2
je 0x1005b51
push 0x1003dfc
call fcn.01005400
jmp 0x1005b7e
mov edx, dword [sym.imp.msvcrt.dll__iob]
push edi
add edx, 0x40
push 0x1003dd8
push edx
call fcn.01005380
add esp, 0xc
jmp 0x1005b7e
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1003da4
call esi
add esp, 8
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1003d6c
call esi
add esp, 8
mov word [edi], 0
xor eax, eax
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [ebp + 0x20]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
jne 0x1005bc2
push 0x1003dfc
call fcn.01005400
xor eax, eax
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push 0x1003d08
call fcn.01005400
mov eax, 6
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
call edi
cmp eax, 0x422
ja 0x1005c26
je 0x1005c15
add eax, 0xfffffffe
cmp eax, 1
ja 0x1005c2d
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1003cd4
jmp 0x1005c59
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1003ca4
jmp 0x1005c59
cmp eax, 0x424
je 0x1005c4b
push 0x1003c50
call fcn.01005400
mov eax, 4
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1003c00
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
mov eax, 4
lea esp, [ebp - 0x22c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c