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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x78398c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1070c
call fcn.00564f40
mov eax, dword [0x856918]
xor eax, esp
mov dword [esp + 0x10708], eax
push ebx
push esi
push edi
mov eax, dword [0x856918]
xor eax, esp
push eax
lea eax, [esp + 0x10720]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0xc]
xor ebx, ebx
push ebx
push 0x7b3a18
mov dword [esp + 0x30], ecx
call fcn.00405ef2
push 0x57
xor esi, esi
push str.SYSTEMCurrentControlSetServicesWinSock2ParametersProtocol_Catalog9Catalog_Entries
lea ecx, [esp + 0x70]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x88], 0xf
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], bl
call fcn.00405920
cmp dword [ebp + 8], 2
mov dword [esp + 0x10728], ebx
jne 0x4aa1e2
push 2
push 0x7b3a1c
lea ecx, [esp + 0x70]
call fcn.004021c6
cmp dword [esp + 0x80], 0x10
mov eax, dword [esp + 0x6c]
jae 0x4aa1f4
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x18]
push ecx
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4aa43a
mov ecx, dword [esp + 0x18]
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x310]
push eax
push ebx
push ecx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4aa42f
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x300]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4aa3f5
push 0xffff
lea edx, [esp + 0x718]
push ebx
push edx
call fcn.00566330
mov edx, dword [esp + 0x30]
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x718]
push ecx
push ebx
push ebx
push str.PackedCatalogItem
push edx
mov dword [esp + 0x44], 0xffff
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4aa3ea
mov ecx, 0x41
lea esi, [esp + 0x714]
lea edi, [esp + 0x404]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x9d
lea esi, [esp + 0x818]
lea edi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x840], ebx
jne 0x4aa3ea
lea eax, [esp + 0xf8]
push 0x7b3a8c
push eax
call fcn.005680c6
add esp, 8
test eax, eax
jne 0x4aa3e5
or dword [esp + 0x14], 1
lea eax, [esp + 0x404]
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4aa316
sub eax, edx
push eax
lea ecx, [esp + 0x408]
push ecx
lea ecx, [esp + 0x38]
call fcn.00405920
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x10730], 1
call fcn.00406bef
mov edi, 8
add esp, 8
cmp dword [eax + 0x18], edi
jb 0x4aa35a
mov eax, dword [eax + 4]
jmp 0x4aa35d
add eax, 4
push 0x104
lea ecx, [esp + 0x510]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
cmp dword [esp + 0x64], edi
jb 0x4aa386
mov edx, dword [esp + 0x50]
push edx
call fcn.00564155
add esp, 4
xor eax, eax
cmp dword [esp + 0x48], 0x10
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], ax
mov byte [esp + 0x10728], bl
jb 0x4aa3b4
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00564155
add esp, 4
cmp esi, ebx
je 0x4aa3ea
lea eax, [esp + 0x50c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4aa3c2
mov ecx, dword [esp + 0x28]
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x510]
push edx
call fcn.00405ef2
jmp 0x4aa3ea
or dword [esp + 0x14], 2
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x20]
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x2c]
push ecx
inc eax
lea edx, [esp + 0x310]
push edx
push eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x34]
push eax
mov dword [esp + 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4aa23e
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x80], 0x10
jb 0x4aa451
mov edx, dword [esp + 0x6c]
push edx
call fcn.00564155
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x10720]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10708]
xor ecx, esp
call fcn.00564b24
mov esp, ebp
pop ebp
ret