Function at 0x140039654
Capabilities:
Create process on windows
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x47]
sub rsp, 0xb0
mov rdi, rcx
movzx r13d, r9b
mov rcx, rdx
mov rbx, r8
mov r12, rdx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
mov rcx, qword [rdi + 0x50]
mov qword [rdi + 0x50], rax
test rcx, rcx
je 0x1400396a0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
mov r15, qword [rbp + 0x6f]
mov rbx, rax
mov rax, qword [r15 + 0x70]
neg rax
sbb esi, esi
and esi, 0x80000
add esi, 0x40c
cmp qword [rdi + 0x30], 0
mov r14d, esi
je 0x1400396de
call fcn.140040f50
cmp eax, 5
jge 0x1400396de
bts r14d, 0x18
mov rcx, qword [rdi + 0x18]
lea rdx, [rbp - 0x19]
mov qword [rsp + 0x50], rdx
xor eax, eax
mov qword [rbp - 9], rax
xorps xmm0, xmm0
lea rax, [r15 + 8]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r15d, r15d
mov qword [rsp + 0x40], r15
mov r8, rbx
mov qword [rsp + 0x38], r15
mov rdx, r12
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r15
movups xmmword [rbp - 0x19], xmm0
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x140039745
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
lea edi, [r15 + 0x12]
mov dword [rcx], eax
jmp 0x14003990b
lea rdx, [rbp - 0x19]
lea rcx, [rbp - 0x31]
call fcn.140040050
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x14003978b
mov rdx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x14003978b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, 0x14
jmp 0x140039902
lea rsi, [rdi + 0x20]
mov r14, qword [rsi]
lea rax, [r14 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140039886
mov rcx, qword [rbp - 0x31]
lea r8, [rdi + 0x58]
lea r9, [rbp + 0x6f]
mov qword [rbp + 0x6f], r15
mov rdx, r14
call fcn.14003993c
test al, al
lea rcx, [rbp + 0x4f]
mov rax, qword [rbp - 0x29]
cmovne r14, qword [rbp + 0x6f]
mov rdx, r14
mov qword [rbp + 0x4f], rax
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x140039829
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rax, qword [rbp + 0x6f]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14003981f
call fcn.14003e760
mov r8, qword [rbp + 0x47]
lea rdx, [rbp + 0x6f]
mov rcx, qword [rbp + 0x6f]
mov r9, rax
call fcn.14003e9b0
mov rcx, qword [rbp + 0x6f]
call fcn.14003e930
mov edi, 0x15
jmp 0x140039902
mov rax, qword [rsi]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140039857
call fcn.14003e760
mov r8, qword [rbp + 0x47]
mov r9, rax
mov rcx, qword [rsi]
mov rdx, rsi
call fcn.14003e9b0
mov rcx, qword [rsi]
call fcn.14003e930
mov qword [rsi], r15
mov rax, qword [rbp + 0x6f]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140039886
call fcn.14003e760
mov r8, qword [rbp + 0x47]
lea rdx, [rbp + 0x6f]
mov rcx, qword [rbp + 0x6f]
mov r9, rax
call fcn.14003e9b0
mov rcx, qword [rbp + 0x6f]
call fcn.14003e930
mov rcx, qword [rbp + 0x77]
lea rdx, [rbp - 0x31]
call fcn.1400402d0
test al, al
jne 0x1400398b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, 0x17
jmp 0x140039902
mov rcx, qword [rbp - 0x31]
call fcn.14003b56c
mov qword [rdi + 0x48], rax
test rax, rax
jne 0x1400398e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, 0x2b
jmp 0x140039902
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x31]
call fcn.140040460
mov rdx, rax
mov rcx, rdi
call fcn.1400403f0
mov edi, r15d
lea rcx, [rbp - 0x31]
call fcn.1400401b0
test rbx, rbx
je 0x140039919
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r11, [rsp + 0xb0]
mov eax, edi
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret