Function at 0x4164b0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45425e
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x46a180]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], 2
call fcn.004139e0
mov ecx, eax
test ecx, ecx
je 0x4166af
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 4
call fcn.004139e0
mov ecx, eax
test ecx, ecx
je 0x4166b9
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edi, dword [ebp + 8]
add eax, 0x10
mov byte [ebp - 4], 3
mov dword [edi], eax
push 0x459290
lea eax, [ebp - 0x14]
mov dword [ebp - 0x1c], 1
push str.SYSTEMCurrentControlSetServices_s
push eax
call fcn.00416340
add esp, 0xc
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
push 0x2001f
push ebx
push esi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x10], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x416577
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], eax
xor eax, eax
mov byte [ebp - 4], 3
test ecx, ecx
cmovne eax, ecx
test eax, eax
jne 0x416663
mov eax, dword [edi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x105
or ecx, eax
jge 0x4165ac
push 0x105
mov ecx, edi
call fcn.00413ae0
mov eax, dword [edi]
lea ecx, [ebp - 0x18]
push ecx
push eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
push 0
push str.ImagePath
push ebx
mov dword [ebp - 0x18], 0x20a
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x41661d
mov eax, dword [ebp - 0x20]
cmp eax, 1
je 0x4165ec
cmp eax, 2
je 0x4165ec
mov dword [ebp - 0x10], 0xd
jmp 0x41661d
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x416616
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x416611
test al, 1
jne 0x416608
shr eax, 1
cmp word [ecx + eax*2 - 2], 0
je 0x416616
mov dword [ebp - 0x10], 0xd
jmp 0x41661d
xor eax, eax
mov word [ecx], ax
mov dword [ebp - 0x10], 0
mov eax, dword [edi]
test eax, eax
jne 0x416627
xor ecx, ecx
jmp 0x416639
push dword [eax - 8]
push eax
call fcn.00439bd5
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4166a5
mov eax, dword [edi]
cmp ecx, dword [eax - 8]
jg 0x4166a5
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi]
mov word [eax + ecx*2], dx
cmp dword [ebp - 0x10], edx
jne 0x41669c
mov eax, dword [edi]
cmp dword [eax - 0xc], edx
je 0x41669c
push 0x459310
mov ecx, edi
call fcn.004176d0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41667b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x416686
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, edi
call fcn.00416290
jmp 0x416663
push 0x80070057
call fcn.00406380
push 0x80004005
call fcn.00406380
push 0x80004005
call fcn.00406380
int3