Function at 0x40163b
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push 0x28
mov eax, 0x411bf4
call fcn.00405aee
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 2
push 0x413718
lea ecx, [ebp - 0x14]
call fcn.00401228
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40167a
cmp dword [eax + 8], ebx
je 0x40167a
lea ecx, [ebp - 0x14]
call fcn.004012eb
jmp 0x40167c
xor eax, eax
cmp eax, ebx
jne 0x4016a9
push str.Protected_Application
lea ecx, [ebp - 0x28]
call fcn.00401228
mov byte [ebp - 4], 4
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401404
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.004011ea
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x4016bf
cmp dword [eax + 8], ebx
je 0x4016bf
lea ecx, [ebp - 0x14]
call fcn.004012eb
jmp 0x4016c1
xor eax, eax
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push str.SYSTEMCurrentControlSetServicesEventLogApplication_1_s_
call fcn.00401228
mov byte [ebp - 4], 5
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 3
call fcn.00403525
add esp, 0xc
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x18]
call fcn.00401404
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.004011ea
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x401715
cmp dword [eax + 8], ebx
je 0x401715
lea ecx, [ebp - 0x18]
call fcn.004012eb
jmp 0x401717
xor eax, eax
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x401766
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.004011ea
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x18]
call fcn.004011ea
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004011ea
mov eax, 0xc0000001
call fcn.00405b8d
ret
mov dword [ebp - 0x10], ebx
mov byte [ebp - 4], 8
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x24]
push eax
push ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
mov esi, 0x413648
push esi
push dword [ebp - 0x1c]
call edi
cmp eax, ebx
jne 0x4017d5
mov eax, dword [ebp - 0x24]
cmp eax, ebx
jbe 0x4017d5
shr eax, 1
push eax
lea ecx, [ebp - 0x10]
call fcn.0040161f
lea ecx, [ebp - 0x10]
call fcn.00401517
lea ecx, [ebp - 0x24]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push esi
push dword [ebp - 0x1c]
call edi
lea ecx, [ebp - 0x10]
mov edi, eax
call fcn.00401318
lea ecx, [ebp - 0x10]
call fcn.00401344
cmp edi, ebx
je 0x4017d5
push ebx
lea ecx, [ebp - 0x10]
call fcn.0040161f
mov eax, dword [ebp - 0x10]
cmp eax, ebx
jne 0x4017e0
xor eax, eax
jmp 0x4017e3
mov eax, dword [eax + 8]
shr eax, 1
mov ecx, eax
dec eax
neg ecx
sbb ecx, ecx
test eax, ecx
lea eax, [ebp + 8]
lea ecx, [ebp - 0x10]
jbe 0x401855
push 1
push 0xffffffffffffffff
push eax
call fcn.0040138b
cmp eax, 0xffffffff
jne 0x4018b3
push 0x413644
lea ecx, [ebp - 0x28]
call fcn.00401228
mov byte [ebp - 4], 9
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004015c1
add esp, 0xc
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x10]
call fcn.004031ee
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x30]
call fcn.004011ea
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x28]
call fcn.004011ea
jmp 0x40185b
push eax
call fcn.00401404
mov ecx, dword [ebp - 0x10]
cmp ecx, ebx
jne 0x401866
xor eax, eax
jmp 0x401869
mov eax, dword [ecx + 8]
shr eax, 1
cmp ecx, ebx
mov edi, eax
je 0x401880
cmp dword [ecx + 8], ebx
je 0x401880
lea ecx, [ebp - 0x10]
call fcn.004012eb
jmp 0x401882
xor eax, eax
mov ecx, edi
dec edi
neg ecx
sbb ecx, ecx
and ecx, edi
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push 2
push ebx
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4018b3
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10]
call fcn.004011ea
jmp 0x401738
push 4
pop edi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
mov esi, str.TypesSupported
push esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4018e9
mov eax, dword [ebp - 0x20]
and eax, 7
cmp al, 7
je 0x401940
or dword [ebp - 0x20], 7
jmp 0x4018f0
mov dword [ebp - 0x20], 7
push edi
lea eax, [ebp - 0x20]
push eax
push edi
push ebx
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x401940
mov esi, 0xc0000001
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10]
call fcn.004011ea
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.004011ea
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x18]
call fcn.004011ea
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004011ea
mov eax, esi
jmp 0x401760
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x40190a