Function at 0x140006d60
Capabilities:
Create process on windows
Create thread
Set environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x20030]
mov eax, 0x20130
call fcn.140018110
sub rsp, rax
mov rax, qword [0x14003ebd8]
xor rax, rsp
mov qword [rbp + 0x20010], rax
mov rsi, qword [rbp + 0x20090]
mov r15, r9
mov r12, r8
mov qword [rsp + 0x50], rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x70]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x140006df5
lea r14d, [rax + 1]
xor esi, esi
movzx ecx, r14w
lea r9, str.nssm_hook__
lea r8, str.hook
mov qword [rsp + 0x20], rsi
mov edx, 0xc00003eb
call fcn.140002610
lea eax, [rdi + 0x64]
jmp 0x140007538
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20128], r13
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rbx
call fcn.1400139e0
mov r14d, 1
lea r9, [0x14002ef10]
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x20], r14d
lea edx, [r14 + 0xf]
lea r8, [r14 - 2]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_HOOK_VERSION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r12
lea rcx, str.NSSM_EVENT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r15
lea rcx, str.NSSM_ACTION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test rsi, rsi
je 0x140006e82
mov ecx, dword [rsi]
call fcn.140012ae0
mov rdx, rax
jmp 0x140006e89
lea rdx, [0x14002ee04]
lea rcx, str.NSSM_TRIGGER
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rbx + 0x705e0]
call fcn.140012ae0
mov rdx, rax
lea rcx, str.NSSM_LAST_CONTROL
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call fcn.140009de0
mov rdx, rax
lea rcx, str.NSSM_EXE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.64_bit
lea rcx, str.NSSM_CONFIGURATION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [0x14002f008]
lea rcx, str.NSSM_VERSION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.Thu_04_25_2019
lea rcx, str.NSSM_BUILD_DATE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, 0x10
lea r9, [0x14002ef10]
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x20], eax
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rbx + 0x705c0]
lea r8, [rsp + 0x58]
lea rcx, str.NSSM_RUNTIME
call fcn.140007560
mov eax, dword [rbx + 0x70528]
test eax, eax
je 0x140006faa
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea r9, [0x14002ef10]
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_APPLICATION_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rbx + 0x705c8]
lea r8, [rsp + 0x58]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call fcn.140007560
lea rdx, [0x14002ee04]
jmp 0x140007042
lea rdx, [0x14002ee04]
lea rcx, str.NSSM_APPLICATION_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.Start
mov rcx, r12
call fcn.14000a0a0
test eax, eax
je 0x140007001
lea rdx, [0x14002ec50]
mov rcx, r15
call fcn.14000a0a0
test eax, eax
je 0x140007001
lea rdx, [0x14002ee04]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [0x14002ee04]
jmp 0x140007042
lea r8, [rbx + 0x705d0]
lea rdx, [rbx + 0x705c8]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call fcn.140007560
mov eax, dword [rbx + 0x70538]
lea r9, [0x14002ef10]
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_EXITCODE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [rbp + 0x20098]
lea r9, [0x14002ef10]
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_DEADLINE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rbx + 2]
lea rcx, str.NSSM_SERVICE_NAME
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rbx + 0x202]
lea rcx, str.NSSM_SERVICE_DISPLAYNAME
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [rbx + 0x705e4]
lea r9, [0x14002ef10]
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_START_REQUESTED_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [rbx + 0x705e8]
lea r9, [0x14002ef10]
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_START_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [rbx + 0x705ec]
lea r9, [0x14002ef10]
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_EXIT_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [rbx + 0x70540]
lea r9, [0x14002ef10]
mov edx, 0x10
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x10]
lea r8, [rdx - 0x11]
call fcn.140001d80
lea rdx, [rbp - 0x10]
lea rcx, str.NSSM_THROTTLE_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rax, [rbx + 0x28428]
mov edx, 0x8000
lea rcx, [rbx + 0x1842a]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r9, str.__s___s
lea rcx, [rbp + 0x10010]
mov r8, 0xffffffffffffffff
call fcn.140001d80
lea rdx, [rbp + 0x10010]
lea rcx, str.NSSM_COMMAND_LINE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea r9, [rbp + 0x10]
mov dword [rsp + 0x20], 0x10000
mov r8, r15
lea rcx, [rbx + 2]
mov rdx, r12
call fcn.14000cc60
test eax, eax
je 0x140007237
lea rcx, [rbx + 2]
xor esi, esi
mov qword [rsp + 0x28], rsi
mov r9, r15
mov qword [rsp + 0x20], rcx
mov r8, r12
movzx ecx, r14w
mov edx, 0x40000439
call fcn.140002610
mov rcx, rbx
call fcn.1400143e0
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea eax, [rsi + 0x64]
jmp 0x140007530
lea rax, [rbp + 0x10]
mov rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140007242
test rcx, rcx
jne 0x140007282
mov rcx, rbx
call fcn.1400143e0
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, r14d
jmp 0x140007530
xorps xmm0, xmm0
mov dword [rbp - 0x80], 0x68
xor eax, eax
movups xmmword [rbp - 0x7c], xmm0
mov dword [rbp - 0x1c], eax
movups xmmword [rbp - 0x6c], xmm0
mov qword [rsp + 0x78], rax
movups xmmword [rbp - 0x5c], xmm0
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
movups xmmword [rbp - 0x2c], xmm0
movups xmmword [rsp + 0x68], xmm0
cmp byte [rbx + 0x704ac], al
je 0x1400072c7
lea rdx, [rbp - 0x80]
mov rcx, rbx
call fcn.1400095e0
mov ecx, dword [rbp - 0x44]
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x48], rdx
lea rax, [rbx + 0x30426]
shr ecx, 8
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x40], rdx
and ecx, r14d
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x10]
xor esi, esi
xor r9d, r9d
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov dword [rsp + 0x28], 0x400
mov r13d, 0x65
mov dword [rsp + 0x20], ecx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1400074be
lea rcx, [rbp - 0x80]
call fcn.140007d90
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi], rax
test rax, rax
je 0x140007375
mov qword [rsp + 0x30], r15
lea rcx, [rbx + 2]
mov qword [rsp + 0x28], r12
lea r9, str._s___s__s_
mov qword [rsp + 0x20], rcx
lea r8, [rsi - 1]
mov rcx, rax
mov edx, 0x200
call fcn.140001d80
mov rax, qword [rsp + 0x68]
lea rdx, [rdi + 0x18]
mov r12d, dword [rbp + 0x20098]
mov qword [rdi + 8], rax
mov eax, dword [rsp + 0x78]
mov rcx, qword [rdi + 8]
mov dword [rdi + 0x10], eax
mov dword [rdi + 0x14], r12d
call fcn.14000aa70
test eax, eax
je 0x1400073ab
lea rcx, [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rax, [rsp + 0x60]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea r8, [fcn.140006950]
xor edx, edx
mov dword [rsp + 0x20], esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r15, rax
test rax, rax
je 0x140007463
lea rdx, [rbx + 0x704f8]
cmp byte [rbp + 0x200a0], sil
je 0x140007418
mov rcx, qword [rsp + 0x50]
mov r8, rdx
mov rdx, qword [rbx + 0x70518]
xor r9d, r9d
mov r13d, esi
call fcn.140006ab0
mov r8, qword [rdi]
mov rdx, r15
mov rcx, qword [rsp + 0x50]
call fcn.140006840
jmp 0x140007518
mov r9, qword [rdi]
lea eax, [r12 + 0x4e20]
mov rcx, qword [rbx + 0x70518]
mov r8, r15
mov dword [rsp + 0x28], eax
lea rax, str.nssm_hook
mov qword [rsp + 0x20], rax
call fcn.14000f0c0
lea rdx, [rsp + 0x50]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov r13d, dword [rsp + 0x50]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140007518
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140002510
mov r8, rax
movzx ecx, r14w
xor r9d, r9d
mov edx, 0xc0000424
call fcn.140002610
mov rcx, rdi
call fcn.140006950
mov rsi, qword [rdi]
test rsi, rsi
je 0x1400074a8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140007518
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140002510
mov qword [rsp + 0x38], rsi
lea rcx, [rbx + 2]
mov qword [rsp + 0x30], rax
mov r9, r15
lea rax, [rbp + 0x10]
mov r8, r12
mov qword [rsp + 0x28], rax
mov edx, 0x40000438
mov qword [rsp + 0x20], rcx
movzx ecx, r14w
call fcn.140002610
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, [rbp - 0x80]
call fcn.140007d90
mov rcx, rbx
call fcn.1400143e0
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, r13d
mov r13, qword [rsp + 0x20128]
mov rcx, qword [rbp + 0x20010]
xor rcx, rsp
call fcn.1400180d0
add rsp, 0x20130
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret