Function at 0x4085a0
Capabilities:
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44a55f
mov eax, dword fs:[0]
push eax
sub esp, 0x8c0
mov eax, dword [0x4630d0]
xor eax, esp
mov dword [esp + 0x8b8], eax
push ebx
push esi
push edi
mov eax, dword [0x4630d0]
xor eax, esp
push eax
lea eax, [esp + 0x8d0]
mov dword fs:[0], eax
mov ebx, ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], ebx
call fcn.0040fd30
mov dword [esp + 0x8d8], 0
mov eax, dword [ebx + 0x10]
cmp eax, 3
ja case.default.0x408606
jmp dword [eax*4 + 0x408db8]
push 1
sub esp, 8
add ebx, 8
mov ecx, esp
mov dword [esp + 0x24], esp
push ebx
call fcn.00401050
call fcn.0040eee0
add esp, 0xc
test eax, eax
je 0x408720
push str.ServiceHelper:_Couldnt_stop_service._Permission_was_refused._User_has_insufficient_rights_to_perform_this_installation_or_Windows_Service_Manager_is_open.
lea ecx, [esp + 0x48]
call fcn.004010e0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x8dc], 1
call fcn.00401b00
lea ecx, [esp + 0x44]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
push 0x45607c
lea ecx, [esp + 0x68]
call fcn.004010e0
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x88]
mov bl, 2
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x8e0], bl
call fcn.004011f0
mov ecx, eax
mov byte [esp + 0x8d8], 3
call fcn.00401190
push eax
call fcn.00431abd
add esp, 4
lea ecx, [esp + 0x84]
mov byte [esp + 0x8d8], bl
call fcn.0040fd60
lea ecx, [esp + 0x64]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
lea ecx, [esp + 0x10]
call fcn.00401190
push eax
push 3
call fcn.00410660
add esp, 8
lea ecx, [esp + 0x10]
mov dword [esp + 0x8d8], 0xffffffff
call fcn.0040fd60
mov eax, 0x64
mov ecx, dword [esp + 0x8d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8b8]
xor ecx, esp
call fcn.00431d07
mov esp, ebp
pop ebp
ret
push 1
sub esp, 8
mov ecx, esp
mov dword [esp + 0x24], esp
push ebx
call fcn.00401050
call fcn.0040f810
add esp, 0xc
test eax, eax
je 0x408d9b
push str.ServiceHelper:_Couldnt_start_service._Permission_was_refused._User_has_insufficient_rights_to_perform_this_installation_or_Windows_Service_Manager_is_open.
lea ecx, [esp + 0x58]
call fcn.004010e0
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x8dc], 4
call fcn.004011b0
lea ecx, [esp + 0x54]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
push 0x45607c
lea ecx, [esp + 0x38]
call fcn.004010e0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0xa4]
mov bl, 5
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x8e0], bl
call fcn.004011f0
mov ecx, eax
mov byte [esp + 0x8d8], 6
call fcn.00401190
push eax
call fcn.00431abd
add esp, 4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x8d8], bl
call fcn.0040fd60
lea ecx, [esp + 0x34]
jmp 0x4086c2
push 1
sub esp, 8
add ebx, 8
mov ecx, esp
mov dword [esp + 0x24], esp
push ebx
call fcn.00401050
call fcn.0040eee0
add esp, 0xc
test eax, eax
je 0x408d9b
push str.ServiceHelper:_Couldnt_stop_service._Permission_was_refused._User_has_insufficient_rights_to_perform_this_installation_or_Windows_Service_Manager_is_open.
lea ecx, [esp + 0x40]
call fcn.004010e0
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x8dc], 7
call fcn.00401b00
lea ecx, [esp + 0x3c]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
push 0x45607c
lea ecx, [esp + 0x50]
call fcn.004010e0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0xd4]
mov bl, 8
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x8e0], bl
call fcn.004011f0
mov ecx, eax
mov byte [esp + 0x8d8], 9
call fcn.00401190
push eax
call fcn.00431abd
add esp, 4
lea ecx, [esp + 0xd0]
mov byte [esp + 0x8d8], bl
call fcn.0040fd60
lea ecx, [esp + 0x4c]
jmp 0x4086c2
sub esp, 8
add ebx, 8
mov ecx, esp
mov dword [esp + 0x20], esp
push ebx
call fcn.00401050
call fcn.0040ede0
add esp, 8
test eax, eax
je 0x408d9b
push str.ServiceHelper:_Couldnt_uninstall_service._Permission_was_refused._User_has_insufficient_rights_to_perform_this_installation_or_Windows_Service_Manager_is_open.
lea ecx, [esp + 0x60]
call fcn.004010e0
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x8dc], 0xa
call fcn.00401b00
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
push 0x45607c
lea ecx, [esp + 0x70]
call fcn.004010e0
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0xb4]
mov bl, 0xb
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x8e0], bl
call fcn.004011f0
mov ecx, eax
mov byte [esp + 0x8d8], 0xc
call fcn.00401190
push eax
call fcn.00431abd
add esp, 4
lea ecx, [esp + 0xb0]
mov byte [esp + 0x8d8], bl
call fcn.0040fd60
lea ecx, [esp + 0x6c]
jmp 0x4086c2
push str.Modifying_bin_path_if_required._Initial_install_path_is
lea ecx, [esp + 0xc4]
call fcn.004010e0
lea edi, [ebx + 0x18]
push edi
lea ecx, [esp + 0xf0]
push ecx
mov ecx, eax
mov byte [esp + 0x8e0], 0xd
call fcn.004011f0
lea esi, [eax + 4]
mov byte [esp + 0x8d8], 0xe
mov eax, dword [esi]
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x408996
mov edx, dword [eax + 4]
push edx
mov ecx, esi
call fcn.00401bf0
mov esi, dword [esi]
push esi
push 1
call fcn.00410660
add esp, 8
lea ecx, [esp + 0xec]
mov byte [esp + 0x8d8], 0xd
call fcn.0040fd60
lea ecx, [esp + 0xc0]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
push edi
lea ecx, [esp + 0x20]
call fcn.00401050
mov byte [esp + 0x8d8], 0xf
or edi, 0xffffffff
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx - 0xc]
lea eax, [edi + 1]
test eax, eax
jl 0x408bcf
cmp eax, edx
jge 0x408bcf
lea eax, [ecx + eax*2]
push 0x25
push eax
call fcn.00431f62
add esp, 8
test eax, eax
je 0x408bcf
mov ecx, dword [esp + 0x20]
sub eax, ecx
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x408bcf
cmp esi, edi
je 0x408bcf
mov eax, dword [ecx - 0xc]
lea ebx, [esi + 1]
test ebx, ebx
jl 0x408a55
cmp ebx, eax
jge 0x408a55
lea ecx, [ecx + ebx*2]
push 0x25
push ecx
call fcn.00431f62
add esp, 8
test eax, eax
je 0x408a55
sub eax, dword [esp + 0x20]
sar eax, 1
mov edi, eax
jmp 0x408a58
or edi, 0xffffffff
mov edx, edi
sub edx, esi
sub edx, 1
push edx
push ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x28]
call fcn.004083d0
mov byte [esp + 0x8d8], 0x10
mov eax, dword [esp + 0x28]
cmp dword [eax - 4], 1
jle 0x408a92
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00401bf0
mov eax, dword [esp + 0x28]
push 0x3e8
lea edx, [esp + 0xf8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jbe 0x408bb2
lea eax, [esp + 0xf4]
push eax
lea ecx, [esp + 0x80]
call fcn.004010e0
mov byte [esp + 0x8d8], 0x11
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 0xc]
sub eax, edi
sub eax, 1
push eax
lea edx, [esp + 0xbc]
push edx
lea ecx, [esp + 0x24]
call fcn.004082d0
mov edi, eax
push esi
lea eax, [esp + 0xac]
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x8e0], 0x12
call fcn.004081e0
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x9c]
push edx
mov ecx, eax
mov byte [esp + 0x8e0], 0x13
call fcn.004011f0
push edi
lea ecx, [esp + 0x90]
push ecx
mov ecx, eax
mov byte [esp + 0x8e0], 0x14
call fcn.004011f0
add eax, 4
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x8dc], 0x15
call fcn.00401b00
lea ecx, [esp + 0x8c]
mov byte [esp + 0x8d8], 0x14
call fcn.0040fd60
lea ecx, [esp + 0x98]
mov byte [esp + 0x8d8], 0x13
call fcn.0040fd60
lea ecx, [esp + 0xa8]
mov byte [esp + 0x8d8], 0x12
call fcn.0040fd60
lea ecx, [esp + 0xb8]
mov byte [esp + 0x8d8], 0x11
call fcn.0040fd60
lea ecx, [esp + 0x7c]
mov byte [esp + 0x8d8], 0x10
call fcn.0040fd60
mov edi, esi
jmp 0x408bb5
add edi, 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x8d8], 0xf
call fcn.0040fd60
mov ebx, dword [esp + 0x18]
jmp 0x4089e0
lea edx, [esp + 0x20]
lea esi, [ebx + 0x18]
lea ecx, [esi + 4]
push edx
call fcn.00401b00
push str.Final_bin_path_is
lea ecx, [esp + 0xdc]
call fcn.004010e0
push esi
lea ecx, [esp + 0xcc]
push ecx
mov ecx, eax
mov byte [esp + 0x8e0], 0x16
call fcn.004011f0
lea edi, [eax + 4]
mov byte [esp + 0x8d8], 0x17
mov eax, dword [edi]
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x408c29
mov edx, dword [eax + 4]
push edx
mov ecx, edi
call fcn.00401bf0
mov edi, dword [edi]
push edi
push 1
call fcn.00410660
add esp, 8
lea ecx, [esp + 0xc8]
mov byte [esp + 0x8d8], 0x16
call fcn.0040fd60
lea ecx, [esp + 0xd8]
mov byte [esp + 0x8d8], 0xf
call fcn.0040fd60
mov eax, dword [ebx + 0x14]
push 0
push eax
sub esp, 8
mov ecx, esp
mov dword [esp + 0x28], esp
push esi
call fcn.00401050
sub esp, 8
mov byte [esp + 0x8f0], 0x18
add ebx, 8
mov ecx, esp
mov dword [esp + 0xf8], esp
push ebx
call fcn.00401050
sub esp, 8
mov ecx, esp
mov dword [esp + 0xb4], esp
push ebx
mov byte [esp + 0x8fc], 0x19
call fcn.00401050
mov byte [esp + 0x8f8], 0xf
call fcn.0040f2a0
add esp, 0x20
test eax, eax
je 0x408d8a
push str.ServiceHelper:_Couldnt_install_service._Permission_was_refused._User_has_insufficient_rights_to_perform_this_installation_or_Windows_Service_Manager_is_open.
lea ecx, [esp + 0x30]
call fcn.004010e0
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x18]
mov byte [esp + 0x8dc], 0x1a
call fcn.00401b00
lea ecx, [esp + 0x2c]
mov byte [esp + 0x8d8], 0xf
call fcn.0040fd60
push 0x45607c
lea ecx, [esp + 0x78]
call fcn.004010e0
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0xe8]
mov bl, 0x1b
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x8e0], bl
call fcn.004011f0
mov ecx, eax
mov byte [esp + 0x8d8], 0x1c
call fcn.00401190
push eax
call fcn.00431abd
add esp, 4
lea ecx, [esp + 0xe4]
mov byte [esp + 0x8d8], bl
call fcn.0040fd60
lea ecx, [esp + 0x74]
mov byte [esp + 0x8d8], 0xf
call fcn.0040fd60
lea ecx, [esp + 0x10]
call fcn.00401190
push eax
push 3
call fcn.00410660
add esp, 8
lea ecx, [esp + 0x1c]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
jmp case.default.0x408606
lea ecx, [esp + 0x1c]
mov byte [esp + 0x8d8], 0
call fcn.0040fd60
lea ecx, [esp + 0x10]
mov dword [esp + 0x8d8], 0xffffffff
call fcn.0040fd60
xor eax, eax
jmp 0x4086fc