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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x6102d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
push 0xf003f
push 0
push 0
mov ebx, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x408555
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045ef18
mov esp, ebp
pop ebp
ret
push esi
push 0
push 0
push str.FltMgr
push 0
push str.FSFilter_Activity_Monitor
push str.system32driversZHGameHallDrv.sys
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 0x4085cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
cmp eax, 0x431
jne 0x4085b3
call esi
push edi
call esi
pop esi
pop edi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045ef18
mov esp, ebp
pop ebp
ret
call esi
push edi
call esi
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045ef18
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.0057d5e7
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
push str.Instances
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
add esp, 0x24
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0xf003f
push 0
push 0x602fa8
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 0x4085b8
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057d5e7
push str._Instance
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
lea ecx, [ebp - 0x20c]
add esp, 0x18
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408684
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 - 0x214]
call esi
test eax, eax
jne 0x4085b8
push dword [ebp - 0x214]
mov edi, dword [sym.imp.ADVAPI32.dll_RegFlushKey]
call edi
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.SYSTEMControlSet001Services_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057d5e7
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
push str.Instances_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
push str._Instance
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057ff56
add esp, 0x3c
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0xf003f
push 0
push 0x602fa8
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 0x4085b8
push str.370786
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0057d5e7
lea ecx, [ebp - 0x20c]
add esp, 0xc
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4087a0
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 - 0x214]
call esi
test eax, eax
jne 0x4085b8
push 4
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x210]
push eax
push 4
push 0
push str.Flags
push dword [ebp - 0x214]
call esi
test eax, eax
jne 0x4085b8
push dword [ebp - 0x214]
call edi
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, 1
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.0045ef18
mov esp, ebp
pop ebp
ret