Function at 0x1400070a0
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.140024ca0
sub rsp, rax
mov rax, qword [0x140030f90]
xor rax, rsp
mov qword [rsp + 0x20110], rax
mov rdi, qword [rsp + 0x20190]
mov r12, r9
mov r13, r8
mov rbx, rdx
mov qword [rsp + 0x50], rcx
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 rsi, rax
test rax, rax
jne 0x14000712b
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.1400025f0
lea eax, [rsi + 0x64]
jmp 0x140007906
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20130], r14
mov qword [rsp + 0x20128], r15
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rbx
call fcn.14000ed90
mov ebp, 1
lea r9, [0x1400272a8]
lea rcx, [rsp + 0xf0]
lea edx, [rbp + 0xf]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ebp
call fcn.140018170
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 0x1400071d2
mov ecx, dword [rdi]
call fcn.1400111a0
lea rcx, str.NSSM_TRIGGER
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x1400071e6
lea rdx, [0x140026ddc]
lea rcx, str.NSSM_TRIGGER
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rbx + 0x705e0]
call fcn.1400111a0
lea rcx, str.NSSM_LAST_CONTROL
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call fcn.14000a150
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, [0x140027190]
lea rcx, str.NSSM_VERSION
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.2017_05_16
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, [0x1400272a8]
lea rcx, [rsp + 0xf0]
mov dword [rsp + 0x20], eax
call fcn.140018170
lea rdx, [rsp + 0xf0]
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.140006960
mov edx, dword [rbx + 0x70528]
test edx, edx
je 0x140007315
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x1400272a8]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
call fcn.140018170
lea rdx, [rsp + 0xf0]
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.140006960
lea rdx, [0x140026ddc]
lea rcx, str.NSSM_EXITCODE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x1400073ce
lea rdx, [0x140026ddc]
lea rcx, str.NSSM_APPLICATION_PID
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.Start
mov rcx, r13
call fcn.140009b50
test eax, eax
je 0x140007379
lea rdx, [0x140026c20]
mov rcx, r12
call fcn.140009b50
test eax, eax
je 0x140007379
lea rdx, [0x140026ddc]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [0x140026ddc]
lea rcx, str.NSSM_EXITCODE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x1400073ce
lea r8, [rbx + 0x705d0]
lea rdx, [rbx + 0x705c8]
lea rcx, str.NSSM_APPLICATION_RUNTIME
call fcn.140006960
mov edx, dword [rbx + 0x70538]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x1400272a8]
lea rcx, [rsp + 0xf0]
lea edx, [r8 + 0x11]
call fcn.140018170
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, [0x1400272a8]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
mov dword [rsp + 0x20], eax
call fcn.140018170
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_DEADLINE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea r15, [rbx + 2]
lea rcx, str.NSSM_SERVICE_NAME
mov rdx, r15
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 edx, dword [rbx + 0x705e4]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x1400272a8]
lea rcx, [rsp + 0xf0]
lea edx, [r8 + 0x11]
call fcn.140018170
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_START_REQUESTED_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, dword [rbx + 0x705e8]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], edx
lea r9, [0x1400272a8]
lea rcx, [rsp + 0xf0]
lea edx, [r8 + 0x11]
call fcn.140018170
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_START_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rbx + 0x705ec]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ecx
lea r9, [0x1400272a8]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
call fcn.140018170
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_EXIT_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [rbx + 0x70540]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ecx
lea r9, [0x1400272a8]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0xf0]
call fcn.140018170
lea rdx, [rsp + 0xf0]
lea rcx, str.NSSM_THROTTLE_COUNT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rbx + 0x28428]
lea rax, [rbx + 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.140018170
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.14000d1c0
test eax, eax
je 0x1400075da
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.1400025f0
mov rcx, rbx
call fcn.14000edf0
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea eax, [rdi + 0x64]
jmp 0x1400078f6
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x110]
repne scasw ax, word [rdi]
not rcx
cmp rcx, rbp
jne 0x140007623
mov rcx, rbx
call fcn.14000edf0
lea rcx, [rbx + 0x70578]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebp
jmp 0x1400078f6
xor edx, edx
lea rcx, [rsp + 0x80]
lea r8d, [rdx + 0x68]
call fcn.140018830
xor eax, eax
mov dword [rsp + 0x80], 0x68
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
cmp byte [rbx + 0x704ac], al
je 0x14000766a
lea rdx, [rsp + 0x80]
mov rcx, rbx
call fcn.140008770
xor al, al
bt dword [rsp + 0xbc], 8
mov r15d, 0x65
movzx ecx, al
lea rax, [rbx + 0x30426]
cmovb ecx, ebp
xor edi, edi
xor r9d, r9d
movzx edx, cl
lea rcx, [rsp + 0x60]
xor r8d, r8d
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x400
mov dword [rsp + 0x20], edx
lea rdx, [rsp + 0x110]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x14000787d
lea rcx, [rsp + 0x80]
call fcn.140008830
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
mov r8d, 0x400
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsi], rax
test rax, rax
je 0x14000772f
lea rcx, [rbx + 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.140018170
mov rax, qword [rsp + 0x60]
mov r13d, dword [rsp + 0x20198]
lea rdx, [rsi + 0x18]
mov qword [rsi + 8], rax
mov eax, dword [rsp + 0x70]
mov rcx, qword [rsi + 8]
mov dword [rsi + 0x10], eax
mov dword [rsi + 0x14], r13d
call fcn.14000aa00
test eax, eax
je 0x140007766
lea rcx, [rsi + 0x18]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rax, [rsp + 0x78]
lea r8, [fcn.1400067e0]
mov r9, rsi
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 0x140007823
cmp byte [rsp + 0x201a0], dil
je 0x1400077d2
mov rdx, qword [rbx + 0x70518]
mov r15d, edi
mov rdi, qword [rsp + 0x50]
lea r8, [rbx + 0x704f8]
xor r9d, r9d
mov rcx, rdi
call fcn.140006e20
mov r8, qword [rsi]
mov rdx, r12
mov rcx, rdi
call fcn.140006a20
jmp 0x1400078de
mov r9, qword [rsi]
mov rcx, qword [rbx + 0x70518]
lea eax, [r13 + 0x4e20]
mov dword [rsp + 0x28], eax
lea rax, str.nssm_hook
lea rdx, [rbx + 0x704f8]
mov r8, r12
mov qword [rsp + 0x20], rax
call fcn.140011840
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 0x1400078de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140002430
xor r9d, r9d
mov edx, 0xc0000424
mov r8, rax
movzx ecx, bp
call fcn.1400025f0
mov rcx, rsi
call fcn.1400067e0
mov rdi, qword [rsi]
test rdi, rdi
je 0x140007867
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1400078de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140002430
mov qword [rsp + 0x38], rdi
lea rcx, [rbx + 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.1400025f0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, [rsp + 0x80]
call fcn.140008830
mov rcx, rbx
call fcn.14000edf0
lea rcx, [rbx + 0x70578]
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.140018800
add rsp, 0x20138
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret