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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x667d00]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov esi, edx
push edi
test ebx, ebx
je 0x40218f
test esi, esi
je 0x40218f
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
push 0
test edi, edi
jne 0x4021a2
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.0059d38a
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 0x402211
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
cmp eax, 0x431
jne 0x4021f9
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.0059d38a
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.0059d38a
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.005b0c72
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
push str.Instances
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
add esp, 0x24
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push 0xf003f
push 0
push 0x6568d8
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 0x40218f
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005b0c72
push str._Instance
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
lea ecx, [ebp - 0x20c]
add esp, 0x18
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4022d0
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 0x40218f
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.005b0c72
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
push str.Instances_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
push str._Instance
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005bb5ea
add esp, 0x3c
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push 0xf003f
push 0
push 0x6568d8
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 0x40218f
push str.382631
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.005b0c72
lea ecx, [ebp - 0x20c]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4023e6
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 0x40218f
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 0x40218f
push dword [ebp - 0x210]
call edi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0059d38a
mov esp, ebp
pop ebp
ret