Function at 0x408490
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5354b1
mov eax, dword fs:[0]
push eax
sub esp, 0x418
mov eax, dword [0x586f40]
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 esi, ecx
xor ebx, ebx
mov dword [ebp - 0x414], ebx
push 0x3fe
lea ecx, [ebp - 0x40e]
xor eax, eax
push ebx
mov dword [ebp - 4], ebx
push ecx
mov word [ebp - 0x410], ax
call fcn.005121a0
lea edx, [ebp - 0x410]
add esp, 0xc
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x4084f3
lea edx, [ebp - 0x410]
push 0x563cd4
push edx
call fcn.00510d26
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x408582
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x414]
push eax
push 0x20219
push ebx
lea ecx, [ebp - 0x410]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x408560
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov dword [ebp - 0x414], ebx
call esi
mov eax, dword [ebp - 0x414]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4088bb
mov ecx, dword [ebp - 0x414]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
push ebx
mov dword [ebp - 0x414], ebx
call esi
mov eax, 1
jmp 0x4088bd
xor edx, edx
mov word [edi], dx
add edi, 2
push 0x563cd4
push edi
call fcn.00510d26
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x4086df
call fcn.004133ab
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4085bc
push 0x80004005
call fcn.00406890
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x418], esi
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x414]
push ecx
push 0x20219
push ebx
lea edx, [ebp - 0x410]
push edx
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x408635
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp - 0x414], ebx
call edi
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408623
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x414]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4088bb
push edi
lea edx, [ebp - 0x414]
push edx
lea ebx, [ebp - 0x418]
call fcn.00406e20
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x408696
mov eax, dword [ebp - 0x414]
push eax
call esi
xor eax, eax
mov dword [ebp - 0x414], eax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x418]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408688
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x414]
push ecx
call esi
jmp 0x4088bb
mov edx, dword [ebp - 0x414]
push edx
call esi
xor eax, eax
mov dword [ebp - 0x414], eax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x418]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4086cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x414]
push ecx
call esi
mov eax, 1
jmp 0x4088bd
lea eax, [ebp - 0x414]
push eax
push 0x20219
xor edx, edx
push ebx
mov word [esi], dx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x410]
push ecx
push edx
add esi, 2
mov dword [ebp - 0x41c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40853e
push esi
call fcn.00510371
add esp, 4
mov dword [ebp - 0x420], eax
cmp eax, ebx
jbe 0x4087b2
lea ecx, [ebp - 0x418]
push ecx
mov ecx, dword [ebp - 0x414]
lea edx, [ebp - 0x41c]
push edx
lea eax, [ebp - 0x424]
push eax
push ebx
push edi
push ecx
mov dword [ebp - 0x424], 4
mov dword [ebp - 0x418], 4
mov dword [ebp - 0x41c], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x408789
mov edx, dword [ebp - 0x414]
push edx
call esi
push ebx
mov dword [ebp - 0x414], ebx
call esi
jmp 0x4088bb
mov eax, dword [ebp - 0x414]
push eax
call esi
mov ecx, dword [ebp - 0x420]
mov dword [ebp - 0x414], ebx
push ebx
cmp ecx, dword [ebp - 0x41c]
je 0x4086d3
call esi
jmp 0x4088bb
call fcn.004133ab
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4087cc
push 0x80004005
call fcn.00406890
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x418], eax
push edi
lea ecx, [ebp - 0x414]
push ecx
lea ebx, [ebp - 0x418]
mov byte [ebp - 4], 2
call fcn.00406e20
test eax, eax
jne 0x408827
mov edx, dword [ebp - 0x414]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov ecx, ebx
mov dword [ebp - 0x414], 0
call fcn.00406a10
mov eax, dword [ebp - 0x414]
push eax
call esi
jmp 0x4088bb
mov ecx, dword [ebp - 0x414]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x414], 0
cmp dword [eax - 4], 1
jle 0x408861
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x418]
call fcn.004065e0
mov eax, dword [ebp - 0x418]
mov ecx, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408889
test dx, dx
je 0x408885
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408889
add eax, 4
add ecx, 4
test dx, dx
jne 0x408863
xor eax, eax
jmp 0x40888e
sbb eax, eax
sbb eax, 0xffffffff
lea ecx, [ebp - 0x418]
test eax, eax
jne 0x4088ad
call fcn.00406a10
mov eax, dword [ebp - 0x414]
push eax
call edi
mov eax, 1
jmp 0x4088bd
call fcn.00406a10
mov ecx, dword [ebp - 0x414]
push ecx
call edi
xor eax, eax
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.0051026e
mov esp, ebp
pop ebp
ret