Function at 0x4583b0
Capabilities:
Check if file exists
Get common file path
Query environment variable

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5413d0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x248
mov eax, dword [0x589ed0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x254], esi
xor eax, eax
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x254], esi
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
push eax
push eax
push 6
mov dword [ebp - 4], eax
call fcn.00408740
add esp, 0xc
test al, al
je 0x458519
lea ecx, [ebp - 0x250]
call fcn.00461520
mov edi, eax
lea eax, [ebp - 0x238]
cmp eax, edi
je 0x4584d9
mov edx, dword [ebp - 0x224]
cmp edx, 8
jb 0x458498
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45848e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4586f2
push edx
push ecx
call fcn.004b9f4f
add esp, 8
mov dword [ebp - 0x228], 0
xor eax, eax
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x228], xmm0
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x23c]
cmp edx, 8
jb 0x458519
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45850f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4586f2
push edx
push ecx
call fcn.004b9f4f
add esp, 8
cmp dword [ebp - 0x228], 0
jne 0x458659
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.004d90f0
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x45856c
push 0x104
lea eax, [ebp - 0x220]
push eax
push str._APPDATA_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [ebp - 0x220], 0
je 0x458623
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x240], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x23c], 7
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4585a1
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x250]
call fcn.00406ee0
mov edx, dword [ebp - 0x224]
cmp edx, 8
jb 0x458603
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4585f9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4586f7
push edx
push ecx
call fcn.004b9f4f
add esp, 8
movups xmm0, xmmword [ebp - 0x250]
movq xmm1, qword [ebp - 0x240]
movups xmmword [ebp - 0x238], xmm0
movq qword [ebp - 0x228], xmm1
jmp 0x458632
movq xmm1, qword [ebp - 0x228]
movups xmm0, xmmword [ebp - 0x238]
cmp dword [ebp - 0x228], 0
jne 0x458659
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq qword [esi + 0x10], xmm1
jmp 0x4586d2
push 0xb
push 0x5699a0
lea ecx, [ebp - 0x238]
call fcn.004048a0
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4586a7
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
movups xmm0, xmmword [ebp - 0x238]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x228]
movq qword [esi + 0x10], xmm0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004ba2f5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004e4b18
call fcn.004e4b18
int3