Function at 0x4027e0
Capabilities:
Create service
Modify service
Persist via windows service
Set registry value
Start service

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x30]
push esi
push edi
push 0x411e94
push eax
mov ebx, ecx
mov esi, edx
xor edi, edi
call fcn.00403c1a
add esp, 8
test eax, eax
jne 0x402814
push str.Service_CAN_interact_with_the_desktop__can_have_a_GUI__n
call fcn.0040456b
mov edi, 0x100
jmp 0x40281e
push str.Service_CANNOT_interact_with_the_desktop__cannot_have_a_GUI__n
call fcn.0040456b
add esp, 4
push 0x411e94
push ebp
call fcn.00403c1a
add esp, 8
test eax, eax
jne 0x40283a
push str.Service_WILL_be_restarted_upon_termination_n
jmp 0x40283f
push str.Service_WILL_NOT_be_restarted_upon_termination_n
call fcn.0040456b
mov ecx, dword [esp + 0x40]
add esp, 4
push 0x411e94
push ecx
call fcn.00403c1a
add esp, 8
test eax, eax
jne 0x402864
push str.Service_WILL_run_only_once_n
jmp 0x402869
push str.Service_WILL_NOT_run_only_once_n
call fcn.0040456b
mov edx, dword [esp + 0x44]
add esp, 4
push 0x411e94
push edx
call fcn.00403c1a
add esp, 8
test eax, eax
jne 0x402894
push str.Service_WILL_issue_CAD_n
call fcn.0040456b
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
jne 0x4028bb
mov ebx, str.OpenSCManager
call fcn.00401240
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push 0
push 0
push 0
push 0
push 0
push ecx
push 0
push 2
or edi, 0x10
push edi
push 0xf01ff
push edx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x402900
mov ebx, str.CreateService
call fcn.00401240
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
push 1
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
lea eax, [esp + 0x10]
push eax
call fcn.004013c0
add esp, 4
test eax, eax
jne 0x402acc
test ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
je 0x402960
mov eax, ebx
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402940
mov ecx, dword [esp + 0x10]
sub eax, edx
add eax, 1
push eax
push ebx
push 2
push 0
push str.workingdir
push ecx
call edi
mov ebx, dword [esp + 0x2c]
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402970
sub eax, edx
mov edx, dword [esp + 0x10]
add eax, 1
push eax
push ebx
push 2
push 0
push str.cmdline
push edx
call edi
mov eax, ebp
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x402995
sub eax, ecx
add eax, 1
push eax
mov eax, dword [esp + 0x14]
push ebp
push 2
push 0
push str.auto_restart
push eax
call edi
mov ebx, dword [esp + 0x3c]
mov eax, ebx
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4029c0
sub eax, ecx
mov ecx, dword [esp + 0x10]
add eax, 1
push eax
push ebx
push 2
push 0
push str.run_once
push ecx
call edi
mov ebx, dword [esp + 0x40]
mov eax, ebx
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4029f0
mov edx, dword [esp + 0x10]
sub eax, ecx
add eax, 1
push eax
push ebx
push 2
push 0
push str.do_cad
push edx
call edi
mov ebx, dword [esp + 0x34]
test ebx, ebx
je 0x402a70
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402a20
sub eax, edx
add eax, 1
push eax
mov eax, dword [esp + 0x14]
push ebx
push 2
push 0
push str.stopcmdline
push eax
call edi
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x402a70
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402a50
mov ecx, dword [esp + 0x10]
sub eax, edx
add eax, 1
push eax
push ebx
push 2
push 0
push str.stopworkingdir
push ecx
call edi
mov ebx, dword [esp + 0x44]
test ebx, ebx
je 0x402aa0
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402a80
sub eax, edx
mov edx, dword [esp + 0x10]
add eax, 1
push eax
push ebx
push 2
push 0
push str.livenessfile
push edx
call edi
push esi
call fcn.00401470
mov esi, dword [esp + 0x1c]
add esp, 4
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push str.Failed_to_set_service_parameters_in_registry_n
call fcn.0040456b
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret