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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x593eb3
mov eax, dword fs:[0]
push eax
mov eax, 0x106f8
call fcn.00540100
mov eax, dword [0x5fae30]
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 ecx, dword [ebp + 0xc]
xor ebx, ebx
push ebx
push 0x5b6e20
mov dword [ebp - 0x10704], ecx
call fcn.00403594
push 0x57
xor esi, esi
push str.SYSTEMCurrentControlSetServicesWinSock2ParametersProtocol_Catalog9Catalog_Entries
lea ecx, [ebp - 0x1043c]
mov dword [ebp - 0x106ec], esi
mov dword [ebp - 0x10428], 0xf
mov dword [ebp - 0x1042c], ebx
mov byte [ebp - 0x1043c], bl
call fcn.00402a36
cmp dword [ebp + 8], 2
mov dword [ebp - 4], ebx
jne 0x4a6b53
push 2
push 0x5b6e24
lea ecx, [ebp - 0x1043c]
call fcn.00403dd2
cmp dword [ebp - 0x10428], 0x10
mov eax, dword [ebp - 0x1043c]
jae 0x4a6b68
lea eax, [ebp - 0x1043c]
lea ecx, [ebp - 0x106f0]
push ecx
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4a6dda
mov ecx, dword [ebp - 0x106f0]
push ebx
push ebx
push ebx
push ebx
lea edx, [ebp - 0x106f4]
push edx
lea eax, [ebp - 0x218]
push eax
push ebx
push ecx
mov dword [ebp - 0x106fc], ebx
mov dword [ebp - 0x106f4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4a6dcd
mov ecx, dword [ebp - 0x106f0]
lea edx, [ebp - 0x106f8]
push edx
lea eax, [ebp - 0x218]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4a6d88
push 0xffff
lea edx, [ebp - 0x10420]
push ebx
push edx
call fcn.005409b0
mov edx, dword [ebp - 0x106f8]
add esp, 0xc
lea eax, [ebp - 0x10700]
push eax
lea ecx, [ebp - 0x10420]
push ecx
push ebx
push ebx
push str.PackedCatalogItem
push edx
mov dword [ebp - 0x10700], 0xffff
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4a6d7b
mov ecx, 0x41
lea esi, [ebp - 0x10420]
lea edi, [ebp - 0x114]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x9d
lea esi, [ebp - 0x1031c]
lea edi, [ebp - 0x106e8]
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x102f4], ebx
jne 0x4a6d7b
lea eax, [ebp - 0x10674]
push 0x5b6e94
push eax
call fcn.00543260
add esp, 8
test eax, eax
jne 0x4a6d74
or dword [ebp - 0x106ec], 1
lea eax, [ebp - 0x114]
mov dword [ebp - 0x10444], 0xf
mov dword [ebp - 0x10448], ebx
mov byte [ebp - 0x10458], bl
lea edx, [eax + 1]
jmp 0x4a6ca0
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4a6ca0
sub eax, edx
push eax
lea ecx, [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x10458]
call fcn.00402a36
lea edx, [ebp - 0x10458]
push edx
lea eax, [ebp - 0x10474]
push eax
mov byte [ebp - 4], 1
call fcn.00405097
mov edi, 8
add esp, 8
cmp dword [eax + 0x14], edi
jb 0x4a6ce2
mov eax, dword [eax]
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
cmp dword [ebp - 0x10460], edi
jb 0x4a6d0e
mov edx, dword [ebp - 0x10474]
push edx
call fcn.0053ed60
add esp, 4
xor eax, eax
cmp dword [ebp - 0x10444], 0x10
mov dword [ebp - 0x10460], 7
mov dword [ebp - 0x10464], ebx
mov word [ebp - 0x10474], ax
mov byte [ebp - 4], bl
jb 0x4a6d42
mov ecx, dword [ebp - 0x10458]
push ecx
call fcn.0053ed60
add esp, 4
cmp esi, ebx
je 0x4a6d7b
lea eax, [ebp - 0x420]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4a6d50
mov ecx, dword [ebp - 0x10704]
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x420]
push edx
call fcn.00403594
jmp 0x4a6d7b
or dword [ebp - 0x106ec], 2
mov eax, dword [ebp - 0x106f8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x106fc]
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x106f4]
push ecx
inc eax
lea edx, [ebp - 0x218]
push edx
push eax
mov dword [ebp - 0x106fc], eax
mov eax, dword [ebp - 0x106f0]
push eax
mov dword [ebp - 0x106f4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4a6bbb
mov esi, dword [ebp - 0x106ec]
mov ecx, dword [ebp - 0x106f0]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x10428], 0x10
jb 0x4a6df2
mov edx, dword [ebp - 0x1043c]
push edx
call fcn.0053ed60
add esp, 4
mov eax, esi
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.0053fd20
mov esp, ebp
pop ebp
ret