Function at 0x405299
Capabilities:
Check if file exists
Create directory
Get common file path
Get disk information
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
xor edx, edx
push ebx
mov ecx, 0x40123c
call fcn.004043c1
mov edi, eax
lea ecx, [edi + 1]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x4052f6
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4b5
xor ecx, ecx
call fcn.004041b0
call fcn.00405f71
mov dword [0x409a88], eax
xor eax, eax
jmp 0x4055ae
push edi
mov edx, esi
mov ecx, 0x40123c
call fcn.004043c1
test eax, eax
jne 0x40532b
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4b1
xor ecx, ecx
call fcn.004041b0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x409a88], 0x80070714
jmp 0x4052ef
push 0x401210
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
xor edi, edi
inc edi
test eax, eax
jne 0x405344
mov dword [0x409a70], edi
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov al, byte [0x408a5e]
test al, al
je 0x405392
cmp al, 0x5c
jne 0x405362
cmp byte [0x408a5f], al
mov eax, ebx
je 0x405364
mov eax, edi
push eax
xor edx, edx
mov ecx, 0x408a5e
call fcn.00405161
test eax, eax
je 0x40537c
mov eax, edi
jmp 0x4055ae
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4be
xor ecx, ecx
call fcn.004041b0
jmp 0x4052ef
cmp dword [0x408944], ebx
jne 0x405596
cmp dword [0x409a70], ebx
jne 0x405596
mov esi, 0x409224
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x4053e7
push 3
mov edx, edi
mov ecx, esi
call fcn.00405161
test eax, eax
jne 0x405375
mov ecx, esi
call fcn.004023f7
test eax, eax
jne 0x4053e7
push edi
mov edx, edi
mov ecx, esi
call fcn.00405161
test eax, eax
jne 0x405375
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push ecx
push 0x4012f4
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040150c
cmp byte [ebp - 0x108], 0x5a
jg 0x405566
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov esi, eax
cmp esi, 6
je 0x405430
cmp esi, 3
jne 0x40543e
lea eax, [ebp - 0x108]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x40547a
cmp esi, 2
jne 0x405467
mov al, byte [ebp - 0x108]
cmp al, 0x41
je 0x40546d
cmp al, 0x42
je 0x40546d
lea ecx, [ebp - 0x108]
call fcn.00406673
test eax, eax
je 0x405467
cmp eax, 0x19000
jae 0x40547a
mov al, byte [ebp - 0x108]
inc al
mov byte [ebp - 0x108], al
jmp 0x40555e
push 0
push 3
pop edx
lea ecx, [ebp - 0x108]
call fcn.0040567e
test eax, eax
jne 0x4054b0
lea ecx, [ebp - 0x108]
call fcn.004023f7
test eax, eax
jne 0x405467
xor edx, edx
lea ecx, [ebp - 0x108]
push eax
inc edx
call fcn.0040567e
test eax, eax
je 0x405467
lea ecx, [ebp - 0x108]
call fcn.004023f7
test eax, eax
je 0x4054cd
push 0x104
lea eax, [ebp - 0x108]
push eax
call edi
push 0x4012f8
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.004062ff
lea eax, [ebp - 0x108]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x405501
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x405504
and eax, 0x10
test eax, eax
jne 0x40551f
mov al, byte [ebp - 0x108]
inc al
mov byte [ebp - 0x105], 0
mov byte [ebp - 0x108], al
jmp 0x40555e
push 2
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ecx
lea eax, [ebp - 0x108]
mov esi, 0x409224
push eax
push ecx
mov edx, 0x104
mov ecx, esi
call fcn.0040150c
xor edx, edx
mov ecx, esi
push 0
inc edx
call fcn.00405161
test eax, eax
jne 0x405591
mov al, byte [ebp - 0x108]
cmp al, 0x5a
jle 0x405417
push 0x104
lea eax, [ebp - 0x108]
push eax
call edi
push 4
push 3
pop edx
lea ecx, [ebp - 0x108]
call fcn.0040567e
test eax, eax
jne 0x4053f3
jmp 0x4052ef
xor eax, eax
inc eax
jmp 0x4055ae
push ebx
push ebx
push 0x402fdf
push ebx
mov edx, 0x7d2
call fcn.004061f9
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004069ed
mov esp, ebp
pop ebp
ret