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

Disassembly:
push edi
pop edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
xor edx, edx
push ebx
mov ecx, 0x4012ec
call fcn.0040468f
push eax
pop edi
lea ecx, [edi + 1]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
pop esi
test esi, esi
jne 0x4055fd
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4b5
xor ecx, ecx
call fcn.004044b9
call fcn.00406285
mov dword [0x409124], eax
xor eax, eax
jmp 0x4058b7
push edi
push esi
pop edx
mov ecx, 0x4012ec
call fcn.0040468f
test eax, eax
jne 0x405632
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4b1
xor ecx, ecx
call fcn.004044b9
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x409124], 0x80070714
jmp 0x4055f6
push 0x4012c0
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
xor edi, edi
inc edi
test eax, eax
jne 0x40564b
mov dword [0x409a30], edi
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov al, byte [0x408b3e]
test al, al
je 0x405696
cmp al, 0x5c
jne 0x405669
cmp byte [0x408b3f], al
push ebx
pop eax
je 0x40566b
push edi
pop eax
push eax
xor edx, edx
mov ecx, 0x408b3e
call fcn.00405467
test eax, eax
jne 0x40589b
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4be
xor ecx, ecx
call fcn.004044b9
jmp 0x4055f6
cmp dword [0x408a24], ebx
jne 0x40589f
cmp dword [0x409a30], ebx
jne 0x40589f
mov esi, 0x4091e4
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x4056f3
push 3
push edi
pop edx
push esi
pop ecx
call fcn.00405467
test eax, eax
jne 0x40589b
push esi
pop ecx
call fcn.00402630
test eax, eax
jne 0x4056f3
push edi
push edi
pop edx
push esi
pop ecx
call fcn.00405467
test eax, eax
jne 0x40589b
push ecx
push 0x4013a4
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.00401781
cmp byte [ebp - 0x108], 0x5a
jg 0x40586c
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
push eax
pop esi
cmp esi, 6
je 0x405730
cmp esi, 3
jne 0x405742
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40577e
cmp esi, 2
jne 0x40576b
mov al, byte [ebp - 0x108]
cmp al, 0x41
je 0x405771
cmp al, 0x42
je 0x405771
lea ecx, [ebp - 0x108]
call fcn.00406952
test eax, eax
je 0x40576b
cmp eax, 0x19000
jae 0x40577e
mov al, byte [ebp - 0x108]
inc al
mov byte [ebp - 0x108], al
jmp 0x405864
push ebx
push 3
pop edx
lea ecx, [ebp - 0x108]
call fcn.0040597d
test eax, eax
jne 0x4057b2
lea ecx, [ebp - 0x108]
call fcn.00402630
test eax, eax
jne 0x40576b
push ebx
push edi
pop edx
lea ecx, [ebp - 0x108]
call fcn.0040597d
test eax, eax
je 0x40576b
lea ecx, [ebp - 0x108]
call fcn.00402630
test eax, eax
je 0x4057d3
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x4013a8
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040658a
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40580a
push ebx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x40580d
and eax, 0x10
test eax, eax
jne 0x405827
mov al, byte [ebp - 0x108]
inc al
mov byte [ebp - 0x105], bl
mov byte [ebp - 0x108], al
jmp 0x405864
push 2
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ecx
lea eax, [ebp - 0x108]
mov esi, 0x4091e4
push eax
push ecx
mov edx, 0x104
push esi
pop ecx
call fcn.00401781
push ebx
push edi
pop edx
push esi
pop ecx
call fcn.00405467
test eax, eax
jne 0x40589b
mov al, byte [ebp - 0x108]
cmp al, 0x5a
jle 0x405717
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 4
push 3
pop edx
lea ecx, [ebp - 0x108]
call fcn.0040597d
test eax, eax
jne 0x4056f3
jmp 0x4055f6
push edi
pop eax
jmp 0x4058b7
push ebx
push ebx
push 0x403210
push ebx
mov edx, 0x7d2
call fcn.00406517
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406ce0
mov esp, ebp
pop ebp
ret