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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1a18
call section.HTSTACK_
lea eax, [ebp - 0x818]
push 0x400
push 0
push eax
call fcn.660a9ab4
add esp, 0xc
lea eax, [ebp - 0x818]
push 0x800
push eax
push 0x660c5048
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x660a1852
push 0x660c5058
lea eax, [ebp - 0x818]
push eax
call fcn.660ac300
add esp, 8
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push 0x660c5060
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x660a1aa4
mov dword [ebp - 0xc], 0x800
lea ecx, [ebp - 8]
lea edx, [ebp - 0x1018]
lea eax, [ebp - 0xc]
push eax
push edx
push ecx
push 0
push 0x660c50e0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x660a1a81
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x660c5100
lea eax, [ebp - 0x1818]
push eax
call fcn.660ac340
lea edx, [ebp - 0x1818]
lea eax, [ebp - 0x1018]
push eax
push edx
call fcn.660ac300
add esp, 0x10
lea edx, [ebp - 0x1818]
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x660a1978
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xcb
jne 0x660a1a7a
lea edx, [ebp - 0x1018]
push 0x2e
push edx
call fcn.660ac250
add esp, 8
test eax, eax
je 0x660a1a56
push 0x660c5100
xor edx, edx
mov word [eax], dx
lea eax, [ebp - 0x1818]
push eax
call fcn.660ac340
lea edx, [ebp - 0x1818]
lea eax, [ebp - 0x1018]
push eax
push edx
call fcn.660ac300
add esp, 0x10
lea edx, [ebp - 0x1818]
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x660a18fb
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], 0x800
lea ecx, [ebp - 8]
lea edx, [ebp - 0x1018]
lea eax, [ebp - 0xc]
push eax
push edx
push ecx
push 0
push 0x660c5160
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x660a1a44
lea edx, [ebp - 0x818]
lea eax, [ebp - 0x1018]
push eax
push edx
call fcn.660ac300
push 0x660c5178
lea eax, [ebp - 0x818]
push eax
call fcn.660ac300
add esp, 0x10
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x818]
push eax
push 0x660c5048
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x660a19f5
mov eax, 0xd6
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x818]
mov dword [ebp - 0x18], eax
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x1a18]
push edx
push 0x100
push ecx
push 0x400
push 0xc0020031
push 0
push 0x3800
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [ebp - 0x1a18]
push eax
push section..data1
push 0x660c1760
call fcn.660abfb0
add esp, 0xc
xor eax, eax
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xd5
mov esp, ebp
pop ebp
ret
mov eax, ebx
mov ebx, dword [ebp - 0x10]
lea edx, [ebp - 0x1018]
mov dword [ebp - 0x18], edx
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.660a2840
add esp, 8
mov eax, 0xd4
mov esp, ebp
pop ebp
ret
mov eax, ebx
mov ebx, dword [ebp - 0x10]
jmp 0x660a1a5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push eax
call fcn.660a2840
add esp, 8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xd3
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push eax
call fcn.660a2840
add esp, 8
mov eax, 0xd2
mov esp, ebp
pop ebp
ret