Function at 0x402bd0
Capabilities:
Create service

Disassembly:
mov r11, rsp
sub rsp, 0x428
mov rax, qword [0x004131d8]
xor rax, rsp
mov qword [rsp + 0x3d0], rax
mov rax, qword [rsp + 0x468]
mov qword [r11 - 8], rbx
mov rbx, qword [rsp + 0x460]
mov qword [r11 - 0x10], rbp
mov rbp, qword [rsp + 0x498]
mov qword [r11 - 0x18], rsi
mov rsi, qword [rsp + 0x480]
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov r12, qword [rsp + 0x478]
mov qword [r11 - 0x30], r13
mov r13, rcx
mov qword [r11 - 0x38], r14
mov qword [rsp + 0x78], r9
mov r9, qword [rsp + 0x458]
mov qword [rsp + 0x70], rax
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, r9
mov qword [r11 - 0x40], r15
mov r14, rdx
mov rdx, qword [rsp + 0x450]
repne scasb al, byte [rdi]
mov r15, r8
not rcx
sub rcx, 1
je 0x402c85
movzx eax, byte [r9 + rcx - 1]
cmp al, 0x5c
je 0x402c85
cmp al, 0x2f
je 0x402c85
lea r8, str._s_s.exe
jmp 0x402c8c
lea r8, [0x0040eff0]
mov qword [rsp + 0x20], rdx
lea rcx, [rsp + 0xb0]
mov edx, 0x104
call qword [sym.imp.MSVCR80.dll__snprintf]
cmp eax, 0x104
je 0x402f1e
test eax, eax
js 0x402f1e
lea rcx, [rsp + 0xb0]
mov edx, 0x20
call qword [sym.imp.MSVCR80.dll_strchr]
lea rcx, str.__s_
lea rdx, [0x0040e620]
test rax, rax
lea r8, [rsp + 0xb0]
cmovne rdx, rcx
lea rcx, [rsp + 0x1c0]
call qword [sym.imp.MSVCR80.dll_sprintf]
test rbx, rbx
je 0x402d90
xor eax, eax
lea rdi, [rsp + 0x1c0]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov edx, 0x207
mov rdi, rbx
not rcx
sub rcx, 1
sub rdx, rcx
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
cmp rdx, rcx
jae 0x402d40
lea rdx, str.service_command_line_is_too_long
jmp 0x402f25
lea rdi, [rsp + 0x1c0]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x0040efb8]
mov rcx, 0xffffffffffffffff
mov word [rdi - 1], ax
xor eax, eax
lea rdi, [rsp + 0x1c0]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
nop
nop
movzx eax, byte [rbx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x402d80
test r12, r12
mov ecx, 0x10
je 0x402da8
test rsi, rsi
jne 0x402db8
lea rsi, [0x0040efb6]
jmp 0x402db8
cmp byte [rsp + 0x488], 0
mov eax, 0x110
cmovne ecx, eax
mov rdx, qword [rsp + 0x70]
neg word [rsp + 0x470]
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], rdx
sbb eax, eax
xor r12d, r12d
lea rdx, [rsp + 0x1c0]
add eax, 3
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea r9d, [r12 + 0x12]
mov rcx, r13
mov r8, r15
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
test rax, rax
mov rsi, rax
jne 0x402e48
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x34
je 0x402e3f
cmp eax, 0x431
je 0x402e3f
lea rdx, str.CreateService
mov ecx, eax
jmp 0x402f27
mov ax, 0x64
jmp 0x402f2c
lea rcx, str.ADVAPI32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rdi, rax
je 0x402f10
lea rdx, str.ChangeServiceConfig2A
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
mov rbx, rax
je 0x402f07
lea r8, [rsp + 0x78]
mov edx, 1
mov rcx, rsi
call rbx
cmp byte [rsp + 0x490], r12b
je 0x402f07
xor eax, eax
lea r8, [rsp + 0x80]
mov rcx, rsi
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0xa0], rax
xor eax, eax
mov dword [rsp + 0x80], r12d
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x74], eax
lea edx, [rax + 2]
mov dword [rsp + 0x98], 1
mov dword [rsp + 0x74], r12d
mov dword [rsp + 0x70], 1
call rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ax, ax
jmp 0x402f2c
lea rdx, str.service_executable_path_name_is_too_long
xor ecx, ecx
xor r8d, r8d
call rbp
mov r15, qword [rsp + 0x3e8]
mov r14, qword [rsp + 0x3f0]
mov r13, qword [rsp + 0x3f8]
mov r12, qword [rsp + 0x400]
mov rdi, qword [rsp + 0x408]
mov rsi, qword [rsp + 0x410]
mov rbp, qword [rsp + 0x418]
mov rbx, qword [rsp + 0x420]
mov rcx, qword [rsp + 0x3d0]
xor rcx, rsp
call fcn.0040cd40
add rsp, 0x428
ret