Function at 0x46ef20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x506229
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x5651c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x5c], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x48], 0
mov edx, dword [eax]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], edi
test edx, edx
jne 0x46ef80
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], edx
mov word [esi], ax
mov dword [ebp - 4], eax
jmp 0x46f1fc
cmp dword [edi + 0x14], 8
jb 0x46ef8a
mov eax, dword [edi]
jmp 0x46ef8c
mov eax, edi
lea ecx, [ebp - 0x4c]
push ecx
push 0
lea ecx, [ebp - 0x50]
push ecx
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x46f1e6
cmp dword [ebp - 0x4c], eax
je 0x46f1e6
mov eax, dword [ebp - 0x50]
cmp eax, 1
je 0x46efc2
cmp eax, 2
jne 0x46f1e6
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
mov dword [ebp - 4], 1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], eax
mov word [ebp - 0x44], ax
mov byte [ebp - 4], 2
mov ebx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x1c]
shr ebx, 1
cmp ebx, ecx
ja 0x46f028
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
mov word [eax + ebx*2], cx
jmp 0x46f0db
or eax, 0xffffffff
sub ebx, ecx
sub eax, ecx
cmp eax, ebx
ja 0x46f03d
push str.string_too_long
call fcn.004cc9ae
test ebx, ebx
je 0x46f0db
lea edx, [ecx + ebx]
mov dword [ebp - 0x54], edx
cmp edx, 0x7ffffffe
jbe 0x46f05d
push str.string_too_long
call fcn.004cc9ae
cmp dword [ebp - 0x18], edx
jae 0x46f071
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040494c
mov edx, dword [ebp - 0x54]
jmp 0x46f088
test edx, edx
jne 0x46f08d
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x1c]
test edx, edx
setne al
test al, al
je 0x46f0db
lea eax, [ebp - 0x2c]
cmp ebx, 1
jne 0x46f0ac
cmp dword [ebp - 0x18], 8
cmovae eax, dword [ebp - 0x2c]
xor ebx, ebx
mov word [eax + ecx*2], bx
jmp 0x46f0c7
cmp dword [ebp - 0x18], 8
cmovae eax, dword [ebp - 0x2c]
lea edi, [eax + ecx*2]
xor eax, eax
mov ecx, ebx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x58]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
mov word [eax + edx*2], cx
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
cmp dword [edi + 0x14], 8
jb 0x46f0ee
mov edi, dword [edi]
lea ecx, [ebp - 0x4c]
push ecx
push eax
mov eax, dword [ebp - 0x5c]
push 0
push 0
push edi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x46f1d1
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x44]
call fcn.00404b8e
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x46f160
mov edi, dword [ebp - 0x30]
lea eax, [ebp - 0x44]
mov ebx, dword [ebp - 0x44]
cmp edi, 8
cmovae eax, ebx
cmp word [eax + edx*2 - 2], 0
jne 0x46f160
lea ecx, [edx - 1]
cmp ecx, edx
ja 0x46f153
cmp edi, 8
mov dword [ebp - 0x34], ecx
lea eax, [ebp - 0x44]
cmovae eax, ebx
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x46f160
sub ecx, edx
push 0
push ecx
lea ecx, [ebp - 0x44]
call fcn.0040438f
lea eax, [ebp - 0x44]
mov ecx, esi
push eax
call fcn.0040f394
mov dword [ebp - 0x48], 1
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x30]
cmp eax, 8
jb 0x46f18d
inc eax
push 2
push eax
push dword [ebp - 0x44]
call fcn.00404a53
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x46f1bb
push 2
inc eax
push eax
push dword [ebp - 0x2c]
call fcn.00404a53
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
jmp 0x46f203
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
jmp 0x46f16b
mov dword [esi + 0x14], 7
xor eax, eax
mov dword [esi + 0x10], 0
mov word [esi], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x48], 1
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 - 0x14]
xor ecx, ebp
call fcn.004d207d
mov esp, ebp
pop ebp
ret 0xc