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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
mov eax, 0x20138
call fcn.140023f70
sub rsp, rax
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x20110], rax
mov rdi, qword [rsp + 0x20190]
mov r12, r9
mov r13, r8
mov rsi, rdx
mov qword [rsp + 0x50], rcx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x68]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x14000bb3b
lea ebp, [rax + 1]
xor edi, edi
lea r9, str.nssm_hook__
lea r8, str.hook
mov edx, 0xc00003eb
movzx ecx, bp
mov qword [rsp + 0x20], rdi
call fcn.140007190
lea eax, [rbx + 0x64]
jmp 0x14000c2ba
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20130], r14
mov qword [rsp + 0x20128], r15
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rcx, [rsi + 0x70558]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rsi
call fcn.1400123a0
mov ebp, 1
lea r9, [0x140026188]
lea rcx, [rsp + 0xf0]
lea edx, [rbp + 0xf]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ebp
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_HOOK_VERSION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, str.NSSM_EVENT
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, str.NSSM_ACTION
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test rdi, rdi
je 0x14000bbe2
mov ecx, dword [rdi]
call fcn.140014340
lea rcx, str.NSSM_TRIGGER
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x14000bbf6
lea rdx, [0x140025cbc]
lea rcx, str.NSSM_TRIGGER
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rsi + 0x705c0]
call fcn.140014340
lea rcx, str.NSSM_LAST_CONTROL
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call fcn.14000e3e0
lea rcx, str.NSSM_EXE
mov rdx, rax
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, str.2.24_41_g1b415c7
lea rcx, str.NSSM_VERSION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.2016_04_21
lea rcx, str.NSSM_BUILD_DATE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
or r8, 0xffffffffffffffff
lea edx, [r8 + 0x11]
lea r9, [0x140026188]
lea rcx, [rsp + 0xf0]
mov dword [rsp + 0x20], eax
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rsi + 0x705a0]
lea r8, [rsp + 0x58]
lea rcx, str.NSSM_RUNTIME
call fcn.14000b370
mov edx, dword [rsi + 0x70508]
test edx, edx
je 0x14000bd25
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x140026188]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_APPLICATION_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rsi + 0x705a8]
lea r8, [rsp + 0x58]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call fcn.14000b370
lea rdx, [0x140025cbc]
lea rcx, str.NSSM_EXITCODE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x14000bdde
lea rdx, [0x140025cbc]
lea rcx, str.NSSM_APPLICATION_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.Start
mov rcx, r13
call fcn.14000e140
test eax, eax
je 0x14000bd89
lea rdx, [0x140025af0]
mov rcx, r12
call fcn.14000e140
test eax, eax
je 0x14000bd89
lea rdx, [0x140025cbc]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [0x140025cbc]
lea rcx, str.NSSM_EXITCODE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x14000bdde
lea r8, [rsi + 0x705b0]
lea rdx, [rsi + 0x705a8]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call fcn.14000b370
mov edx, dword [rsi + 0x70518]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x140026188]
lea rcx, [rsp + 0xf0]
lea edx, [r8 + 0x11]
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_EXITCODE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [rsp + 0x20198]
or r8, 0xffffffffffffffff
lea r9, [0x140026188]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
mov dword [rsp + 0x20], eax
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_DEADLINE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea r15, [rsi + 2]
lea rcx, str.NSSM_SERVICE_NAME
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rsi + 0x202]
lea rcx, str.NSSM_SERVICE_DISPLAYNAME
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, dword [rsi + 0x705c4]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x140026188]
lea rcx, [rsp + 0xf0]
lea edx, [r8 + 0x11]
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_START_REQUESTED_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, dword [rsi + 0x705c8]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x140026188]
lea rcx, [rsp + 0xf0]
lea edx, [r8 + 0x11]
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_START_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rsi + 0x705cc]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ecx
lea r9, [0x140026188]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_EXIT_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rsi + 0x70520]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ecx
lea r9, [0x140026188]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
call fcn.140019e88
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_THROTTLE_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rsi + 0x28428]
lea rax, [rsi + 0x1842a]
mov qword [rsp + 0x28], rdx
lea r9, str.__s___s
lea rcx, [rsp + 0x10110]
mov edx, 0x8000
or r8, 0xffffffffffffffff
mov qword [rsp + 0x20], rax
call fcn.140019e88
lea rdx, [rsp + 0x10110]
lea rcx, str.NSSM_COMMAND_LINE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea r9, [rsp + 0x110]
mov r8, r12
mov rdx, r13
mov rcx, r15
mov dword [rsp + 0x20], 0x10000
call fcn.1400109b0
test eax, eax
je 0x14000bfea
xor edi, edi
mov r9, r12
mov r8, r13
mov edx, 0x40000439
movzx ecx, bp
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
call fcn.140007190
mov rcx, rsi
call fcn.140012400
lea rcx, [rsi + 0x70558]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea eax, [rdi + 0x64]
jmp 0x14000c2aa
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x110]
repne scasw ax, word [rdi]
not rcx
cmp rcx, rbp
jne 0x14000c033
mov rcx, rsi
call fcn.140012400
lea rcx, [rsi + 0x70558]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebp
jmp 0x14000c2aa
xor edx, edx
lea rcx, [rsp + 0x80]
lea r8d, [rdx + 0x68]
call fcn.14001a4c0
xor eax, eax
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x70], rax
lea r15d, [rax + 0x65]
mov qword [rsp + 0x40], rcx
lea rax, [rsi + 0x30426]
xor edi, edi
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
lea rdx, [rsp + 0x110]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x28], 0x400
mov dword [rsp + 0x80], 0x68
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x14000c23e
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 [rbx], rax
test rax, rax
je 0x14000c104
lea rcx, [rsi + 2]
mov qword [rsp + 0x30], r12
lea r9, str._s___s__s_
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rcx
or r8, 0xffffffffffffffff
mov rcx, rax
mov edx, 0x200
call fcn.140019e88
mov rax, qword [rsp + 0x60]
mov r13d, dword [rsp + 0x20198]
lea rdx, [rbx + 0x18]
mov qword [rbx + 8], rax
mov eax, dword [rsp + 0x70]
mov rcx, qword [rbx + 8]
mov dword [rbx + 0x10], eax
mov dword [rbx + 0x14], r13d
call fcn.14000ea80
test eax, eax
je 0x14000c13b
lea rcx, [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rax, [rsp + 0x78]
lea r8, [fcn.14000b1f0]
mov r9, rbx
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r12, rax
test rax, rax
je 0x14000c1f8
cmp byte [rsp + 0x201a0], dil
je 0x14000c1a7
mov rdx, qword [rsi + 0x704f8]
mov r15d, edi
mov rdi, qword [rsp + 0x50]
lea r8, [rsi + 0x704d8]
xor r9d, r9d
mov rcx, rdi
call fcn.14000b830
mov r8, qword [rbx]
mov rdx, r12
mov rcx, rdi
call fcn.14000b430
jmp 0x14000c292
mov r9, qword [rbx]
mov rcx, qword [rsi + 0x704f8]
lea eax, [r13 + 0x4e20]
mov dword [rsp + 0x28], eax
lea rax, str.nssm_hook
lea rdx, [rsi + 0x704d8]
mov r8, r12
mov qword [rsp + 0x20], rax
call fcn.1400149e0
lea rdx, [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov r15d, dword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000c292
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140006fd0
xor r9d, r9d
mov edx, 0xc0000424
mov r8, rax
movzx ecx, bp
call fcn.140007190
mov rcx, rbx
call fcn.14000b1f0
mov rdi, qword [rbx]
test rdi, rdi
je 0x14000c27e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14000c27e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov qword [rsp + 0x38], rdi
lea rcx, [rsi + 2]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x110]
mov r9, r12
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov r8, r13
movzx ecx, bp
mov edx, 0x40000438
call fcn.140007190
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rsi
call fcn.140012400
lea rcx, [rsi + 0x70558]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, r15d
mov r14, qword [rsp + 0x20130]
mov r15, qword [rsp + 0x20128]
mov rcx, qword [rsp + 0x20110]
xor rcx, rsp
call fcn.14001a490
add rsp, 0x20138
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret