Function at 0x458170
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x523018
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x580ca0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x280], ecx
mov eax, dword [ebp - 0x280]
xor ecx, ecx
cmp dword [eax + 0x58], 1
sete cl
mov byte [0x585b8e], cl
xor edx, edx
mov word [ebp - 0x21c], dx
push 0x206
push 0
lea eax, [ebp - 0x21a]
push eax
call fcn.004ba280
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp - 0x280]
call fcn.00455d90
test eax, eax
jne 0x4581ef
mov dword [ebp + 0xc], 0
cmp dword [ebp + 0xc], 0
je 0x45820f
mov edx, dword [ebp + 0xc]
push edx
push 0x104
lea eax, [ebp - 0x21c]
push eax
call fcn.004c0fee
add esp, 0xc
jmp 0x458288
mov ecx, dword [ebp - 0x280]
cmp dword [ecx + 0x58], 0
je 0x45824e
push 0x104
lea edx, [ebp - 0x21c]
push edx
mov ecx, dword [ebp - 0x280]
call fcn.00458040
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
je 0x45824c
mov eax, dword [ebp - 0x23c]
jmp 0x4584dd
jmp 0x458261
push 0
push 0x26
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x15
mov ecx, 0x585ca8
call fcn.004756c0
push eax
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x260]
push ecx
call fcn.00520fb0
add esp, 8
mov dword [ebp - 0x284], eax
mov edx, dword [ebp - 0x284]
mov dword [ebp - 0x288], edx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x288]
push eax
mov ecx, 0x585c6c
call fcn.00401000
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00402c20
lea ecx, [ebp - 0x21c]
push ecx
mov ecx, 0x585bd8
call fcn.0040b170
call fcn.0047a720
call fcn.0047a3a0
mov ecx, 0x5861f4
call fcn.004258a0
movzx edx, al
test edx, edx
je 0x45830d
call fcn.0047ac10
jmp 0x458312
call fcn.0047ad20
lea eax, [ebp - 0x21c]
push eax
mov ecx, dword [ebp - 0x280]
call fcn.00455d90
test eax, eax
jne 0x458332
mov eax, 1
jmp 0x4584dd
mov ecx, dword [ebp - 0x280]
add ecx, 0x6c
call fcn.004589c0
lea ecx, [ebp - 0x21c]
push ecx
mov ecx, dword [ebp - 0x280]
call fcn.00455ea0
lea edx, [ebp - 0x244]
push edx
mov ecx, dword [ebp - 0x280]
add ecx, 0x6c
call fcn.0045dd60
jmp 0x45837d
push 0
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x244]
call fcn.00458ac0
lea ecx, [ebp - 0x270]
push ecx
mov ecx, dword [ebp - 0x280]
add ecx, 0x6c
call fcn.00458950
push eax
lea ecx, [ebp - 0x244]
call fcn.00458b00
movzx edx, al
test edx, edx
je 0x4583df
lea ecx, [ebp - 0x244]
call fcn.0045e090
mov ecx, eax
call fcn.00429580
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4583dd
lea ecx, [ebp - 0x244]
call fcn.0045e090
mov ecx, eax
call fcn.00429580
push eax
call fcn.00439840
add esp, 4
jmp 0x458369
lea eax, [ebp - 0x21c]
push eax
mov ecx, dword [ebp - 0x280]
call fcn.00455ea0
mov ecx, dword [ebp - 0x280]
add ecx, 0x6c
call fcn.004589c0
lea ecx, [ebp - 0x21c]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x52f3ac
push 0x585bd8
lea edx, [ebp - 0x238]
push edx
call fcn.0043bd20
add esp, 0xc
mov dword [ebp - 4], 1
push 0
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x274], esp
lea eax, [ebp - 0x238]
push eax
call fcn.0040e030
mov dword [ebp - 0x28c], eax
call fcn.0045a4f0
add esp, 0x20
mov ecx, dword [ebp - 0x280]
mov dword [ecx + 0x54], 1
mov edx, dword [ebp - 0x280]
push edx
call fcn.00456380
push 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x278], esp
lea eax, [ebp - 0x238]
push eax
call fcn.0040e030
mov dword [ebp - 0x290], eax
call fcn.0045a4f0
add esp, 0x20
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
movzx ecx, byte [ebp + 8]
test ecx, ecx
sete dl
movzx eax, dl
push eax
mov ecx, dword [ebp - 0x280]
call fcn.00457c10
call dword [sym.imp.ole32.dll_CoUninitialize]
mov dword [ebp - 0x27c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00401320
mov eax, dword [ebp - 0x27c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ba1db
mov esp, ebp
pop ebp
ret 8