Function at 0x1007220
Capabilities:
Check if file exists
Unmount volume via ioctl

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ebp + 0x14], 0
mov eax, dword [0x10054e0]
mov cx, word [0x10054e4]
push ebx
push esi
push edi
mov dword [ebp - 8], eax
mov word [ebp - 4], cx
je 0x1007286
push 0x10054c8
call dword [sym.imp.msvcrt.dll_puts]
mov edx, dword [ebp + 8]
add esp, 4
push edx
push 0
call dword [sym.imp.imdisk.cpl__ImDiskForceRemoveDevice_8]
test eax, eax
jne 0x1007775
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x1007272
mov eax, 0x10054bc
push eax
call fcn.010063b0
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ebx, dword [ebp + 0xc]
test ebx, ebx
jne 0x1007304
mov edi, dword [ebp + 8]
mov ebx, dword [sym.imp.imdisk.cpl__ImDiskOpenDeviceByNumber_8]
push 0xc0000000
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
push 0x80000000
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
push 0x80
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1007539
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x10054a8
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x14
movzx edi, word [ebx]
test di, di
je 0x100744e
lea esi, [ebx + 2]
mov ecx, 0x1005220
mov eax, esi
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1007346
test dx, dx
je 0x1007342
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1007346
add eax, 4
add ecx, 4
test dx, dx
jne 0x1007320
xor eax, eax
jmp 0x100734b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1007389
mov ecx, 0x1004ed0
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100737c
test dx, dx
je 0x1007378
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100737c
add eax, 4
add ecx, 4
test dx, dx
jne 0x1007356
xor eax, eax
jmp 0x1007381
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100744e
mov ecx, dword [0x100549c]
mov eax, dword [0x1005498]
mov edx, dword [0x10054a0]
mov dword [ebp - 0x14], ecx
mov cx, 0x5a
cmp cx, di
mov dword [ebp - 0x18], eax
movzx eax, word [0x10054a4]
mov dword [ebp - 0x10], edx
sbb edx, edx
add edx, 1
cmp di, 0x41
mov word [ebp - 0xc], ax
sbb eax, eax
add eax, 1
test eax, edx
mov word [ebp - 0x10], di
je 0x10073e5
push 0x100547c
call dword [sym.imp.msvcrt.dll_puts]
movzx ecx, word [ebx]
add esp, 4
push ecx
push 0
call dword [sym.imp.imdisk.cpl__ImDiskNotifyRemovePending_8]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
lea edx, [ebp - 0x18]
push edx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
push 0
push 0x20000000
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x18]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
push 0
push 0x20000000
push 3
push 0
push 3
push 0x80
lea ecx, [ebp - 0x18]
push ecx
call edi
jmp 0x10072c4
mov edi, dword [sym.imp.imdisk.cpl__ImDiskOpenDeviceByMountPoint_8]
push 0xc0000000
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
push 0x80000000
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
push 0x80
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007551
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
ja 0x10074f1
je 0x1007513
sub eax, 1
je 0x10074cc
sub eax, 0x56
jne 0x10074ff
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004da8
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1004d14
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp eax, 0x10b
je 0x1007513
cmp eax, 0x1126
je 0x1007513
push ebx
call fcn.010063b0
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push ebx
add ecx, 0x40
push 0x100545c
push ecx
call fcn.01006330
add esp, 0xc
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0x1004824
call fcn.010063b0
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push esi
call fcn.01006420
test eax, eax
jne 0x1007570
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0x448
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007593
push eax
push eax
push 1
push 0xc0000017
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea eax, [ebp + 0x14]
push eax
push 0x448
push edi
push 0
push 0
push 0x83722008
push esi
call ebx
test eax, eax
jne 0x10075eb
mov esi, dword [ebp + 0xc]
push esi
call fcn.010063b0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push esi
add ecx, 0x40
push 0x100542c
push ecx
call fcn.01006330
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 0x10
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp dword [ebp + 0x14], 0x36
jae 0x1007620
mov edx, dword [ebp + 0xc]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edx
add eax, 0x40
push 0x100542c
push eax
call fcn.01006330
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 0x10
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp dword [ebp + 0xc], 0
jne 0x1007639
movzx eax, word [edi + 0x2c]
test ax, ax
je 0x1007639
lea ecx, [ebp - 8]
mov word [ebp - 8], ax
mov dword [ebp + 0xc], ecx
cmp dword [ebp + 0x18], 0
je 0x1007667
mov edx, dword [edi]
push edx
push 0x10053fc
call dword [sym.imp.msvcrt.dll_printf]
mov eax, dword [edi]
add esp, 8
push eax
call dword [sym.imp.imdisk.cpl__ImDiskRemoveRegistrySettings_4]
test eax, eax
jne 0x1007667
push 0x1004c2c
call fcn.010063b0
push edi
call dword [sym.imp.msvcrt.dll_free]
mov edi, dword [sym.imp.msvcrt.dll_puts]
push 0x10053e0
call edi
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push 0x10053cc
call edi
add esp, 4
push 0
lea ecx, [ebp + 0x14]
push ecx
push 0
push 0
push 0
push 0
push 0x90018
push esi
call ebx
test eax, eax
mov edi, dword [ebp + 0x10]
jne 0x10076f0
test edi, edi
je 0x1007266
push 0x10053b0
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
push 0
lea edx, [ebp + 0x14]
push edx
push 0
push 0
push 0
push 0
push 0x90020
push esi
call ebx
push 0
lea eax, [ebp + 0x14]
push eax
push 0
push 0
push 0
push 0
push 0x90018
push esi
call ebx
jmp 0x100771c
push 0x1005394
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
push 0
lea ecx, [ebp + 0x14]
push ecx
push 0
push 0
push 0
push 0
push 0x90020
push esi
call ebx
test eax, eax
je 0x1007266
push 0x1005380
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
push 0
lea edx, [ebp + 0x14]
push edx
push 0
push 0
push 0
push 0
push 0x2d4808
push esi
call ebx
test eax, eax
jne 0x1007758
test edi, edi
je 0x1007758
push eax
push esi
call dword [sym.imp.imdisk.cpl__ImDiskForceRemoveDevice_8]
test eax, eax
je 0x1007266
push 0
lea eax, [ebp + 0x14]
push eax
push 0
push 0
push 0
push 0
push 0x9001c
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x1007814
push esi
push 0x1005360
call dword [sym.imp.msvcrt.dll_printf]
add esp, 8
push esi
call dword [sym.imp.imdisk.cpl__ImDiskRemoveMountPoint_4]
test eax, eax
jne 0x1007814
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
ja 0x10077e7
je 0x10077fd
sub eax, 1
je 0x10077cd
sub eax, 0x56
jne 0x10077f5
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004da8
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
jmp 0x1007814
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1005318
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
jmp 0x1007814
cmp eax, 0x10b
je 0x10077fd
cmp eax, 0x1126
je 0x10077fd
push esi
call fcn.010063b0
jmp 0x1007814
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
add eax, 0x40
push 0x100545c
push eax
call fcn.01006330
add esp, 0xc
push 0x100530c
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14