Function at 0x1007990
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
push esi
push 0x80
jne 0x10079ed
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.imdisk.cpl__ImDiskOpenDeviceByNumber_8]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007abe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1007aa7
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x10054a8
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 8
pop esi
lea eax, [ebx + 1]
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
call dword [sym.imp.imdisk.cpl__ImDiskOpenDeviceByMountPoint_8]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007abe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
ja 0x1007a62
je 0x1007a83
sub eax, 1
je 0x1007a3d
sub eax, 0x56
jne 0x1007a70
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
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 8
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
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp eax, 0x10b
je 0x1007a83
cmp eax, 0x1126
je 0x1007a83
push ebx
call fcn.010063b0
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
push 0x100545c
push eax
call fcn.01006330
add esp, 0xc
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x1004824
call fcn.010063b0
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call fcn.01006420
test eax, eax
jne 0x1007adc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
push 0x448
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b00
push eax
push eax
push 1
push 0xc0000017
call dword [sym.imp.KERNEL32.dll_RaiseException]
push 0
lea edx, [ebp + 8]
push edx
push 0x448
push edi
push 0
push 0
push 0x83722008
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1007b52
push ebx
call fcn.010063b0
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
push 0x100542c
push eax
call fcn.01006330
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp + 8], 0x36
jae 0x1007b8f
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push ebx
add ecx, 0x40
push 0x100542c
push ecx
call fcn.01006330
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
mov esi, dword [sym.imp.msvcrt.dll_puts]
je 0x1007bba
mov edx, dword [sym.imp.msvcrt.dll__iob]
push ebx
add edx, 0x20
push 0x1005794
push edx
call fcn.01006330
add esp, 0xc
jmp 0x1007bea
movzx eax, word [edi + 0x2c]
test ax, ax
je 0x1007be0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
movzx eax, ax
push eax
add ecx, 0x20
push 0x100577c
push ecx
call fcn.01006330
add esp, 0xc
jmp 0x1007bea
push 0x1005768
call esi
add esp, 4
movzx eax, word [edi + 0x2e]
test ax, ax
je 0x1007c16
mov ecx, dword [sym.imp.msvcrt.dll__iob]
movzx eax, ax
lea edx, [edi + 0x30]
push edx
shr eax, 1
push eax
add ecx, 0x20
push 0x1005750
push ecx
call fcn.01006330
add esp, 0x10
jmp 0x1007c20
push 0x1005740
call esi
add esp, 4
mov eax, dword [edi + 0x24]
test eax, eax
mov ecx, dword [edi + 0x20]
mov esi, dword [sym.imp.msvcrt.dll_printf]
jl 0x1007c42
jg 0x1007c36
test ecx, ecx
jbe 0x1007c42
push eax
push ecx
push 0x1005720
call esi
add esp, 0xc
mov eax, dword [edi + 0xc]
cmp eax, 0x100
mov ecx, dword [edi + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
jb 0x1007c62
ja 0x1007c5b
test ecx, ecx
jb 0x1007c62
mov edx, 0x100571c
jmp 0x1007cae
test eax, eax
ja 0x1007c6e
cmp ecx, 0x40000000
jb 0x1007c75
mov edx, 0x1005718
jmp 0x1007cae
test eax, eax
ja 0x1007c81
cmp ecx, 0x100000
jb 0x1007c88
mov edx, 0x1005714
jmp 0x1007cae
test eax, eax
ja 0x1007c94
cmp ecx, 0x400
jb 0x1007c9b
mov edx, 0x1005710
jmp 0x1007cae
cmp ecx, 1
jne 0x1007ca9
test eax, eax
mov edx, 0x1005708
je 0x1007cae
mov edx, 0x1005700
cmp eax, 0x100
jb 0x1007cc6
ja 0x1007cbb
test ecx, ecx
jb 0x1007cc6
fild qword [ebp - 8]
fmul qword [0x10056f8]
jmp 0x1007d0e
test eax, eax
ja 0x1007cd2
cmp ecx, 0x40000000
jb 0x1007cdd
fild qword [ebp - 8]
fmul qword [0x10056f0]
jmp 0x1007d0e
test eax, eax
ja 0x1007ce9
cmp ecx, 0x100000
jb 0x1007cf4
fild qword [ebp - 8]
fmul qword [0x10056e8]
jmp 0x1007d0e
test eax, eax
ja 0x1007d00
cmp ecx, 0x400
jb 0x1007d0b
fild qword [ebp - 8]
fmul qword [0x10056e0]
jmp 0x1007d0e
fild qword [ebp - 8]
push edx
sub esp, 8
fstp qword [esp]
push eax
push ecx
push 0x10056c0
call esi
mov eax, dword [edi + 0x28]
add esp, 0x18
test eax, 0x10000
mov ebx, 0x10056b4
jne 0x1007d35
mov ebx, 0x10054ff
mov ecx, eax
and ecx, 0xf0
cmp ecx, 0x30
jne 0x1007d4b
mov dword [ebp + 0xc], 0x10056a8
jmp 0x1007d6c
cmp ecx, 0x40
jne 0x1007d59
mov dword [ebp + 0xc], 0x10056a0
jmp 0x1007d6c
cmp ecx, 0x20
mov dword [ebp + 0xc], 0x1005694
je 0x1007d6c
mov dword [ebp + 0xc], 0x100568c
mov ecx, eax
and ecx, 0xf00
cmp ecx, 0x200
jne 0x1007d83
mov edx, 0x1005678
jmp 0x1007dca
cmp ecx, 0x300
jne 0x1007d92
mov edx, 0x1005670
jmp 0x1007dca
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x1000
jne 0x1007da9
mov edx, 0x100565c
jmp 0x1007dca
cmp ecx, 0x2000
jne 0x1007db8
mov edx, 0x1005640
jmp 0x1007dca
cmp ecx, 0x3000
mov edx, 0x100561c
je 0x1007dca
mov edx, 0x10055f8
test al, 2
mov esi, 0x10055ec
jne 0x1007dd8
mov esi, 0x10054ff
test al, 1
mov ecx, 0x10055e0
jne 0x1007de6
mov ecx, 0x10054ff
test eax, 0x40000
mov eax, 0x10055d0
jne 0x1007df7
mov eax, 0x10054ff
push ebx
mov ebx, dword [ebp + 0xc]
push ebx
push edx
push esi
push ecx
push eax
push 0x10055c0
call dword [sym.imp.msvcrt.dll_printf]
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 0x20
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8