Function at 0x1008a6f
Capabilities:
Persist via run registry key
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor esi, esi
cmp dword [ebp + 0xc], esi
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
push 0x1002410
je 0x1008a97
push 0x80000001
jmp 0x1008a9c
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
jne 0x1008b83
cmp dword [ebp - 4], esi
je 0x1008b83
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp + 8]
mov dword [ebp - 0xc], esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1008b5b
cmp dword [ebp - 0x10], 1
je 0x1008ae6
cmp dword [ebp - 0x10], 2
jne 0x1008b5b
push dword [ebp - 0xc]
push 0x40
call ebx
mov edi, eax
cmp edi, esi
je 0x1008b5b
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1008b54
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1008b3e
lea eax, [esi + esi + 2]
push eax
push 0x40
call ebx
push esi
push eax
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1008b43
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 8], edi
jmp 0x1008b50
mov eax, dword [ebp - 8]
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
jmp 0x1008b5b
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x1008b83
cmp word [eax], si
jne 0x1008b7a
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 8], esi
cmp dword [ebp - 8], esi
jne 0x1008c5a
cmp dword [ebp + 0xc], esi
lea eax, [ebp - 4]
push eax
push 0x1002388
je 0x1008b98
push 0x80000001
jmp 0x1008b9d
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, esi
jne 0x1008c55
cmp dword [ebp - 4], esi
je 0x1008c55
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp + 8]
mov dword [ebp - 0xc], esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1008c4c
cmp dword [ebp - 0x10], 1
je 0x1008bdd
cmp dword [ebp - 0x10], 2
jne 0x1008c4c
push dword [ebp - 0xc]
push 0x40
call ebx
mov edi, eax
cmp edi, esi
je 0x1008c4c
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1008c45
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1008c32
lea eax, [esi + esi + 2]
push eax
push 0x40
call ebx
push esi
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1008c37
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 8], edi
jmp 0x1008c41
push edi
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
jmp 0x1008c4c
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], esi
je 0x1008c6c
mov eax, dword [ebp - 8]
cmp word [eax], si
jne 0x1008c6c
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 8], esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 8