Function at 0x401cf0
Capabilities:
Check if file exists
Get common file path
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5475f1
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x5c5b9c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x228], ecx
call fcn.0043d2a1
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x401d3e
push 0x80004005
call fcn.00401020
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 0
call fcn.0043d2a1
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x401d71
push 0x80004005
call fcn.00401020
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0
push 0
mov byte [ebp - 4], 1
call ebx
mov edi, eax
test edi, edi
jns 0x401da3
push 0x80070057
call fcn.00401020
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x401dc6
push edi
lea ecx, [ebp - 0x220]
call fcn.004012e0
mov esi, dword [ebp - 0x220]
push esi
push edi
call ebx
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00530654
add esp, 8
test eax, eax
js 0x401d99
cmp eax, dword [esi - 8]
jg 0x401d99
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov eax, dword [esi - 0xc]
test eax, eax
jg 0x401df5
or eax, 0xffffffff
jmp 0x401e0d
push 0x5c
push esi
call fcn.00530319
add esp, 8
test eax, eax
jne 0x401e09
or eax, 0xffffffff
jmp 0x401e0d
sub eax, esi
sar eax, 1
push eax
lea edx, [ebp - 0x224]
push edx
lea ecx, [ebp - 0x220]
call fcn.00401860
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 2
call fcn.004018e0
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401e56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x21c]
mov ecx, dword [edi - 8]
mov eax, 1
sub eax, dword [edi - 4]
or ecx, eax
jge 0x401e7e
push 0
lea ecx, [ebp - 0x21c]
call fcn.004012e0
mov edi, dword [ebp - 0x21c]
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 5
jne 0x401ecb
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea edx, [ebp - 0x218]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x401ecb
mov ecx, dword [ebp - 0x228]
call fcn.00401760
lea eax, [ebp - 0x218]
push eax
call ebx
cmp eax, 0xffffffff
je 0x401eb2
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401eeb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401f0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00530f8d
mov esp, ebp
pop ebp
ret