Function at 0x480580
Capabilities:
Check if file exists
Check os version
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e3d7e
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x66c0e0]
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 eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc4], ebx
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xc0], edi
call fcn.004b5c24
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4805e8
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
mov dword [ebp - 4], edi
mov edi, 1
mov dword [ebp - 0xc0], edi
call fcn.004b5c24
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x48061e
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xb8], eax
mov dword [ebp - 4], edi
test esi, esi
jne 0x48063b
xor eax, eax
jmp 0x480649
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x480640
sub eax, edx
push eax
push esi
mov ecx, ebx
call fcn.00406350
mov eax, dword [ebx]
push 0x5c
push eax
call fcn.005bdf56
add esp, 8
test eax, eax
je 0x4806ad
sub eax, dword [ebx]
js 0x4806ad
inc eax
push eax
lea ecx, [ebp - 0xb4]
push ecx
mov ecx, ebx
call fcn.0044a0f0
push eax
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 2
call fcn.00406510
mov eax, dword [ebp - 0xb4]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4806ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x9c
lea ecx, [ebp - 0xac]
push 0
push ecx
call fcn.005bb320
add esp, 0xc
lea edx, [ebp - 0xac]
push edx
mov dword [ebp - 0xac], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4808ab
mov eax, dword [ebp - 0x9c]
cmp eax, 2
ja 0x480700
jne 0x4808ab
cmp dword [ebp - 0xa8], 6
jb 0x4808ab
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x4808ab
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4808ab
lea ecx, [ebp - 0xb0]
call fcn.00406050
lea eax, [ebp - 0xb4]
push eax
push 0
push 0
push 0x63b2b0
mov byte [ebp - 4], 3
call esi
test eax, eax
js 0x480885
mov ecx, dword [ebp - 0xb4]
push ecx
lea ecx, [ebp - 0xb0]
call fcn.004804f0
mov edx, dword [ebp - 0xb4]
mov edi, dword [sym.imp.ole32.dll_CoTaskMemFree]
push edx
call edi
lea eax, [ebp - 0xb4]
push eax
push 0
push 0
push 0x63b290
call esi
test eax, eax
js 0x480885
mov ecx, dword [ebp - 0xb4]
push ecx
lea ecx, [ebp - 0xb0]
call fcn.004804f0
mov edx, dword [ebp - 0xb4]
push edx
call edi
push 0x5fc4e8
lea ecx, [ebp - 0xb0]
call fcn.00409ea0
mov eax, dword [ebp - 0xbc]
push eax
lea ecx, [ebp - 0xb0]
call fcn.00409ea0
mov ecx, dword [ebp - 0xb0]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ecx
call edi
test eax, eax
jne 0x4807ff
push eax
lea ecx, [ebp - 0xb0]
call fcn.0040d3c0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [ebp - 0xb0]
push edx
call fcn.00480450
add esp, 4
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0xbc]
push 0x5fc4e8
push ecx
call fcn.0043f400
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 4
call fcn.00408d70
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 3
call fcn.004273a0
mov esi, dword [ebp - 0xb0]
push esi
call edi
test eax, eax
jne 0x48086e
push eax
lea ecx, [ebp - 0xb0]
call fcn.0040d3c0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov esi, dword [ebp - 0xb0]
push esi
call fcn.00480450
add esp, 4
push esi
call edi
test eax, eax
je 0x48088b
lea edx, [ebp - 0xb0]
push edx
mov ecx, ebx
call fcn.00406510
jmp 0x48088b
mov esi, dword [ebp - 0xb0]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4808ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0xb8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4808d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
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.005bb30e
mov esp, ebp
pop ebp
ret