Function at 0x4159f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4973ad
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x4c63ac]
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, dword [ebp + 8]
lea ecx, [ebp - 0x28]
mov esi, dword [ebp + 0xc]
xor eax, eax
push 0x22
mov dword [ebp - 0x28], 0
push str.SYSTEMCurrentControlSetServices_
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.00402db0
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
mov dword [ebp - 4], 0
jb 0x415a63
mov esi, dword [esi]
push eax
push esi
lea ecx, [ebp - 0x28]
call fcn.00402c30
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x2c]
push ecx
push 0x20019
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0x28]
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x415b26
mov dword [edi], 0
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x415ace
cmp eax, 0xffffffff
je 0x415ace
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x415b08
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x415afe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x415cee
push edx
push ecx
call fcn.0046d9fd
add esp, 8
mov eax, edi
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.0046dc6a
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push 0
push 0
push 0
push str.ImagePath
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x415aa2
mov ecx, dword [ebp - 0x34]
shr ecx, 1
inc ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
cmp ecx, 0x7fffffff
ja 0x415cf3
lea ebx, [ecx + ecx]
mov dword [ebp - 0x38], ebx
cmp ebx, 0x1000
jb 0x415ba6
lea eax, [ebx + 0x23]
cmp eax, ebx
jbe 0x415cf8
push eax
call fcn.0046d9cd
add esp, 4
test eax, eax
je 0x415cee
mov ecx, dword [ebp - 0x30]
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x415bbc
test ebx, ebx
je 0x415bba
push ebx
call fcn.0046d9cd
mov ecx, dword [ebp - 0x30]
add esp, 4
mov esi, eax
jmp 0x415bbc
xor esi, esi
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x30], 0
mov ax, word [eax]
lea edx, [ebp - 0x30]
add ebx, esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x44], ebx
cmp ax, word [edx]
jne 0x415be9
push dword [ebp - 0x38]
push 0
push esi
call fcn.0046f980
add esp, 0xc
jmp 0x415bf9
xor eax, eax
mov edi, esi
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x48], ebx
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 2
push eax
push esi
push 0
push 0
push str.ImagePath
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x415c5d
push esi
mov ecx, edi
call fcn.00403330
test esi, esi
je 0x415abb
sub ebx, esi
and ebx, 0xfffffffe
cmp ebx, 0x1000
jb 0x415c4e
mov ecx, dword [esi - 4]
add ebx, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x415cee
mov esi, ecx
push ebx
push esi
call fcn.0046d9fd
add esp, 8
jmp 0x415abb
xor eax, eax
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
test esi, esi
je 0x415ca3
sub ebx, esi
and ebx, 0xfffffffe
cmp ebx, 0x1000
jb 0x415c99
mov ecx, dword [esi - 4]
add ebx, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x415cee
mov esi, ecx
push ebx
push esi
call fcn.0046d9fd
add esp, 8
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x415cb6
cmp eax, 0xffffffff
je 0x415cb6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x415b08
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x415afe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x415afe
call fcn.00478f8e
call fcn.00402a00
call fcn.004029d0
int3