Function at 0x58c4e0
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b28c8
mov eax, dword fs:[0]
push eax
sub esp, 0x384
mov eax, dword [0x616040]
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 esi, edx
mov dword [ebp - 0x37c], esi
mov dword [ebp - 0x380], ecx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x374], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x390], 0
call fcn.00414e1f
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x58c557
push 0x80004005
call fcn.00402740
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x370], edi
cmp dword [ebp + 0xc], 0
mov dword [ebp - 4], 0
je 0x58c870
push 0x5e9af0
lea ecx, [ebp - 0x36c]
call fcn.00402f60
push 0x5e9af0
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 1
call fcn.00402f60
or esi, 0xffffffff
mov byte [ebp - 4], 2
test ebx, ebx
jle 0x58c68e
mov edx, dword [ebp - 0x374]
lea ecx, [ebp - 0x384]
push ebx
call fcn.0058f590
add esp, 4
push eax
lea ecx, [ebp - 0x36c]
mov byte [ebp - 4], 3
call fcn.004032d0
mov byte [ebp - 4], 2
mov ecx, esi
mov edx, dword [ebp - 0x384]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58c5f1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp ebx, 0xa0009
je 0x58c642
cmp ebx, 0x6020000
jne 0x58c68e
push ebx
push dword [ebp - 0x374]
call fcn.00567370
mov edx, dword [ebp - 0x374]
lea ecx, [ebp - 0x384]
push eax
call fcn.0058f590
add esp, 4
push eax
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 4
call fcn.004032d0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x384]
jmp 0x58c675
mov edx, dword [ebp - 0x374]
lea ecx, [ebp - 0x388]
push 0x23c2
call fcn.0058f590
add esp, 4
push eax
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 5
call fcn.004032d0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x388]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58c68e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x38c]
test eax, eax
je 0x58c6a4
push eax
lea ecx, [ebp - 0x36c]
call fcn.004032d0
mov ecx, dword [ebp - 0x37c]
test ecx, ecx
je 0x58c6b1
mov ecx, dword [ecx + 0x20]
xor eax, eax
lea edx, [ebp - 0x36c]
cmp ebx, 0xa0009
sete al
push eax
lea eax, [ebp - 0x378]
push eax
call fcn.005869b0
add esp, 8
test eax, eax
jne 0x58c755
mov ebx, dword [ebp - 0x380]
mov ecx, ebx
push 0x5e9af0
call fcn.00402f60
mov byte [ebp - 4], 1
mov ecx, esi
mov edx, dword [ebp - 0x378]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58c70b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp - 0x36c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58c72e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x58cada
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x58cada
mov eax, dword [ebp - 0x36c]
cmp dword [eax - 4], 1
jle 0x58c775
push dword [eax - 0xc]
lea ecx, [ebp - 0x36c]
call fcn.00402c90
mov eax, dword [ebp - 0x36c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
mov eax, dword [ebp - 0x36c]
push dword [eax - 8]
push eax
call fcn.00528e42
mov edx, eax
add esp, 8
test edx, edx
js 0x58c866
mov ecx, dword [ebp - 0x36c]
cmp edx, dword [ecx - 8]
jg 0x58c866
mov dword [ecx - 0xc], edx
lea ebx, [edi - 0x10]
mov eax, dword [ebp - 0x36c]
xor ecx, ecx
mov word [eax + edx*2], cx
mov eax, dword [ebp - 0x36c]
lea edx, [eax - 0x10]
cmp edx, ebx
je 0x58c81c
cmp dword [ebx + 0xc], ecx
lea edi, [ebx + 0xc]
jl 0x58c807
mov ecx, dword [edx]
cmp ecx, dword [ebx]
jne 0x58c807
push edx
call fcn.00403660
add esp, 4
mov dword [ebp - 0x37c], eax
mov ecx, esi
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x58c7fc
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x37c]
lea edi, [eax + 0x10]
mov dword [ebp - 0x370], edi
jmp 0x58c81c
push dword [eax - 0xc]
lea ecx, [ebp - 0x370]
push eax
call fcn.004035a0
mov edi, dword [ebp - 0x370]
mov byte [ebp - 4], 1
mov ecx, esi
mov edx, dword [ebp - 0x378]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58c83f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp - 0x36c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58caa8
mov ecx, dword [edx]
push edx
jmp 0x58caa3
push 0x80070057
call fcn.00402740
push 0x239f
xor edx, edx
lea ecx, [ebp - 0x37c]
call fcn.0058f590
add esp, 4
push 1
push 0
push esi
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x368]
mov ebx, dword [ebp - 0x37c]
push ebx
push 0x101000
push 0
push 0
push 1
call fcn.0041e814
mov byte [ebp - 4], 7
call fcn.00414e1f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58c8cb
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x374], esi
mov byte [ebp - 4], 8
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58c909
push 0x104
lea ecx, [ebp - 0x374]
call fcn.00402c20
mov esi, dword [ebp - 0x374]
push 0
push 0x26
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x58c866
cmp eax, dword [esi - 8]
jg 0x58c866
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x368]
call fcn.0041f2f1
lea ecx, [ebp - 0x368]
mov dword [eax + 0x2c], esi
call fcn.0041f177
cmp eax, 1
je 0x58c9e3
mov ecx, dword [ebp - 0x380]
push 0x5e9af0
call fcn.00402f60
lea edx, [esi - 0x10]
mov byte [ebp - 4], 7
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x58c98e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x368]
mov byte [ebp - 4], 6
call fcn.0041ead7
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, esi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58c9ba
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x58c9d8
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x380]
jmp 0x58cadc
lea eax, [ebp - 0x388]
push eax
lea ecx, [ebp - 0x368]
call fcn.0041f2f8
push eax
lea ecx, [ebp - 0x370]
mov byte [ebp - 4], 9
call fcn.004032d0
mov byte [ebp - 4], 8
or eax, 0xffffffff
mov edx, dword [ebp - 0x388]
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x58ca29
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x370]
call fcn.0058bf90
mov edi, dword [ebp - 0x370]
push edi
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
jne 0x58ca5c
push eax
push 0x5e9af0
lea ecx, [ebp - 0x370]
call fcn.004035a0
mov edi, dword [ebp - 0x370]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 7
or esi, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58ca7c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x368]
mov byte [ebp - 4], 6
call fcn.0041ead7
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, esi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58caa8
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
push edi
call fcn.00403660
mov ebx, dword [ebp - 0x380]
add eax, 0x10
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov dword [ebx], eax
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x58cada
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
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.00527e2c
mov esp, ebp
pop ebp
ret