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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x186c170d
mov eax, dword fs:[0]
push eax
mov eax, 0x18300
call fcn.18615d60
mov eax, dword [0x1870626c]
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 ebx, ecx
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x18248], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1823c], eax
lea eax, [ebp - 0x18234]
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x18238], 0x4000
push eax
lea eax, [ebp - 0x18230]
mov dword [ebp - 0x18234], 0x104
push eax
push esi
lea eax, [ebp - 0x18238]
mov dword [ebp - 0x1824c], esi
push eax
lea eax, [ebp - 0x8218]
push eax
push esi
push dword [ebx + 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
xor edi, edi
inc edi
mov dword [ebp - 0x1822c], edi
jmp 0x186d137e
mov eax, dword [ebx]
mov eax, dword [eax + 4]
cmp dword [ebx + eax + 0x4c], esi
je 0x186d0e40
lea ecx, [ebx + eax]
lea eax, [ebp - 0x8218]
push eax
mov eax, dword [ecx]
push esi
call dword [eax + 0x18]
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + ebx + 0x4c]
call fcn.186a0fb3
cmp dword [ebp - 0x18230], 1
je 0x186d0e56
cmp dword [ebp - 0x18230], 2
jne 0x186d1333
xor eax, eax
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x18218]
push 0xfffe
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 0x18248]
lea ecx, [ebp - 0x1821c]
mov esi, eax
call fcn.185b0640
xor eax, eax
lea ecx, [ebp - 0x18224]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x8218]
push eax
call fcn.185b0640
mov ecx, 0x1885e1fc
mov byte [ebp - 4], 1
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x1824c]
jne 0x186d0eab
sub ecx, edx
sar ecx, 1
push ecx
push 0x1885e1fc
lea ecx, [ebp - 0x1821c]
call fcn.185b4a40
push dword [ebp - 0x1823c]
call fcn.185c226d
pop ecx
push eax
push dword [ebp - 0x1823c]
lea ecx, [ebp - 0x1821c]
call fcn.185b4a40
cmp esi, 0xfffe
ja 0x186d113d
test esi, esi
je 0x186d113d
lea eax, [ebp - 0x18218]
push eax
lea ecx, [ebp - 0x18240]
call fcn.185b0640
mov eax, dword [ebx]
xor esi, esi
push esi
push dword [ebp - 0x18240]
mov byte [ebp - 4], 7
mov ecx, dword [eax + 8]
add ecx, ebx
call fcn.186cc2b9
test al, al
jne 0x186d110a
push dword [ebp - 0x18224]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x186d102d
push 0x2c
call fcn.1861577c
pop ecx
mov dword [ebp - 0x18250], eax
mov byte [ebp - 4], 8
test eax, eax
je 0x186d10eb
push dword [ebp - 0x18230]
mov dword [ebp - 0x18264], esi
push ecx
mov esi, esp
mov dword [ebp - 0x18244], esp
mov dword [ebp - 0x18220], esi
mov eax, dword [ebp - 0x18224]
add eax, 0xfffffff0
mov dword [ebp - 0x18268], 0x18635009
push eax
mov dword [ebp - 0x18260], 4
call fcn.185b096f
add eax, 0x10
mov dword [esi], eax
mov esi, esp
mov dword [ebp - 0x18220], esp
mov dword [ebp - 0x18228], esi
mov eax, dword [ebp - 0x1821c]
add eax, 0xfffffff0
mov byte [ebp - 4], 9
push eax
call fcn.185b096f
add eax, 0x10
pop ecx
mov dword [esi], eax
xor eax, eax
mov byte [ebp - 4], 0xa
push eax
mov eax, dword [ebx]
push 2
push 2
mov ecx, dword [eax + 4]
add ecx, ebx
mov eax, dword [ecx]
call dword [eax + 0x18]
lea esi, [ebp - 0x18268]
lea edi, [ebp - 0x1829c]
movsd dword es:[edi], dword [esi]
push eax
push 6
pop ecx
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x182e4]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x182a4]
lea edi, [ebp - 0x182dc]
rep movsd dword es:[edi], dword [esi]
push ecx
mov ecx, esp
mov dword [ebp - 0x182c4], ebx
push eax
call fcn.186a0d4a
mov ecx, dword [ebp - 0x18250]
mov byte [ebp - 4], 8
call fcn.1869cc30
jmp 0x186d10e1
push 0x24
call fcn.1861577c
pop ecx
mov dword [ebp - 0x18254], eax
mov byte [ebp - 4], 0xb
test eax, eax
je 0x186d10eb
push ecx
mov dword [ebp - 0x18270], esi
mov esi, esp
mov dword [ebp - 0x18220], esi
mov eax, dword [ebp - 0x1821c]
add eax, 0xfffffff0
mov dword [ebp - 0x18228], esp
push eax
mov dword [ebp - 0x18274], 0x18635009
mov dword [ebp - 0x1826c], 4
call fcn.185b096f
add eax, 0x10
pop ecx
mov dword [esi], eax
xor eax, eax
mov byte [ebp - 4], 0xc
push eax
mov eax, dword [ebx]
push 2
push 1
mov ecx, dword [eax + 4]
add ecx, ebx
mov eax, dword [ecx]
call dword [eax + 0x18]
lea esi, [ebp - 0x18274]
lea edi, [ebp - 0x182b4]
movsd dword es:[edi], dword [esi]
push eax
push 6
pop ecx
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x1830c]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x182bc]
lea edi, [ebp - 0x18304]
rep movsd dword es:[edi], dword [esi]
push ecx
mov ecx, esp
mov dword [ebp - 0x182ec], ebx
push eax
call fcn.186a0d4a
mov ecx, dword [ebp - 0x18254]
mov byte [ebp - 4], 0xb
call fcn.1869cb00
mov edi, dword [ebp - 0x1822c]
xor esi, esi
jmp 0x186d10ed
mov eax, esi
sub esp, 0xc
mov byte [ebp - 4], 7
mov ecx, esp
push eax
call fcn.186a0d85
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + ebx + 0x50]
call fcn.18699080
mov ecx, dword [ebp - 0x18240]
lea ecx, [ecx - 0x10]
call fcn.185ae8d0
mov ecx, dword [ebp - 0x18224]
lea ecx, [ecx - 0x10]
call fcn.185ae8d0
mov ecx, dword [ebp - 0x1821c]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.185ae8d0
jmp 0x186d1333
push dword [ebp - 0x18224]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x186d1236
push 0x2c
call fcn.1861577c
pop ecx
mov dword [ebp - 0x18258], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x186d12f2
push dword [ebp - 0x18230]
xor edi, edi
mov dword [ebp - 0x18280], 0x18635009
push ecx
mov esi, esp
mov dword [ebp - 0x18228], esp
mov dword [ebp - 0x18220], esi
mov eax, dword [ebp - 0x18224]
add eax, 0xfffffff0
mov dword [ebp - 0x1827c], edi
push eax
mov dword [ebp - 0x18278], 4
call fcn.185b096f
add eax, 0x10
mov dword [esi], eax
mov esi, esp
mov dword [ebp - 0x18220], esp
mov dword [ebp - 0x18244], esi
mov eax, dword [ebp - 0x1821c]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
push eax
call fcn.185b096f
add eax, 0x10
pop ecx
mov dword [esi], eax
mov eax, dword [ebx]
push edi
push 2
push 2
mov ecx, dword [eax + 4]
add ecx, ebx
mov byte [ebp - 4], 4
mov eax, dword [ecx]
call dword [eax + 0x18]
lea esi, [ebp - 0x18280]
lea edi, [ebp - 0x182b4]
movsd dword es:[edi], dword [esi]
push eax
push 6
pop ecx
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x1830c]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x182bc]
lea edi, [ebp - 0x18304]
rep movsd dword es:[edi], dword [esi]
push ecx
mov ecx, esp
mov dword [ebp - 0x182ec], ebx
push eax
call fcn.186a0d4a
mov ecx, dword [ebp - 0x18258]
mov byte [ebp - 4], 2
call fcn.1869cc30
jmp 0x186d12ea
push 0x24
call fcn.1861577c
pop ecx
mov dword [ebp - 0x1825c], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x186d12f2
push ecx
mov esi, esp
mov dword [ebp - 0x18228], esp
mov dword [ebp - 0x18220], esi
xor edi, edi
mov eax, dword [ebp - 0x1821c]
add eax, 0xfffffff0
mov dword [ebp - 0x1828c], 0x18635009
push eax
mov dword [ebp - 0x18288], edi
mov dword [ebp - 0x18284], 4
call fcn.185b096f
add eax, 0x10
pop ecx
mov dword [esi], eax
mov eax, dword [ebx]
push edi
push 2
push 1
mov ecx, dword [eax + 4]
add ecx, ebx
mov byte [ebp - 4], 6
mov eax, dword [ecx]
call dword [eax + 0x18]
lea esi, [ebp - 0x1828c]
lea edi, [ebp - 0x1829c]
movsd dword es:[edi], dword [esi]
push eax
push 6
pop ecx
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x182e4]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x182a4]
lea edi, [ebp - 0x182dc]
rep movsd dword es:[edi], dword [esi]
push ecx
mov ecx, esp
mov dword [ebp - 0x182c4], ebx
push eax
call fcn.186a0d4a
mov ecx, dword [ebp - 0x1825c]
mov byte [ebp - 4], 5
call fcn.1869cb00
mov edi, dword [ebp - 0x1822c]
jmp 0x186d12f4
xor eax, eax
sub esp, 0xc
mov byte [ebp - 4], 1
mov ecx, esp
push eax
call fcn.186a0d85
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + ebx + 0x50]
call fcn.18699080
mov ecx, dword [ebp - 0x18224]
lea ecx, [ecx - 0x10]
call fcn.185ae8d0
mov ecx, dword [ebp - 0x1821c]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.185ae8d0
xor esi, esi
lea ecx, [ebp - 0x18234]
mov dword [ebp - 0x18238], 0x4000
push ecx
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x18234], 0x104
push ecx
lea ecx, [ebp - 0x18230]
mov eax, edi
push ecx
push esi
lea ecx, [ebp - 0x18238]
inc edi
push ecx
lea ecx, [ebp - 0x8218]
mov dword [ebp - 0x1822c], edi
push ecx
push eax
push dword [ebx + 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x186d0e16
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.18615399
leave
ret 0xc