Function at 0x40fa40
Capabilities:
Check if file exists
Get common file path
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x870
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x868], eax
push ebp
push esi
push edi
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x2a]
push ecx
mov dword [esp + 0x1c], 0
mov word [esp + 0x2c], ax
call fcn.004416b0
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x232]
push eax
mov word [esp + 0x234], dx
call fcn.004416b0
add esp, 0xc
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 0
call fcn.00407be0
test eax, eax
je 0x40faed
mov eax, dword [0x496710]
test eax, eax
je 0x40fac2
lea ecx, [esp + 0x10]
push ecx
jmp 0x40faeb
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40faed
push str.Wow64DisableWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x496710], eax
test eax, eax
je 0x40faed
lea edx, [esp + 0x10]
push edx
call eax
push 0x104
lea eax, [esp + 0x654]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [esp + 0x650]
push ecx
push str.szSystemDir:__s
call fcn.00404c20
mov ebp, dword [sym.imp.SHLWAPI.dll_SHGetValueW]
add esp, 8
mov esi, 0x458120
mov dword [esp + 0xc], 8
jmp 0x40fb30
lea edi, [esi - 0x80]
mov ecx, edi
call fcn.004082f0
test eax, eax
jne 0x40fbb1
lea edx, [esi + 0x80]
push edx
lea eax, [esp + 0x654]
push eax
push str._sdrivers_s
lea ecx, [esp + 0x43c]
push 0x104
push ecx
call fcn.0043ed50
add esp, 0x14
lea edx, [esp + 0x430]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40fb93
lea eax, [esp + 0x430]
push eax
push str.szDriverPath__s_is_not_exist
call fcn.00404c20
add esp, 8
jmp 0x40fca1
push 1
push 1
lea ecx, [esp + 0x438]
push ecx
push 0
push esi
mov eax, edi
call fcn.00408240
add esp, 0x14
jmp 0x40fca1
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40fbb6
sub eax, edx
sar eax, 1
je 0x40fca1
push edi
push str.SYSTEMCurrentControlSetServices
push 0x47903c
lea edx, [esp + 0x2c]
push 0x104
push edx
call fcn.0043ed50
add esp, 0x14
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x22c]
push ecx
lea edx, [esp + 0x20]
push edx
push str.Group
lea eax, [esp + 0x30]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], 0x208
mov dword [esp + 0x30], 1
call ebp
test eax, eax
jne 0x40fc57
mov ecx, esi
lea eax, [esp + 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40fc4e
test dx, dx
je 0x40fc4a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40fc4e
add eax, 4
add ecx, 4
test dx, dx
jne 0x40fc28
xor eax, eax
jmp 0x40fc53
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40fca1
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40fc60
sub eax, edx
sar eax, 1
add eax, eax
push eax
push esi
push 1
push str.Group
lea ecx, [esp + 0x30]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], eax
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
test eax, eax
jne 0x40fca1
push esi
push edi
push str._nSet_Group_key_services__ws__value:__ws
call fcn.00404c20
add esp, 0xc
add esi, 0x184
sub dword [esp + 0xc], 1
jne 0x40fb30
cmp dword [0x49670c], 0
mov dword [esp + 0xc], 0
jne 0x40fcec
push 0x479958
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x40fce3
push 0x479974
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49670c], eax
cmp dword [0x49670c], 0
je 0x40fd5b
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x49670c]
test eax, eax
je 0x40fd5b
cmp dword [esp + 0xc], 0
je 0x40fd5b
mov ecx, dword [0x496714]
mov eax, dword [esp + 0x10]
mov esi, eax
test ecx, ecx
je 0x40fd34
push eax
call ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x868]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x870
ret
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40fd5b
push str.Wow64RevertWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x496714], eax
test eax, eax
je 0x40fd5b
push esi
call eax
mov ecx, dword [esp + 0x874]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0043e4c7
add esp, 0x870
ret