Function at 0x4085e0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47ddad
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4b5200]
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 edi, ecx
mov dword [ebp - 0x38], edi
cmp dword [edi], 0
jne 0x408629
push 2
call fcn.0046b90c
add esp, 4
mov dword [edi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [edi + 4], ecx
mov ebx, dword [edi]
push 0x20a
mov byte [edi + 8], 1
mov dword [edi + 4], 0
call fcn.0046b90c
xor ecx, ecx
mov dword [edi], eax
add esp, 4
xor edx, edx
mov word [eax + 0x208], cx
test ebx, ebx
je 0x40869e
cmp word [ebx], cx
je 0x408667
nop dword [eax]
inc edx
cmp word [ebx + edx*2], cx
jne 0x408660
xor esi, esi
cmp edx, 0x104
jle 0x40867b
mov edx, 0x104
mov dword [ebp - 0x34], edx
jmp 0x408682
mov dword [ebp - 0x34], edx
test edx, edx
jle 0x40869e
mov ecx, dword [edi]
mov ax, word [ebx + esi*2]
mov word [ecx + esi*2], ax
inc esi
cmp esi, edx
jl 0x408682
mov eax, dword [edi]
xor edx, edx
mov ecx, dword [ebp - 0x34]
mov word [eax + ecx*2], dx
jmp 0x4086aa
mov eax, dword [edi]
xor ecx, ecx
mov word [eax + edx*2], cx
test ebx, ebx
je 0x4086b3
push ebx
call fcn.0046b303
add esp, 4
push 0
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFindOnPathW]
test eax, eax
je 0x4086c8
mov al, 1
jmp 0x408bc6
mov eax, dword [edi + 4]
test eax, eax
jne 0x4086eb
mov ecx, dword [edi]
test ecx, ecx
je 0x4086e8
cmp word [ecx], ax
je 0x4086e8
nop word [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x4086e0
mov dword [edi + 4], eax
cmp eax, 2
jl 0x408bc4
cmp dword [edi], 0
mov ecx, 1
jne 0x408712
push 2
call fcn.0046b90c
add esp, 4
mov dword [edi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [edi + 4], ecx
mov eax, dword [edi]
cmp word [eax + ecx*2], 0x3a
je 0x408bc4
push 0
push 1
push 1
push 0
push 0x49faa8
mov ecx, edi
call fcn.00402380
test eax, eax
jne 0x408bc4
push eax
push 1
push 1
push eax
push 0x49ff88
mov ecx, edi
call fcn.00402380
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x408775
mov eax, dword [edi + 4]
test eax, eax
jne 0x408771
mov ecx, dword [edi]
test ecx, ecx
je 0x40876e
cmp word [ecx], ax
je 0x40876e
inc eax
cmp word [ecx + eax*2], 0
jne 0x408766
mov dword [edi + 4], eax
inc eax
mov dword [ebp - 0x24], eax
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x14], 1
mov dword [ebp - 4], ebx
cmp dword [edi], ebx
jne 0x4087ad
push 2
call fcn.0046b90c
add esp, 4
mov dword [edi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [edi + 4], ecx
mov eax, dword [edi]
mov edx, 2
mov ecx, dword [ebp - 0x24]
dec ecx
mov byte [edi + 8], 1
test eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], ecx
setne byte [ebp - 0x14]
test eax, eax
je 0x408858
cmp ecx, 1
jge 0x4087eb
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp word [eax], cx
je 0x4087eb
nop
inc ecx
cmp word [eax + ecx*2], 0
jne 0x4087e0
mov dword [ebp - 0x20], ecx
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x2c], 0
lea eax, [ecx + 1]
mov byte [ebp - 4], 1
xor ecx, ecx
xor esi, esi
mul edx
mov dword [ebp - 0x18], esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edx, dword [ebp - 0x20]
add esp, 4
mov ebx, eax
mov dword [ebp - 0x1c], ebx
test edx, edx
jle 0x40884f
mov ecx, dword [ebp - 0x30]
sub eax, ecx
mov dword [ebp - 0x30], eax
mov ebx, eax
movzx eax, word [ecx]
mov edi, eax
mov dword [ebp - 0x30], edi
test ax, ax
je 0x40884c
inc esi
mov word [ebx + ecx], ax
add ecx, 2
mov dword [ebp - 0x18], esi
cmp esi, edx
jl 0x408830
mov ebx, dword [ebp - 0x1c]
xor eax, eax
mov word [ebx + esi*2], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x24]
cmp eax, 5
jl 0x40888b
add eax, 0xfffffffc
test ebx, ebx
jne 0x408880
push 2
call fcn.0046b90c
mov ebx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], ebx
xor esi, esi
mov dword [ebp - 0x18], esi
mov word [ebx], ax
cmp word [ebx + eax*2], 0x2e
je 0x40894c
mov byte [ebp - 0x14], 0
test esi, esi
jne 0x4088ab
test ebx, ebx
je 0x4088a8
cmp word [ebx], si
je 0x4088a8
nop dword [eax]
inc esi
cmp word [ebx + esi*2], 0
jne 0x4088a0
mov dword [ebp - 0x18], esi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + str..exe], 0
jne 0x4088b0
add esi, eax
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
add esp, 4
mov dword [ebp - 0x34], eax
mov edx, eax
test ebx, ebx
je 0x408911
movzx ecx, word [ebx]
mov edi, ecx
mov dword [ebp - 0x30], edi
test cx, cx
je 0x408911
mov edi, ebx
movzx ecx, cx
sub edi, eax
nop word [eax + eax]
mov word [edx], cx
add edx, 2
movzx eax, word [edx + edi]
mov ecx, eax
test ax, ax
jne 0x408900
mov edi, str..exe
mov ecx, 0x2e
sub edi, edx
nop dword [eax]
mov word [edx], cx
lea edx, [edx + 2]
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x408920
xor eax, eax
mov word [edx], ax
test ebx, ebx
je 0x408943
push ebx
call fcn.0046b303
add esp, 4
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x14], 0
test esi, esi
jne 0x40896b
test ebx, ebx
je 0x408968
cmp word [ebx], si
je 0x408968
nop dword [eax]
inc esi
cmp word [ebx + esi*2], 0
jne 0x408960
mov dword [ebp - 0x18], esi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + str.HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_], 0
jne 0x408970
add eax, esi
xor ecx, ecx
mov dword [ebp - 0x34], eax
mov edx, 2
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edi, str.HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
mov dword [ebp - 0x30], eax
add esp, 4
mov edx, ebx
mov ecx, eax
mov esi, 0x48
sub edi, eax
nop
mov word [ecx], si
add ecx, 2
movzx eax, word [edi + ecx]
mov esi, eax
test ax, ax
jne 0x4089b0
mov edi, dword [ebp - 0x38]
test ebx, ebx
je 0x4089e3
movzx eax, word [ebx]
mov esi, eax
test ax, ax
je 0x4089e3
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x4089d2
xor eax, eax
mov word [ecx], ax
test ebx, ebx
je 0x4089f5
push ebx
call fcn.0046b303
add esp, 4
mov ebx, dword [ebp - 0x30]
mov edx, 0x20019
mov eax, dword [ebp - 0x34]
push ecx
mov ecx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x14], 1
call fcn.004054e0
mov esi, eax
mov dword [ebp - 0x28], esi
push ebx
mov byte [ebp - 4], 2
call fcn.0046b303
xor eax, eax
mov byte [ebp - 0x14], 1
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
test esi, esi
je 0x408b9e
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0
lea eax, [ebp - 0x24]
push eax
push 0
push 0x49fab0
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408b9e
mov eax, dword [ebp - 0x24]
cmp eax, 1
je 0x408a77
cmp eax, 2
je 0x408a77
cmp eax, 7
jne 0x408b9e
mov eax, dword [ebp - 0x20]
xor ecx, ecx
add eax, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], eax
mov edx, 2
shr eax, 1
mov dword [ebp - 0x30], eax
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov ebx, eax
mov byte [ebp - 0x14], 1
mov eax, dword [ebp - 0x30]
xor ecx, ecx
add esp, 4
mov dword [ebp - 0x34], ebx
mov word [ebx + eax*2], cx
mov word [ebx], cx
mov dword [ebx + eax*2 - 4], ecx
lea eax, [ebp - 0x20]
push eax
push ebx
push ecx
push ecx
push 0x49fab0
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408b9e
cmp dword [ebp - 0x24], 7
jne 0x408b0f
mov ecx, dword [ebp - 0x30]
cmp ecx, 3
jbe 0x408b0f
mov byte [ebp - 0x14], 1
add ecx, 0xffffffff
je 0x408b0f
lea edi, [eax + 0xa]
xor edx, edx
cmp dx, word [ebx + eax*2]
jne 0x408b07
cmp word [ebx + eax*2 + 2], dx
je 0x408b07
mov word [ebx + eax*2], di
inc eax
cmp eax, ecx
jb 0x408af4
mov edi, dword [ebp - 0x38]
xor eax, eax
cmp word [ebx], ax
je 0x408b1e
inc eax
cmp word [ebx + eax*2], 0
jne 0x408b16
mov dword [ebp - 0x18], eax
test eax, eax
je 0x408b9e
xor eax, eax
mov byte [ebp - 0x14], 1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
test eax, eax
je 0x408b43
push eax
call fcn.0046b303
add esp, 4
mov dword [edi], ebx
mov dword [edi + 4], 0
mov byte [edi + 8], 1
test ebx, ebx
je 0x408b99
push 0x2000
call fcn.0046b90c
add esp, 4
mov ebx, eax
push 0x1000
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x408b86
push ebx
call fcn.0046b303
mov bl, byte [edi + 8]
add esp, 4
jmp 0x408ba4
push dword [edi]
call fcn.0046b303
mov eax, dword [ebp - 0x30]
add esp, 4
dec eax
mov dword [edi], ebx
mov dword [edi + 4], eax
mov bl, byte [edi + 8]
jmp 0x408ba4
xor bl, bl
test esi, esi
je 0x408bb0
cmp esi, 0xffffffff
je 0x408bb0
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x408bc0
push eax
call fcn.0046b303
add esp, 4
mov al, bl
jmp 0x408bc6
xor al, al
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.0046b2f5
mov esp, ebp
pop ebp
ret