Function at 0x58f6c8
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
push 0x650
mov eax, 0x6d7813
call fcn.00432a44
mov dword [ebp - 0x64c], ecx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x65c], eax
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x648], edx
mov dword [ebp - 0x638], ebx
mov dword [ebp - 0x634], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x630], eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x63c], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x58f71f
mov eax, dword [esi]
lea edi, [ebp - 0x63c]
push edi
lea edi, [ebp - 0x630]
push edi
lea edi, [ebp - 0x634]
push edi
push eax
push dword [ebp + 0x10]
push edx
call fcn.0058e485
push 0x208
mov dword [ebp - 0x658], eax
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00436326
and dword [ebp - 0x650], 0
lea eax, [ebp - 0x420]
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0xc
push 0x104
push eax
push 0x441d10
call edi
test eax, eax
je 0x58f78a
lea eax, [ebp - 0x420]
mov dword [ebp - 0x650], eax
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.00436326
and dword [ebp - 0x654], 0
lea eax, [ebp - 0x628]
add esp, 0xc
push 0x104
push eax
push 0x441d38
call edi
test eax, eax
je 0x58f7ca
lea eax, [ebp - 0x628]
mov dword [ebp - 0x654], eax
cmp dword [ebp - 0x634], 0
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x58f892
push dword [ebp - 0x634]
push 0x441d10
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test esi, esi
je 0x58f89f
and dword [ebp - 0x62c], 0
mov byte [ebp - 4], 3
mov eax, dword [esi]
test eax, eax
jne 0x58f826
push 0x58fb24
lea ecx, [ebp - 0x640]
call fcn.0048cc22
mov byte [ebp - 4], 4
xor ebx, ebx
inc ebx
mov dword [ebp - 0x638], ebx
mov eax, dword [eax]
push 0
lea ecx, [ebp - 0x62c]
push ecx
push eax
push dword [ebp - 0x634]
push 0x441d10
call fcn.006137f9
mov dword [ebp - 0x644], eax
mov dword [ebp - 4], 3
test bl, 1
je 0x58f869
and ebx, 0xfffffffe
mov dword [ebp - 0x638], ebx
push dword [ebp - 0x640]
call edi
mov eax, dword [ebp - 0x644]
test eax, eax
jne 0x58f884
cmp dword [esi], eax
je 0x58f875
push dword [esi]
call edi
mov eax, dword [ebp - 0x62c]
and dword [ebp - 0x62c], 0
mov dword [esi], eax
mov byte [ebp - 4], 2
push dword [ebp - 0x62c]
call edi
jmp 0x58f89f
push 0
push 0x441d10
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp dword [ebp - 0x630], 0
je 0x58f986
push dword [ebp - 0x630]
push 0x441d38
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test esi, esi
je 0x58f95f
and dword [ebp - 0x62c], 0
mov byte [ebp - 4], 5
mov eax, dword [esi]
test eax, eax
jne 0x58f8f5
push 0x58fb24
lea ecx, [ebp - 0x644]
call fcn.0048cc22
mov byte [ebp - 4], 6
or ebx, 2
mov dword [ebp - 0x638], ebx
mov eax, dword [eax]
push 0
lea ecx, [ebp - 0x62c]
push ecx
push eax
push dword [ebp - 0x630]
push 0x441d38
call fcn.006137f9
mov dword [ebp - 0x640], eax
mov dword [ebp - 4], 5
test bl, 2
je 0x58f938
and ebx, 0xfffffffd
mov dword [ebp - 0x638], ebx
push dword [ebp - 0x644]
call edi
mov eax, dword [ebp - 0x640]
test eax, eax
jne 0x58f953
cmp dword [esi], eax
je 0x58f944
push dword [esi]
call edi
mov eax, dword [ebp - 0x62c]
and dword [ebp - 0x62c], 0
mov dword [esi], eax
mov byte [ebp - 4], 2
push dword [ebp - 0x62c]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp dword [ebp - 0x658], 0
jne 0x58f997
push dword [ebp - 0x63c]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x58f997
push dword [ebp - 0x63c]
jmp 0x58f9eb
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0
push 0x441d38
call ebx
jmp 0x58f965
cmp word [ebp - 0x420], 0
je 0x58f9e6
lea eax, [ebp - 0x218]
push eax
xor eax, eax
push eax
push eax
push 0x8025
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push 0x47e024
mov esi, 0x104
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.005746be
push 0x47de84
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.005746be
add esp, 0x18
jmp 0x58f9ff
push 0x47de84
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00574733
add esp, 0xc
push 0x47e0b8
push 0x58fb30
call ebx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, dword [ebp - 0x64c]
push 0
push 0x58fb30
mov dword [esi + 0x168], eax
call ebx
cmp dword [esi + 0x168], 0
je 0x58fad6
mov edx, 0x447598
xor ecx, ecx
mov eax, dword [esi + ecx*4 + 0x1bc]
cmp eax, dword [edx + ecx*4]
jne 0x58fa55
inc ecx
cmp ecx, 4
je 0x58fa6e
jmp 0x58fa41
mov edx, 0x447578
xor ecx, ecx
mov eax, dword [esi + ecx*4 + 0x1bc]
cmp eax, dword [edx + ecx*4]
jne 0x58fa86
inc ecx
cmp ecx, 4
jne 0x58fa5c
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp - 0x65c]
push dword [ebp - 0x648]
call fcn.0058f40e
jmp 0x58faaf
mov edx, 0x447588
xor ecx, ecx
mov eax, dword [esi + ecx*4 + 0x1bc]
cmp eax, dword [edx + ecx*4]
jne 0x58facf
inc ecx
cmp ecx, 4
jne 0x58fa8d
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp - 0x648]
call fcn.0058fb7e
mov esi, eax
test esi, esi
jne 0x58fadb
mov ecx, dword [ebp - 0x64c]
mov ecx, dword [ecx + 0xe0]
test ecx, ecx
je 0x58fadb
mov eax, dword [ecx]
push ecx
call dword [eax + 0xc]
mov esi, eax
jmp 0x58fadb
mov esi, 0x80004005
jmp 0x58fadb
mov esi, 0x80040212
push dword [ebp - 0x650]
push 0x441d10
call ebx
push dword [ebp - 0x654]
push 0x441d38
call ebx
mov byte [ebp - 4], 1
push dword [ebp - 0x63c]
call edi
mov byte [ebp - 4], 0
push dword [ebp - 0x630]
call edi
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x634]
call edi
mov eax, esi
call fcn.00402698
ret 0x14