Function at 0x403940
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56db51
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x5d2fec]
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 ebx, ecx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x238], 0
mov dword [ebp - 4], 1
push 0x5af8f0
mov dword [ebx], 0
call fcn.00406840
lea eax, [ebp + 8]
mov dword [ebp - 0x238], 1
push eax
lea eax, [ebp - 0x224]
mov dword [ebp - 0x224], 0
push 0x5af8dc
push eax
call fcn.00406490
push str.InprocServer32
lea eax, [ebp - 0x224]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00406a20
add esp, 0x18
lea ecx, [ebp - 0x230]
push ecx
push 0x101
push 0
push dword [eax]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [ebp - 0x220]
or esi, 0xffffffff
mov edi, eax
add edx, 0xfffffff0
mov ecx, esi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x403a22
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x20a
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x22c], 1
push 0
push eax
call fcn.00551910
add esp, 0xc
mov dword [ebp - 0x228], 0x20a
test edi, edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
je 0x403b12
push dword [ebp - 0x230]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x220]
push str.Wow6432Node_
push eax
call fcn.00406490
add esp, 0xc
push eax
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 3
call fcn.00406cf0
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403ab2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.InprocServer32
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00406a20
add esp, 0xc
lea ecx, [ebp - 0x230]
push ecx
push 1
push 0
push dword [eax]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [ebp - 0x220]
mov ecx, esi
mov dword [ebp - 0x234], eax
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x403b0e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x234]
test eax, eax
jne 0x403b4c
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0
push 0
push dword [ebp - 0x230]
call edi
test eax, eax
jne 0x403b4c
lea eax, [ebp - 0x21c]
push eax
push 0x5af300
push ebx
call fcn.00406ff0
add esp, 0xc
mov eax, dword [ebx]
mov ecx, 0x5af8f0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403b79
test dx, dx
je 0x403b75
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403b79
add eax, 4
add ecx, 4
test dx, dx
jne 0x403b53
xor eax, eax
jmp 0x403b7e
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
je 0x403c7f
push dword [ebp - 0x230]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x234]
push 0x5af8dc
push eax
call fcn.00406490
add esp, 0xc
push eax
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 4
call fcn.00406cf0
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403be0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.LocalServer32
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00406a20
add esp, 0xc
lea ecx, [ebp - 0x230]
push ecx
push 0x101
push 0
push dword [eax]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [ebp - 0x234]
mov edi, eax
add edx, 0xfffffff0
mov ecx, esi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x403c35
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x403c7f
lea eax, [ebp - 0x228]
mov dword [ebp - 0x228], 0x20a
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
push edi
push edi
push dword [ebp - 0x230]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403c7f
lea eax, [ebp - 0x21c]
push eax
push 0x5af300
push ebx
call fcn.00406ff0
add esp, 0xc
push ebx
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x220], 0
call fcn.004069a0
mov byte [ebp - 4], 5
mov esi, dword [ebp - 0x220]
mov edi, dword [esi - 0xc]
test edi, edi
jns 0x403cb0
push 0x80070057
call fcn.00407010
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x403cd3
push edi
lea ecx, [ebp - 0x220]
call fcn.00406e60
mov esi, dword [ebp - 0x220]
lea eax, [edi + 1]
push eax
push esi
call fcn.00556e6f
add esp, 8
cmp edi, dword [esi - 8]
jg 0x403ca6
xor eax, eax
mov dword [esi - 0xc], edi
mov word [esi + edi*2], ax
cmp dword [esi - 0xc], eax
jl 0x403deb
push str.mscoree.dll
push esi
call fcn.00550fb4
add esp, 8
test eax, eax
je 0x403deb
sub eax, esi
sar eax, 1
js 0x403deb
lea eax, [ebp - 0x228]
mov dword [ebp - 0x228], 0x20a
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0
push str.CodeBase
push dword [ebp - 0x230]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403deb
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
push 0x5af300
push eax
call fcn.00406ff0
add esp, 0xc
lea eax, [ebp - 0x220]
mov ecx, ebx
push eax
call fcn.00406cf0
lea ecx, [ebp - 0x220]
call fcn.00405c10
mov esi, dword [ebp - 0x220]
cmp dword [esi - 0xc], 0
jl 0x403deb
push str.file:___
push esi
call fcn.00550fb4
add esp, 8
test eax, eax
je 0x403deb
sub eax, esi
sar eax, 1
jne 0x403deb
push 8
lea eax, [ebp - 0x234]
mov ecx, ebx
push eax
call fcn.00405be0
push eax
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00406cf0
mov byte [ebp - 4], 5
or edi, 0xffffffff
mov edx, dword [ebp - 0x234]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403dee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403dee
or edi, 0xffffffff
push dword [ebp - 0x230]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403e15
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403e36
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x403e52
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.0054e73a
mov esp, ebp
pop ebp
ret