Function at 0x40f380
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57e7f0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x6236f8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp - 0x10]
push eax
call fcn.0040e5c0
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
mov eax, dword [ebp - 0x10]
lea ecx, [eax - 0xc]
setne bl
cmp ecx, dword [0x610020]
je 0x40f3ed
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40f3ed
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff4
push eax
call fcn.00551d56
add esp, 4
test bl, bl
jne 0x40f59f
lea edx, [ebp - 0x10]
push edx
mov ecx, edi
call fcn.0040e5c0
push eax
mov dword [ebp - 4], 0
call fcn.0041e3b0
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov esi, eax
mov eax, dword [ebp - 0x10]
lea ecx, [eax - 0xc]
add esp, 4
mov dword [ebp - 4], 0xffffffff
cmp ecx, dword [0x610020]
je 0x40f446
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x40f446
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff4
push eax
call fcn.00551d56
add esp, 4
test esi, esi
je 0x40f49f
lea edx, [ebp - 0x14]
push edx
mov ecx, edi
call fcn.0040e5c0
mov eax, dword [0x625c68]
push eax
mov eax, dword [eax - 8]
push eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 1
call fcn.00409870
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [esi - 0xc]
cmp eax, 0xffffffff
jne 0x40f54f
cmp ecx, dword [0x610020]
je 0x40f49f
add esi, 0xfffffff4
push esi
call ebx
test eax, eax
jg 0x40f49f
push esi
call fcn.00551d56
add esp, 4
mov edx, dword [0x610024]
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
mov dword [ebp - 4], 2
call fcn.0040e5c0
mov ecx, dword [eax]
movsx edx, byte [ecx]
mov eax, dword [0x625c64]
push edx
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 3
call fcn.0040d8d0
mov eax, dword [ebp - 0x18]
lea edx, [eax - 0xc]
add esp, 0xc
mov byte [ebp - 4], 2
cmp edx, dword [0x610020]
je 0x40f501
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x40f501
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff4
push eax
call fcn.00551d56
add esp, 4
mov esi, dword [ebp - 0x1c]
push 0x21
push 0x5a74ec
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
je 0x40f581
lea eax, [esi - 0xc]
mov dword [ebp - 4], 0xffffffff
cmp eax, dword [0x610020]
je 0x40f3f5
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40f3f5
push esi
call fcn.00551d56
add esp, 4
jmp 0x40f3f5
cmp ecx, dword [0x610020]
je 0x40f56a
add esi, 0xfffffff4
push esi
call ebx
test eax, eax
jg 0x40f56a
push esi
call fcn.00551d56
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esi - 0xc]
cmp edx, dword [0x610020]
je 0x40f59f
add esi, 0xfffffff4
push esi
call ebx
test eax, eax
jg 0x40f59f
push esi
call fcn.00551d56
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret