Function at 0x41d1db
Capabilities:
Create service
Persist via run registry key
Persist via windows service
Set registry value

Disassembly:
mov eax, 0x4caf3c
call fcn.004bf1dc
sub esp, 0x794
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x20], esi
call fcn.0041a90d
test eax, eax
je 0x41d215
push str.NMSSvc_service_is_already_installed
push 0x503ff0
call fcn.00423100
pop ecx
pop ecx
push 1
pop eax
jmp 0x41d2df
call fcn.0041aa31
test eax, eax
je 0x41d4d7
mov edi, 0xf003f
xor ebx, ebx
push edi
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jne 0x41d2ee
add esi, 0x184
push esi
push str.Failed_to_open_Service_Control_Manger_while_installing__s
push 0x503ff0
call fcn.004234a0
mov al, byte [ebp - 0x11]
add esp, 0xc
lea ecx, [ebp - 0x50]
mov byte [ebp - 0x50], al
push ebx
call fcn.00406ad6
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
push 0x2166
lea ecx, [ebp - 0x50]
mov dword [ebp - 4], ebx
call fcn.0041a16a
mov al, byte [ebp - 0x11]
push ebx
lea ecx, [ebp - 0x38]
mov byte [ebp - 0x38], al
call fcn.00406ad6
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
push esi
lea eax, [ebp - 0x38]
push 0x216c
push eax
mov byte [ebp - 4], 1
call fcn.0041c3cf
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
cmp ecx, ebx
mov eax, 0x4d68e8
jne 0x41d2b4
mov ecx, eax
cmp dword [ebp - 0x34], ebx
je 0x41d2bc
mov eax, dword [ebp - 0x34]
push ebx
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], bl
call fcn.00405d6e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.00405d6e
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
lea eax, [ebp - 0x39c]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
push ebx
push str.RPCSS
push ebx
lea ecx, [ebp - 0x39c]
push ebx
push ecx
push 1
push 2
lea eax, [esi + 0x184]
push pe_nt_image_headers32
add esi, 0x84
push 0xf01ff
push eax
push esi
mov dword [ebp - 0x10], eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x41d3ed
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x10]
push str.Failed_to_create_service__s
push 0x503ff0
call fcn.004234a0
mov al, byte [ebp - 0x11]
add esp, 0xc
lea ecx, [ebp - 0x38]
mov byte [ebp - 0x38], al
push ebx
call fcn.00406ad6
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
push 0x2166
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 2
call fcn.0041a16a
lea eax, [ebp - 0x11]
lea ecx, [ebp - 0x50]
push eax
call fcn.0041dbef
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
push dword [ebp - 0x10]
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 3
push 0x216d
push eax
call fcn.0041c3cf
mov ecx, dword [ebp - 0x34]
add esp, 0xc
cmp ecx, ebx
mov eax, 0x4d68e8
jne 0x41d3c3
mov ecx, eax
cmp dword [ebp - 0x4c], ebx
je 0x41d3cb
mov eax, dword [ebp - 0x4c]
push ebx
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 2
call fcn.00405d6e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
jmp 0x41d2d8
call fcn.0041d5d6
test eax, eax
je 0x41d4bd
lea eax, [ebp - 0x7a0]
push 0x400
push eax
push 0x63
push dword [0x503c40]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x190]
push str.SYSTEMCurrentControlSetServices_
push eax
call fcn.004c02b0
lea eax, [ebp - 0x190]
push esi
push eax
call fcn.004c02c0
add esp, 0x10
lea eax, [ebp - 0x18]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
push eax
push edi
lea eax, [ebp - 0x190]
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x41d4af
lea ecx, [ebp - 0x10]
call fcn.0041a724
mov ecx, dword [ebp - 0x18]
cmp eax, ebx
mov dword [ebp - 0x10], ecx
jne 0x41d4af
lea eax, [ebp - 0x298]
push 0x104
push eax
push 0x1399
push dword [0x503c40]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x7a0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x7a0]
push eax
push 1
lea eax, [ebp - 0x298]
push ebx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp dword [ebp - 0x10], ebx
je 0x41d4bd
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x1c]
call esi
call fcn.00419e0a
jmp 0x41d20d
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x110], 1
jne 0x41d2dd
push 0xd
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionRunServices
pop ecx
lea edi, [ebp - 0x88]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, 0xf003f
lea eax, [ebp - 0x88]
push edi
mov esi, reloc.OLEAUT32.dll_SysReAllocString
xor ebx, ebx
push eax
push esi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.004198cc
test eax, eax
je 0x41d57c
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push edi
push ebx
push ebx
lea eax, [ebp - 0x88]
push ebx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x41d565
lea ecx, [ebp - 0x10]
call fcn.0041a724
mov ecx, dword [ebp - 0x18]
cmp eax, ebx
mov dword [ebp - 0x10], ecx
je 0x41d57c
cmp dword [ebp - 0x10], ebx
je 0x41d2dd
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41d2dd
lea eax, [ebp - 0x190]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x190]
push eax
mov eax, dword [ebp - 0x20]
push 1
add eax, 0x84
push ebx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
neg esi
sbb esi, esi
inc esi
cmp dword [ebp - 0x10], ebx
je 0x41d5cf
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x41d2df