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

Disassembly:
push ebp
lea ebp, [esp - 0x19c]
sub esp, 0x21c
mov eax, dword [0x41e280]
xor eax, ebp
mov dword [ebp + 0x198], eax
mov eax, dword [ebp + 0x1a4]
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x80], eax
cmp edi, ebx
je 0x4033c1
cmp eax, ebx
je 0x4033c1
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
jne 0x4030c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [ebp - 0x78], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xfffffffffffffffe
pop esi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
jmp 0x4033cc
push ebx
push ebx
push str.FltMgr
push ebx
push str.FSFilter_Activity_Monitor
push dword [ebp - 0x80]
push ebx
push 2
push 2
push 0xf01ff
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
jne 0x403118
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp - 0x78], eax
call edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
cmp eax, 0x431
jne 0x40310f
call edi
push esi
call edi
push 2
pop eax
jmp 0x4033cc
call edi
push esi
call edi
push 0xfffffffffffffffd
jmp 0x4030af
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call edi
push esi
call edi
push 0x208
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.0040dc60
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + str.SYSTEMCurrentControlSetServices_]
mov word [ebp + eax - 0x70], cx
inc eax
inc eax
cmp cx, bx
jne 0x403138
mov eax, dword [ebp - 0x78]
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x403150
sub eax, edx
lea edi, [ebp - 0x70]
dec edi
dec edi
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x403161
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x70]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x403181
push 5
pop ecx
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push ebx
mov esi, str.Instances
push 0xf003f
rep movsd dword es:[edi], dword [esi]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x70]
push eax
push 0x80000002
movsw word es:[edi], word [esi]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4031c3
push 0xfffffffffffffffc
jmp 0x403109
push 0x208
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.0040dc60
mov eax, dword [ebp - 0x78]
lea edx, [ebp - 0x70]
add esp, 0xc
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
cmp cx, bx
jne 0x4031dd
lea edi, [ebp - 0x70]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4031f0
push 5
pop ecx
mov esi, str._Instance
lea eax, [ebp - 0x70]
rep movsd dword es:[edi], dword [esi]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x40320b
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x70]
push eax
push 1
push ebx
push str.DefaultInstance
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40323e
push 0xfffffffffffffffb
jmp 0x403109
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x208
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.0040dc60
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + str.SYSTEMCurrentControlSetServices_]
mov word [ebp + eax - 0x70], cx
inc eax
inc eax
cmp cx, bx
jne 0x403264
mov eax, dword [ebp - 0x78]
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x40327c
sub eax, edx
push 0xfffffffffffffffe
mov esi, edx
lea edi, [ebp - 0x70]
pop edx
add edi, edx
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x403292
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x70]
add edi, edx
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4032b0
mov eax, dword [ebp - 0x78]
push 6
pop ecx
mov esi, str.Instances_
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x4032ca
lea edi, [ebp - 0x70]
sub eax, esi
add edi, edx
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x4032db
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x70]
add edi, edx
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4032f9
push 5
pop ecx
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
lea eax, [ebp - 0x70]
push eax
mov esi, str._Instance
push 0x80000002
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x403339
push 0xfffffffffffffffa
jmp 0x403109
xor eax, eax
movzx ecx, word [eax + str.370260]
mov word [ebp + eax - 0x70], cx
inc eax
inc eax
cmp cx, bx
jne 0x40333b
lea eax, [ebp - 0x70]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x403354
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x70]
push eax
push 1
push ebx
push str.Altitude
push dword [ebp - 0x74]
call esi
test eax, eax
je 0x403389
push 0xfffffffffffffff9
jmp 0x403109
push 4
lea eax, [ebp - 0x7c]
push eax
push 4
push ebx
push str.Flags
push dword [ebp - 0x74]
mov dword [ebp - 0x7c], ebx
call esi
test eax, eax
je 0x4033aa
push 0xfffffffffffffff8
jmp 0x403109
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
jmp 0x4033cc
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
mov ecx, dword [ebp + 0x198]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040937e
add ebp, 0x19c
leave
ret