Function at 0x420340
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x503251
mov eax, dword fs:[0]
push eax
sub esp, 0x820
mov eax, dword [0x54a708]
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 edi, ecx
cmp word [0x553a10], 0
jne 0x42059f
cmp word [0x554a10], 0
jne 0x420486
cmp dword [edi + 0x2c], 8
lea eax, [edi + 0x18]
mov dword [ebp - 0x82c], 0
mov dword [ebp - 0x828], 0
mov dword [ebp - 0x824], 0
jb 0x4203b5
mov eax, dword [eax]
push 0x20219
push eax
push dword [edi + 0x30]
lea ecx, [ebp - 0x82c]
call fcn.0040fa50
mov ebx, dword [ebp - 0x82c]
test eax, eax
jne 0x42047b
lea eax, [ebp - 0x818]
mov dword [ebp - 0x818], 0x800
push eax
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x820]
push eax
push 0
push str.Setup_Path
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x42047b
mov eax, dword [ebp - 0x820]
cmp eax, 1
je 0x420418
cmp eax, 2
jne 0x42047b
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x420435
test al, 1
jne 0x42047b
shr eax, 1
cmp word [ebp + eax*2 - 0x812], 0
je 0x42043e
jmp 0x42047b
xor eax, eax
mov word [ebp - 0x810], ax
mov ecx, 0x554a10
lea esi, [ebp - 0x810]
mov edx, 0x3ff
sub esi, ecx
lea eax, [edx + 0x7ffffbff]
test eax, eax
je 0x42046e
movzx eax, word [esi + ecx]
test ax, ax
je 0x42046e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x420450
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
test ebx, ebx
je 0x420486
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.004205e0
mov ecx, eax
test ecx, ecx
je 0x4205c0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
push 0x554a10
lea ecx, [ebp - 0x814]
mov dword [ebp - 4], 0
call fcn.00404c1b
test al, al
jne 0x4204e6
mov ecx, 0x554a10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4204c6
sub ecx, edx
sar ecx, 1
push ecx
push 0x554a10
lea ecx, [ebp - 0x814]
call fcn.00405497
push 0x50b988
lea ecx, [ebp - 0x814]
mov dword [ebp - 4], 1
call fcn.00420260
cmp dword [edi + 0x14], 8
jb 0x420505
mov edi, dword [edi]
push edi
lea ecx, [ebp - 0x814]
call fcn.00420260
call fcn.004205e0
mov ecx, eax
test ecx, ecx
je 0x4205ca
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x81c], eax
lea eax, [ebp - 0x81c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x814]
push eax
call fcn.00420690
mov esi, dword [ebp - 0x81c]
add esp, 8
push 0x3ff
push esi
push 0x553a10
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42057d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x814]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x42059f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 0x553a10
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.00496914
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404bfe
push 0x80004005
call fcn.00404bfe
int3