Function at 0x1006690
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x130
push ebx
push esi
push edi
mov eax, 0x448
call fcn.010089f0
mov ebx, esp
test ebx, ebx
mov dword [ebp - 0x28], ebx
jne 0x10066d1
push 0x1004180
call dword [sym.imp.msvcrt.dll_perror]
add esp, 4
or eax, 0xffffffff
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x100672c
mov eax, dword [ebp + 8]
push 0x80
push eax
call sub.imdisk.cpl__ImDiskOpenDeviceByNumber_8
mov esi, eax
cmp esi, 0xffffffff
jne 0x10068f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10068d9
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1004544
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
mov eax, 1
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006731
sub eax, edx
sar eax, 1
cmp eax, 2
jne 0x1006751
xor eax, eax
cmp word [edi + 2], 0x3a
sete al
jmp 0x10067aa
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1006756
sub eax, edx
sar eax, 1
cmp eax, 3
jne 0x10067fb
mov ecx, 0x1003f64
lea eax, [edi + 2]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100679c
test dx, dx
je 0x1006798
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100679c
add eax, 4
add ecx, 4
test dx, dx
jne 0x1006776
xor eax, eax
jmp 0x10067a1
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
je 0x10067fb
mov ecx, dword [0x100453c]
mov edx, dword [0x1004534]
mov eax, dword [0x1004538]
push 0
push 0x20000000
push 3
push 0
push 3
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
mov dx, word [0x1004540]
mov dword [ebp - 0xc], eax
mov ax, word [edi]
push 0x80
lea ecx, [ebp - 0x10]
push ecx
mov word [ebp - 4], dx
mov word [ebp - 8], ax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x10066e6
push 0x80
push edi
call sub.imdisk.cpl__ImDiskOpenDeviceByMountPoint_8
mov esi, eax
cmp esi, 0xffffffff
jne 0x10068f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
ja 0x1006885
je 0x10068ad
sub eax, 1
je 0x100685a
sub eax, 0x56
jne 0x1006893
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
push edx
push 0x1003e38
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
mov eax, 9
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x10042e0
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
mov eax, 9
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp eax, 0x10b
je 0x10068ad
cmp eax, 0x1126
je 0x10068ad
push edi
call fcn.01005400
mov eax, 9
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push edi
add ecx, 0x40
push 0x10044f8
push ecx
call fcn.01005380
add esp, 0xc
mov eax, 9
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x1003bd4
call fcn.01005400
mov eax, 2
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call fcn.01005470
test eax, eax
jne 0x100691c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 5
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0
lea eax, [ebp - 0x2c]
push eax
push 0x448
push ebx
push 0
push 0
push 0x83722008
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1006975
push edi
call fcn.01005400
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push edi
add ecx, 0x40
push 0x10044c8
push ecx
call fcn.01005380
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 2
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x2c], 0x36
jae 0x10069ae
mov edx, dword [sym.imp.msvcrt.dll__iob]
push edi
add edx, 0x40
push 0x10044c8
push edx
call fcn.01005380
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 2
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x28]
test ecx, 0x10000
mov edx, 0x100459b
mov dword [ebp - 0x24], 0x1004744
jne 0x10069cf
mov dword [ebp - 0x24], edx
mov eax, ecx
and eax, 0xf0
cmp eax, 0x30
jne 0x10069e4
mov dword [ebp - 0x18], 0x1004738
jmp 0x10069f7
cmp eax, 0x20
mov dword [ebp - 0x18], 0x100472c
je 0x10069f7
mov dword [ebp - 0x18], 0x1004724
mov eax, ecx
and eax, 0xf00
cmp eax, 0x200
jne 0x1006a0e
mov dword [ebp - 0x14], 0x100470c
jmp 0x1006a23
cmp eax, 0x300
mov dword [ebp - 0x14], 0x10046f4
je 0x1006a23
mov dword [ebp - 0x14], 0x10046d8
test cl, 2
mov dword [ebp - 0x20], 0x10046cc
jne 0x1006a32
mov dword [ebp - 0x20], edx
test cl, 1
mov dword [ebp - 0x1c], 0x10046c0
jne 0x1006a41
mov dword [ebp - 0x1c], edx
mov eax, dword [ebx + 0xc]
cmp eax, 0x100
mov esi, dword [ebx + 8]
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], eax
jb 0x1006a63
ja 0x1006a5a
test esi, esi
jb 0x1006a63
mov dword [ebp + 8], 0x10046bc
jmp 0x1006ab9
test eax, eax
ja 0x1006a6f
cmp esi, 0x40000000
jb 0x1006a78
mov dword [ebp + 8], 0x10046b8
jmp 0x1006ab9
test eax, eax
ja 0x1006a84
cmp esi, 0x100000
jb 0x1006a8d
mov dword [ebp + 8], 0x10046b4
jmp 0x1006ab9
test eax, eax
ja 0x1006a99
cmp esi, 0x400
jb 0x1006aa2
mov dword [ebp + 8], 0x10046b0
jmp 0x1006ab9
cmp esi, 1
jne 0x1006ab2
test eax, eax
mov dword [ebp + 8], 0x10046a8
je 0x1006ab9
mov dword [ebp + 8], 0x10046a0
cmp eax, 0x100
jb 0x1006ad1
ja 0x1006ac6
test esi, esi
jb 0x1006ad1
fild qword [ebp - 0xc]
fmul qword [0x1004698]
jmp 0x1006b19
test eax, eax
ja 0x1006add
cmp esi, 0x40000000
jb 0x1006ae8
fild qword [ebp - 0xc]
fmul qword [0x1004690]
jmp 0x1006b19
test eax, eax
ja 0x1006af4
cmp esi, 0x100000
jb 0x1006aff
fild qword [ebp - 0xc]
fmul qword [0x1004688]
jmp 0x1006b19
test eax, eax
ja 0x1006b0b
cmp esi, 0x400
jb 0x1006b16
fild qword [ebp - 0xc]
fmul qword [0x1004680]
jmp 0x1006b19
fild qword [ebp - 0xc]
movzx edi, word [ebx + 0x2e]
test di, di
mov dword [ebp - 8], 0x100467c
ja 0x1006b2c
mov dword [ebp - 8], edx
movzx ecx, word [ebx + 0x2c]
xor edx, edx
test cx, cx
setne dl
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
sete cl
or edx, ecx
mov edx, 0x1004678
jne 0x1006b4c
mov edx, dword [ebp + 0xc]
mov ecx, ebx
movzx ecx, word [ecx + 0x2c]
test cx, cx
jne 0x1006b5e
mov ecx, 0x20
jmp 0x1006b61
movzx ecx, cx
mov ebx, dword [ebp - 0x24]
push ebx
mov ebx, dword [ebp - 0x18]
push ebx
mov ebx, dword [ebp - 0x14]
push ebx
mov ebx, dword [ebp - 0x20]
push ebx
mov ebx, dword [ebp - 0x1c]
push ebx
mov ebx, dword [ebp + 8]
push ebx
sub esp, 8
fstp qword [esp]
push eax
mov eax, dword [ebp - 0x28]
push esi
add eax, 0x30
push eax
movzx eax, di
shr eax, 1
push eax
mov eax, dword [ebp - 8]
push eax
push edx
push ecx
push 0x1004640
lea ecx, [ebp - 0x130]
push 0x104
push ecx
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x48
lea edx, [ebp - 0x130]
push edx
mov eax, edx
push eax
mov byte [ebp - 0x2d], 0
call dword [sym.imp.USER32.dll_CharToOemA]
lea ecx, [ebp - 0x130]
push ecx
call dword [sym.imp.msvcrt.dll_puts]
add esp, 4
xor eax, eax
lea esp, [ebp - 0x13c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8