Function at 0x402000
Capabilities:
Create service
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x636148]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
mov esi, edx
test ebx, ebx
je 0x402314
test esi, esi
je 0x402314
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
push 0
test edi, edi
jne 0x40205a
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042cd1d
mov esp, ebp
pop ebp
ret
push 0
push str.FltMgr
push 0
push str.FSFilter_Activity_Monitor
push esi
push 1
push 1
push 2
push 0xf01ff
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x4020c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
cmp eax, 0x431
jne 0x4020b1
call esi
push edi
call esi
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042cd1d
mov esp, ebp
pop ebp
ret
call esi
push edi
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042cd1d
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push edi
call esi
push str.SYSTEMControlSet001Services_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00459960
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
push str.Instances
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
add esp, 0x24
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push 0xf003f
push 0
push 0x62be94
push 0
lea eax, [ebp - 0x20c]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4020b6
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00459960
push str._Instance
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
lea ecx, [ebp - 0x20c]
add esp, 0x18
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402182
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push str.DefaultInstance
push dword [ebp - 0x210]
call esi
test eax, eax
jne 0x4020b6
push dword [ebp - 0x210]
mov edi, dword [sym.imp.ADVAPI32.dll_RegFlushKey]
call edi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.SYSTEMControlSet001Services_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00459960
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
push str.Instances_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
push str._Instance
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004598eb
add esp, 0x3c
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push 0xf003f
push 0
push 0x62be94
push 0
lea eax, [ebp - 0x20c]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4020b6
push str.382630
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00459960
lea ecx, [ebp - 0x20c]
add esp, 0xc
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4022a0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push str.Altitude
push dword [ebp - 0x210]
call esi
test eax, eax
jne 0x4020b6
push 4
mov dword [ebp - 0x214], eax
lea eax, [ebp - 0x214]
push eax
push 4
push 0
push str.Flags
push dword [ebp - 0x210]
call esi
test eax, eax
jne 0x4020b6
push dword [ebp - 0x210]
call edi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40209b
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.0042cd1d
mov esp, ebp
pop ebp
ret