Function at 0x46f780
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x508c49
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x56a078]
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 0x46f7e0
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], edx
mov word [esi], ax
mov dword [ebp - 4], eax
jmp 0x46fa5c
cmp dword [edi + 0x14], 8
jb 0x46f7ea
mov eax, dword [edi]
jmp 0x46f7ec
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 0x46fa46
cmp dword [ebp - 0x4c], eax
je 0x46fa46
mov eax, dword [ebp - 0x50]
cmp eax, 1
je 0x46f822
cmp eax, 2
jne 0x46fa46
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 0x46f888
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 0x46f93b
or eax, 0xffffffff
sub ebx, ecx
sub eax, ecx
cmp eax, ebx
ja 0x46f89d
push str.string_too_long
call fcn.004cdbf9
lea edx, [ecx + ebx]
mov dword [ebp - 0x54], edx
test ebx, ebx
je 0x46f93b
cmp edx, 0x7ffffffe
jbe 0x46f8bd
push str.string_too_long
call fcn.004cdbf9
cmp dword [ebp - 0x18], edx
jae 0x46f8d1
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040492c
mov edx, dword [ebp - 0x54]
jmp 0x46f8e8
test edx, edx
jne 0x46f8ed
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 0x46f93b
lea eax, [ebp - 0x2c]
cmp ebx, 1
jne 0x46f90c
cmp dword [ebp - 0x18], 8
cmovae eax, dword [ebp - 0x2c]
xor ebx, ebx
mov word [eax + ecx*2], bx
jmp 0x46f927
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 0x46f94e
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 0x46fa31
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x44]
call fcn.00404b6e
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x46f9c0
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 0x46f9c0
lea ecx, [edx - 1]
cmp ecx, edx
ja 0x46f9b3
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 0x46f9c0
sub ecx, edx
push 0
push ecx
lea ecx, [ebp - 0x44]
call fcn.0040439f
lea eax, [ebp - 0x44]
mov ecx, esi
push eax
call fcn.0040eeea
mov dword [ebp - 0x48], 1
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x30]
cmp eax, 8
jb 0x46f9ed
inc eax
push 2
push eax
push dword [ebp - 0x44]
call fcn.00404a33
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 0x46fa1b
push 2
inc eax
push eax
push dword [ebp - 0x2c]
call fcn.00404a33
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
jmp 0x46fa63
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
jmp 0x46f9cb
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.004d014c
mov esp, ebp
pop ebp
ret 0xc