Function at 0x4025c0
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 0x411dc4
push eax
mov ebx, ecx
mov esi, edx
xor edi, edi
call fcn.004039e6
add esp, 8
test eax, eax
jne 0x4025f4
push str.Service_CAN_interact_with_the_desktop__can_have_a_GUI__n
call fcn.00404566
mov edi, 0x100
jmp 0x4025fe
push str.Service_CANNOT_interact_with_the_desktop__cannot_have_a_GUI__n
call fcn.00404566
add esp, 4
push 0x411dc4
push ebp
call fcn.004039e6
add esp, 8
test eax, eax
jne 0x40261a
push str.Service_WILL_be_restarted_upon_termination_n
jmp 0x40261f
push str.Service_WILL_NOT_be_restarted_upon_termination_n
call fcn.00404566
mov ecx, dword [esp + 0x40]
add esp, 4
push 0x411dc4
push ecx
call fcn.004039e6
add esp, 8
test eax, eax
jne 0x402644
push str.Service_WILL_run_only_once_n
jmp 0x402649
push str.Service_WILL_NOT_run_only_once_n
call fcn.00404566
mov edx, dword [esp + 0x44]
add esp, 4
push 0x411dc4
push edx
call fcn.004039e6
add esp, 8
test eax, eax
jne 0x402674
push str.Service_WILL_issue_CAD_n
call fcn.00404566
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
jne 0x40269b
mov ebx, str.OpenSCManager
call fcn.00401090
pop edi
pop esi
pop ebp
xor eax, eax
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 0x4026e0
mov ebx, str.CreateService
call fcn.00401090
pop edi
pop esi
pop ebp
xor eax, eax
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.004011f0
add esp, 4
test eax, eax
jne 0x4028ac
test ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
je 0x402740
mov eax, ebx
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402720
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 0x402750
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 0x402775
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 0x4027a0
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 0x4027d0
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 0x402850
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402800
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 0x402850
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402830
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 0x402880
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402860
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.004012a0
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]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret
push str.Failed_to_set_service_parameters_in_registry_n
call fcn.00404566
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret