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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100b2d0]
push ebx
push esi
push edi
push 0
push 0
mov esi, 0x1001464
push esi
mov dword [ebp - 4], eax
call fcn.01002e55
mov edi, eax
lea eax, [edi + 1]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1005f7d
push eax
push 0x10
push eax
push eax
push 0x4b5
push eax
call fcn.01003ebe
call fcn.01003aa1
mov dword [0x100ba5c], eax
xor eax, eax
jmp 0x10061f3
push edi
push ebx
push esi
call fcn.01002e55
test eax, eax
jne 0x1005fac
push eax
push 0x10
push eax
push eax
push 0x4b1
push eax
call fcn.01003ebe
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x100ba5c], 0x80070714
jmp 0x1005f76
push 0x10013d4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
xor edi, edi
inc edi
test eax, eax
jne 0x1005fc5
mov dword [0x100c490], edi
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov al, byte [0x100c99e]
test al, al
je 0x1006010
cmp al, 0x5c
jne 0x1005fe7
cmp byte [0x100c99f], al
jne 0x1005fe7
xor esi, esi
xor eax, eax
jmp 0x1005feb
mov eax, edi
xor esi, esi
push eax
push esi
push 0x100c99e
call fcn.010052d4
test eax, eax
jne 0x1006062
push esi
push 0x10
push esi
push esi
push 0x4be
push esi
call fcn.01003ebe
jmp 0x1005f76
xor eax, eax
cmp dword [0x100c884], eax
jne 0x10061d5
cmp dword [0x100c490], eax
jne 0x10061d5
mov esi, 0x100bc44
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x1006069
push 3
push edi
push esi
call fcn.010052d4
test eax, eax
jne 0x1006062
push esi
call fcn.01002025
test eax, eax
jne 0x1006069
push edi
push edi
push esi
call fcn.010052d4
test eax, eax
je 0x1006069
mov eax, edi
jmp 0x10061f3
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x10014a4
lea eax, [ebp - 0x108]
push eax
call edi
jmp 0x1006194
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov ebx, eax
cmp ebx, 6
je 0x1006095
cmp ebx, 3
jne 0x10060a7
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10060e0
cmp ebx, 2
jne 0x10060d5
cmp byte [ebp - 0x108], 0x41
je 0x10060d5
cmp byte [ebp - 0x108], 0x42
je 0x10060d5
lea eax, [ebp - 0x108]
push eax
call fcn.010069ea
test eax, eax
je 0x10060d5
cmp eax, 0x19000
jae 0x10060e0
inc byte [ebp - 0x108]
jmp 0x1006194
xor ebx, ebx
push ebx
push 3
lea eax, [ebp - 0x108]
push eax
call fcn.0100456a
test eax, eax
jne 0x1006118
lea eax, [ebp - 0x108]
push eax
call fcn.01002025
test eax, eax
jne 0x10060d5
push ebx
push 1
lea eax, [ebp - 0x108]
push eax
call fcn.0100456a
test eax, eax
je 0x10060d5
lea eax, [ebp - 0x108]
push eax
call fcn.01002025
test eax, eax
je 0x100613a
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x1001494
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.010066cf
lea eax, [ebp - 0x108]
push eax
call fcn.01001ff9
test eax, eax
jne 0x100616e
inc byte [ebp - 0x108]
mov byte [ebp - 0x105], al
jmp 0x1006194
push 2
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x108]
push eax
push esi
call edi
push ebx
push 1
push esi
call fcn.010052d4
test eax, eax
jne 0x10061d0
cmp byte [ebp - 0x108], 0x5a
lea eax, [ebp - 0x108]
jle 0x1006082
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 4
push 3
lea eax, [ebp - 0x108]
push eax
call fcn.0100456a
test eax, eax
jne 0x100606f
jmp 0x1005f76
xor eax, eax
inc eax
jmp 0x10061f3
push eax
push eax
push 0x1005670
push eax
push 0x7d2
push dword [0x100c4a4]
call fcn.01004819
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.010064de
leave
ret