Function at 0x409320
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5af0f0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x623fcc]
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, edx
mov esi, ecx
mov dword [ebp - 0x18], esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], ebx
call fcn.00416c73
mov ecx, eax
test ecx, ecx
je 0x4095d3
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push 0x6029b8
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
call fcn.00404490
test al, al
jne 0x40939c
push 0
push 0x6029b8
lea ecx, [ebp - 0x14]
call fcn.004048f0
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 1
push eax
push 1
push 0
push dword [edi]
mov dword [ebp - 0x1c], 0
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x409437
call fcn.00416c73
mov ecx, eax
test ecx, ecx
je 0x4095dd
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
push 0x6029b8
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.00404490
test al, al
jne 0x40940c
push 0
push 0x6029b8
mov ecx, esi
call fcn.004048f0
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edi, dword [ebp - 0x14]
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4095b5
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4095b5
lea eax, [ebp - 0x20]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push dword [ebx]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x1c]
call ebx
test eax, eax
je 0x4094be
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.00416c73
mov ecx, eax
test ecx, ecx
je 0x4095e7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
push 0x6029b8
mov ecx, esi
mov byte [ebp - 4], 3
call fcn.00404490
test al, al
jne 0x409498
push 0
push 0x6029b8
mov ecx, esi
call fcn.004048f0
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4095b5
mov ecx, dword [edx]
push edx
jmp 0x4095b0
mov eax, dword [ebp - 0x18]
sub eax, 1
jne 0x409537
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00414eea
push dword [ebp - 0x20]
mov edi, eax
push 0
push edi
call fcn.005836e0
add esp, 0x10
lea eax, [ebp - 0x20]
push eax
push edi
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
push 0
push dword [eax]
push dword [ebp - 0x1c]
call ebx
test eax, eax
jne 0x40952e
test edi, edi
jne 0x409510
xor ecx, ecx
jmp 0x409524
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409515
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x14]
call fcn.004048f0
push edi
call fcn.00414ee5
add esp, 4
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x14]
add edi, 0xfffffff0
mov ecx, dword [edi]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x409563
cmp ecx, dword [edi]
jne 0x409563
mov ebx, edi
lock inc dword [eax]
jmp 0x409592
mov eax, dword [ecx]
push 2
push dword [edi + 4]
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x4095f1
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
lea eax, [edi + 0x10]
mov ecx, dword [edi + 4]
inc ecx
push ecx
push eax
push ecx
lea eax, [ebx + 0x10]
push eax
call fcn.00404810
add esp, 0x10
lea eax, [ebx + 0x10]
mov dword [ebp - 4], 0xffffffff
mov dword [esi], eax
lea ecx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4095b5
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 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.0054f3d2
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004048a0
push 0x80004005
call fcn.004048a0
push 0x80004005
call fcn.004048a0
call fcn.00404720
int3