Function at 0x40dca0
Capabilities:
Create service
Delete registry key
Manipulate safe mode programs
Modify service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59b2ef
mov eax, dword fs:[0]
push eax
mov eax, 0x25c4
call fcn.00555880
mov eax, dword [0x618190]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x242c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2430], eax
xor eax, eax
mov dword [ebp - 4], 3
mov dword [ebp - 0x25c8], eax
mov eax, dword [0x627970]
test eax, eax
je 0x40e17d
lea ecx, [ebp - 0x25c0]
mov dword [ebp - 0x25c0], 0x11c
push ecx
call eax
cmp dword [ebp - 0x25b0], 2
jne 0x40e17d
cmp dword [ebp - 0x25bc], 5
jb 0x40e17d
push 0x40c
lea eax, [ebp - 0x424]
mov dword [ebp - 0x428], 0x22
push 0
push eax
call fcn.005557a0
add esp, 0xc
lea eax, [ebp + 0x18]
cmp dword [ebp + 0x2c], 8
cmovae eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x428]
push 0x208
push eax
call fcn.00553bbd
add esp, 0xc
lea eax, [ebp - 0x428]
push str.___service
push 0x208
push eax
call fcn.00553bbd
xor eax, eax
mov dword [ebp - 0x25cc], 0
add esp, 0xc
mov dword [ebp - 0x248c], 7
mov dword [ebp - 0x2490], 0
mov word [ebp - 0x24a0], ax
mov dword [ebp - 0x2474], 0xf
mov dword [ebp - 0x2478], eax
mov byte [ebp - 0x2488], al
mov dword [ebp - 0x245c], 7
mov dword [ebp - 0x2460], eax
mov word [ebp - 0x2470], ax
mov dword [ebp - 0x2444], 0xf
mov dword [ebp - 0x2448], eax
mov byte [ebp - 0x2458], al
push eax
push 0x5ed1d8
lea ecx, [ebp - 0x24a0]
mov byte [ebp - 4], 7
call fcn.0041f200
mov byte [ebp - 4], 8
test edi, edi
je 0x40df0e
xor eax, eax
xorps xmm0, xmm0
movq qword [ebp - 0x243c], xmm0
mov dword [ebp - 0x2434], eax
mov word [ebp - 0x18], ax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
mov dword [ebp - 0x243c], eax
mov dword [ebp - 0x2438], eax
mov dword [ebp - 0x2434], eax
push edi
lea ecx, [ebp - 0x243c]
mov byte [ebp - 4], 9
call fcn.00413790
mov ebx, dword [ebp - 0x2438]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x243c]
mov ecx, ebx
sub ecx, esi
imul ecx
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
test edi, edi
jle 0x40deb8
add esi, 0x10
mov edi, edi
mov ecx, dword [esi]
test ecx, ecx
je 0x40deb2
cmp dword [esi + 4], 8
jb 0x40de91
mov eax, dword [esi - 0x10]
jmp 0x40de94
lea eax, [esi - 0x10]
push ecx
push eax
lea ecx, [ebp - 0x24a0]
call fcn.004145d0
push 1
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x24a0]
call fcn.004145d0
add esi, 0x60
dec edi
jne 0x40de80
push 2
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x24a0]
call fcn.004145d0
cmp dword [ebp - 0x248c], 8
lea esi, [ebp - 0x24a0]
cmovae esi, dword [ebp - 0x24a0]
mov byte [ebp - 4], 8
mov edi, dword [ebp - 0x243c]
mov dword [ebp - 0x25cc], esi
test edi, edi
je 0x40df0e
mov esi, edi
cmp edi, ebx
je 0x40df05
mov ecx, esi
call fcn.00402150
add esi, 0x60
cmp esi, ebx
jne 0x40def7
push edi
call fcn.0043b833
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x40df33
lea ecx, [ebp - 0x24a0]
call fcn.00402150
jmp 0x40e4a0
cmp dword [ebp + 0xe8], 0
jne 0x40df7c
cmp dword [ebp + 0x8c], 8
lea edx, [ebp + 0x78]
cmovae edx, dword [ebp + 0x78]
cmp word [edx], 0
jne 0x40df54
xor ecx, ecx
jmp 0x40df6f
mov ecx, edx
lea esi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40df60
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 0xd8]
call fcn.0041f200
cmp dword [ebp + 0x148], 0
jne 0x40dfcc
cmp dword [ebp + 0xec], 8
lea edx, [ebp + 0xd8]
cmovae edx, dword [ebp + 0xd8]
cmp word [edx], 0
jne 0x40dfa3
xor ecx, ecx
jmp 0x40dfbf
mov ecx, edx
lea esi, [ecx + 2]
jmp 0x40dfb0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40dfb0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 0x138]
call fcn.0041f200
cmp dword [ebp + 0x8c], 8
lea eax, [ebp + 0x78]
push 0xf01ff
cmovae eax, dword [ebp + 0x78]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x40e053
cmp dword [ebp + 0xec], 8
lea edx, [ebp - 0x428]
push 0
push 0
push dword [ebp - 0x25cc]
lea ecx, [ebp + 0xd8]
cmovae ecx, dword [ebp + 0xd8]
lea eax, [ebp + 0x78]
cmp dword [ebp + 0x8c], 8
push 0
push dword [ebp - 0x2430]
cmovae eax, dword [ebp + 0x78]
push edx
push 1
push dword [ebp - 0x242c]
push 0x110
push 0xf01ff
push ecx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
je 0x40e163
push 0x2000
lea eax, [ebp - 0x2428]
mov dword [ebp - 0x25c4], 0
push 0
push eax
call fcn.005557a0
add esp, 0xc
lea eax, [ebp - 0x25c4]
push eax
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x40e160
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40e160
mov eax, dword [ebp - 0x25c4]
cmp eax, 0x2000
jbe 0x40e0d4
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0043b82a
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x40e160
mov eax, dword [ebp - 0x25c4]
jmp 0x40e0da
lea ecx, [ebp - 0x2428]
lea edx, [ebp - 0x25c4]
push edx
push eax
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x40e160
cmp dword [ebp + 0xec], 8
lea eax, [ebp + 0xd8]
cmovae eax, dword [ebp + 0xd8]
push eax
push 0
push 0
push dword [ebp - 0x25cc]
lea eax, [ebp - 0x428]
push 0
push dword [ebp - 0x2430]
push eax
push 1
push dword [ebp - 0x242c]
push 0x110
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
cmp dword [ebp + 0x14c], 8
mov dword [ebp - 0x25c8], eax
lea eax, [ebp + 0x138]
cmovae eax, dword [ebp + 0x138]
mov dword [ebp - 0x242c], eax
lea eax, [ebp - 0x242c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push esi
call edi
push ebx
call edi
lea ecx, [ebp - 0x24a0]
mov byte [ebp - 4], 3
call fcn.00402150
mov ebx, dword [ebp - 0x25c8]
jmp 0x40e19d
push 0
sub esp, 0x60
lea eax, [esi + 0x238]
mov ecx, esp
push eax
call fcn.004021f0
call fcn.0040db20
mov ebx, eax
mov dword [ebp - 0x25c8], ebx
test ebx, ebx
je 0x40e4a0
xor eax, eax
mov dword [ebp - 0x25c4], 0
mov dword [ebp - 0x248c], 7
mov dword [ebp - 0x2490], 0
mov word [ebp - 0x24a0], ax
mov dword [ebp - 0x2474], 0xf
mov dword [ebp - 0x2478], eax
mov byte [ebp - 0x2488], al
mov dword [ebp - 0x245c], 7
mov dword [ebp - 0x2460], eax
mov word [ebp - 0x2470], ax
mov dword [ebp - 0x2444], 0xf
mov dword [ebp - 0x2448], eax
mov byte [ebp - 0x2458], al
push eax
push 0x5ed1d8
lea ecx, [ebp - 0x24a0]
mov byte [ebp - 4], 0xd
call fcn.0041f200
mov ebx, dword [ebp + 0xc]
lea ecx, [ebp - 0x24a0]
mov byte [ebp - 4], 0xe
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test bl, 1
je 0x40e30e
push 0x32
push 0x5ea340
call fcn.0041f200
cmp dword [ebp + 0x8c], 8
lea edx, [ebp + 0x78]
cmovae edx, dword [ebp + 0x78]
cmp word [edx], 0
jne 0x40e26a
xor ecx, ecx
jmp 0x40e288
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x242c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e275
sub ecx, dword [ebp - 0x242c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x24a0]
call fcn.004145d0
cmp dword [ebp - 0x248c], 8
lea ecx, [ebp - 0x2430]
push ecx
lea ecx, [ebp - 0x25c4]
mov dword [ebp - 0x2430], 0
push ecx
push 0
push 0xf003f
push 0
push 0
lea eax, [ebp - 0x24a0]
cmovae eax, dword [ebp - 0x24a0]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40e368
cmp dword [ebp + 0x8c], 8
lea ecx, [ebp + 0x78]
mov eax, dword [ebp + 0x88]
cmovae ecx, dword [ebp + 0x78]
add eax, eax
push eax
push ecx
push 1
push 0
push 0
push dword [ebp - 0x25c4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x40e360
push 0x31
push str.SYSTEMCurrentControlSetControlSafeBootMinimal
call fcn.0041f200
cmp dword [ebp - 0x248c], 8
lea ecx, [ebp - 0x25c4]
push ecx
push 2
lea eax, [ebp - 0x24a0]
cmovae eax, dword [ebp - 0x24a0]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e368
cmp dword [ebp + 0x8c], 8
lea eax, [ebp + 0x78]
cmovae eax, dword [ebp + 0x78]
push eax
push dword [ebp - 0x25c4]
call edi
push dword [ebp - 0x25c4]
call esi
lea ecx, [ebp - 0x24a0]
test bl, 2
je 0x40e435
push 0x32
push str.SYSTEMCurrentControlSetControlSafeBootNetwork_
call fcn.0041f200
cmp dword [ebp + 0x8c], 8
lea edx, [ebp + 0x78]
cmovae edx, dword [ebp + 0x78]
cmp word [edx], 0
jne 0x40e39b
xor ecx, ecx
jmp 0x40e3af
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e3a0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x24a0]
call fcn.004145d0
cmp dword [ebp - 0x248c], 8
lea ecx, [ebp - 0x242c]
push ecx
lea ecx, [ebp - 0x25c4]
mov dword [ebp - 0x242c], 0
push ecx
push 0
push 0xf003f
push 0
push 0
lea eax, [ebp - 0x24a0]
cmovae eax, dword [ebp - 0x24a0]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40e48f
cmp dword [ebp + 0x8c], 8
lea ecx, [ebp + 0x78]
mov eax, dword [ebp + 0x88]
cmovae ecx, dword [ebp + 0x78]
add eax, eax
push eax
push ecx
push 1
push 0
push 0
push dword [ebp - 0x25c4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x40e487
push 0x31
push str.SYSTEMCurrentControlSetControlSafeBootNetwork
call fcn.0041f200
cmp dword [ebp - 0x248c], 8
lea ecx, [ebp - 0x25c4]
push ecx
push 2
lea eax, [ebp - 0x24a0]
cmovae eax, dword [ebp - 0x24a0]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e48f
cmp dword [ebp + 0x8c], 8
lea eax, [ebp + 0x78]
cmovae eax, dword [ebp + 0x78]
push eax
push dword [ebp - 0x25c4]
call edi
push dword [ebp - 0x25c4]
call esi
lea ecx, [ebp - 0x24a0]
call fcn.00402150
mov ebx, dword [ebp - 0x25c8]
lea ecx, [ebp + 0x18]
call fcn.00402150
lea ecx, [ebp + 0x78]
call fcn.00402150
lea ecx, [ebp + 0xd8]
call fcn.00402150
lea ecx, [ebp + 0x138]
call fcn.00402150
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00550cb3
mov esp, ebp
pop ebp
ret 0x190