Function at 0x40b410
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x85c
mov eax, dword [0x420034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
call fcn.00408160
test al, al
mov ecx, 0x200
cmovne ebx, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
mov dword [ebp - 0x83c], 0
call sub.MSVCR110.dll_memset
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0xc
lea eax, [ebp - 0x83c]
push eax
mov eax, ebx
or eax, 1
push eax
push 0
push 0x412d28
push 0x80000002
mov dword [ebp - 0x82c], 0x104
call edi
test eax, eax
jne 0x40b4d0
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x834]
push eax
push 0
push str.path
push dword [ebp - 0x83c]
mov dword [ebp - 0x834], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x83c]
test eax, eax
je 0x40b4e3
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040dc0a
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b4f4
sub ecx, edx
sar ecx, 1
je 0x40b4d0
call fcn.00408160
test al, al
mov ecx, 0x100
cmovne ebx, ecx
lea eax, [ebp - 0x838]
push eax
mov eax, ebx
or eax, 9
push eax
push 0
push str.SystemCurrentControlSetServices
push 0x80000002
mov dword [ebp - 0x844], ebx
mov dword [ebp - 0x838], 0
call edi
test eax, eax
jne 0x40b7eb
push 0x206
xor ebx, ebx
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x416]
push ebx
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0x82c]
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x418]
push eax
push ebx
push dword [ebp - 0x838]
mov dword [ebp - 0x82c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x40b7e3
mov edi, dword [sym.imp.MSVCR110.dll__wcsicmp]
nop
inc ebx
test eax, eax
jne 0x40b7ab
mov dword [ebp - 0x85c], str.iSafeService
mov dword [ebp - 0x858], str.iSafeKrnl
mov dword [ebp - 0x854], str.iSafeNetFilter
mov dword [ebp - 0x850], str.iSafeKrnlBoot
mov dword [ebp - 0x84c], str.iSafeKrnlKit
mov dword [ebp - 0x848], str.iSafeKrnlR3
xor esi, esi
jmp 0x40b5f0
push dword [ebp + esi*4 - 0x85c]
lea eax, [ebp - 0x418]
push eax
call edi
add esp, 8
test eax, eax
je 0x40b7a5
inc esi
cmp esi, 6
jb 0x40b5f0
lea eax, [ebp - 0x840]
push eax
mov eax, dword [ebp - 0x844]
or eax, 1
push eax
push 0
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x838]
mov dword [ebp - 0x840], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b7a5
push 0x206
push eax
mov word [ebp - 0x828], ax
lea eax, [ebp - 0x826]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x830]
push eax
push 0
push str.ImagePath
push dword [ebp - 0x840]
mov dword [ebp - 0x82c], 0x208
mov dword [ebp - 0x830], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40b6b8
push dword [ebp - 0x840]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
jmp 0x40b7ab
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b6c1
mov esi, dword [sym.imp.MSVCR110.dll__wcsnicmp]
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x828]
push eax
call esi
add esp, 0xc
test eax, eax
je 0x40b72e
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b6f7
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x820]
push eax
call esi
add esp, 0xc
test eax, eax
je 0x40b72e
push dword [ebp - 0x840]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
jmp 0x40b7ab
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x620], ax
lea eax, [ebp - 0x61e]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0x620]
push str.SystemCurrentControlSetServices
push 0x104
push eax
call dword [sym.imp.MSVCR110.dll_wcscpy_s]
mov esi, dword [sym.imp.MSVCR110.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x620]
push 0x41481c
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x620]
push 0x104
push eax
call esi
add esp, 0xc
lea edx, [ebp - 0x620]
call fcn.0040b3a0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x418]
push eax
push ebx
push dword [ebp - 0x838]
mov dword [ebp - 0x82c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
jne 0x40b5a0
push dword [ebp - 0x838]
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0040dc0a
mov esp, ebp
pop ebp
ret