Function at 0x1007840
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 0x100789d
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.imdisk.cpl__ImDiskOpenDeviceByNumber_8]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100796e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1007957
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1005374
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 0x100796e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
ja 0x1007912
je 0x1007933
sub eax, 1
je 0x10078ed
sub eax, 0x56
jne 0x1007920
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push ecx
push 0x1004c78
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 0x10051e8
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 0x1007933
cmp eax, 0x1126
je 0x1007933
push ebx
call fcn.01006240
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 0x1005324
push eax
call fcn.010061c0
add esp, 0xc
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x10046f4
call fcn.01006240
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call fcn.010062b0
test eax, eax
jne 0x100798c
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 0x10079b0
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 0x1007a02
push ebx
call fcn.01006240
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
push 0x10052f4
push eax
call fcn.010061c0
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 0x1007a3f
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push ebx
add ecx, 0x40
push 0x10052f4
push ecx
call fcn.010061c0
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 0x1007a6a
mov edx, dword [sym.imp.msvcrt.dll__iob]
push ebx
add edx, 0x20
push 0x100562c
push edx
call fcn.010061c0
add esp, 0xc
jmp 0x1007a9a
movzx eax, word [edi + 0x2c]
test ax, ax
je 0x1007a90
mov ecx, dword [sym.imp.msvcrt.dll__iob]
movzx eax, ax
push eax
add ecx, 0x20
push 0x1005614
push ecx
call fcn.010061c0
add esp, 0xc
jmp 0x1007a9a
push 0x1005600
call esi
add esp, 4
movzx eax, word [edi + 0x2e]
test ax, ax
je 0x1007ac6
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 0x10055e8
push ecx
call fcn.010061c0
add esp, 0x10
jmp 0x1007ad0
push 0x10055d8
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 0x1007af2
jg 0x1007ae6
test ecx, ecx
jbe 0x1007af2
push eax
push ecx
push 0x10055b8
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 0x1007b12
ja 0x1007b0b
test ecx, ecx
jb 0x1007b12
mov edx, 0x10055b4
jmp 0x1007b5e
test eax, eax
ja 0x1007b1e
cmp ecx, 0x40000000
jb 0x1007b25
mov edx, 0x10055b0
jmp 0x1007b5e
test eax, eax
ja 0x1007b31
cmp ecx, 0x100000
jb 0x1007b38
mov edx, 0x10055ac
jmp 0x1007b5e
test eax, eax
ja 0x1007b44
cmp ecx, 0x400
jb 0x1007b4b
mov edx, 0x10055a8
jmp 0x1007b5e
cmp ecx, 1
jne 0x1007b59
test eax, eax
mov edx, 0x10055a0
je 0x1007b5e
mov edx, 0x1005598
cmp eax, 0x100
jb 0x1007b76
ja 0x1007b6b
test ecx, ecx
jb 0x1007b76
fild qword [ebp - 8]
fmul qword [0x1005590]
jmp 0x1007bbe
test eax, eax
ja 0x1007b82
cmp ecx, 0x40000000
jb 0x1007b8d
fild qword [ebp - 8]
fmul qword [0x1005588]
jmp 0x1007bbe
test eax, eax
ja 0x1007b99
cmp ecx, 0x100000
jb 0x1007ba4
fild qword [ebp - 8]
fmul qword [0x1005580]
jmp 0x1007bbe
test eax, eax
ja 0x1007bb0
cmp ecx, 0x400
jb 0x1007bbb
fild qword [ebp - 8]
fmul qword [0x1005578]
jmp 0x1007bbe
fild qword [ebp - 8]
push edx
sub esp, 8
fstp qword [esp]
push eax
push ecx
push 0x1005558
call esi
mov eax, dword [edi + 0x28]
add esp, 0x18
test eax, 0x10000
mov ebx, 0x100554c
jne 0x1007be5
mov ebx, 0x10053cb
mov ecx, eax
and ecx, 0xf0
cmp ecx, 0x30
jne 0x1007bfb
mov dword [ebp + 0xc], 0x1005540
jmp 0x1007c1c
cmp ecx, 0x40
jne 0x1007c09
mov dword [ebp + 0xc], 0x1005538
jmp 0x1007c1c
cmp ecx, 0x20
mov dword [ebp + 0xc], 0x100552c
je 0x1007c1c
mov dword [ebp + 0xc], 0x1005524
mov ecx, eax
and ecx, 0xf00
cmp ecx, 0x200
jne 0x1007c33
mov esi, 0x1005510
jmp 0x1007c6b
cmp ecx, 0x300
jne 0x1007c42
mov esi, 0x1005508
jmp 0x1007c6b
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x1000
jne 0x1007c59
mov esi, 0x10054f4
jmp 0x1007c6b
cmp ecx, 0x2000
mov esi, 0x10054d8
je 0x1007c6b
mov esi, 0x10054c0
test al, 2
mov edx, 0x10054b4
jne 0x1007c79
mov edx, 0x10053cb
test al, 1
mov ecx, 0x10054a8
jne 0x1007c87
mov ecx, 0x10053cb
test eax, 0x40000
mov eax, 0x1005498
jne 0x1007c98
mov eax, 0x10053cb
push ebx
mov ebx, dword [ebp + 0xc]
push ebx
push esi
push edx
push ecx
push eax
push 0x1005488
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