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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xb0
mov rdi, rcx
mov rsi, r9
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 0x140051ef4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r13, qword [rsi]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
mov rbx, rax
mov rax, qword [r13 + 0xa0]
neg rax
sbb r14d, r14d
and r14d, 0x80000
add r14d, 0x40c
cmp qword [rdi + 0x30], 0
mov r15d, r14d
je 0x140051f37
call fcn.14001e2a0
cmp eax, 5
jge 0x140051f37
bts r15d, 0x18
mov rax, qword [rsi]
lea rcx, [rbp - 0x21]
mov qword [rsp + 0x50], rcx
xorps xmm0, xmm0
mov rcx, qword [rdi + 0x18]
xor r9d, r9d
mov r8, rbx
movzx edx, byte [rax + 0x20]
xor eax, eax
mov qword [rbp - 0x11], rax
lea rax, [r13 + 0x38]
mov qword [rsp + 0x48], rax
xor r13d, r13d
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], edx
mov rdx, r12
movups xmmword [rbp - 0x21], xmm0
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x140051fcb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
mov dword [rcx], eax
test rbx, rbx
je 0x140051fa9
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsi]
test rbx, rbx
je 0x140051fc1
mov rcx, rbx
call fcn.140056ca0
mov rcx, rbx
call fcn.140077870
mov eax, 0x12
jmp 0x140052252
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x39]
call fcn.14002cee0
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x140052053
mov rdx, qword [rsi]
mov rax, qword [rdx + 0x108]
cmp qword [rdx + 0x100], rax
jne 0x140052053
mov rdx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x140052053
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea rcx, [rbp - 0x39]
call fcn.14002d050
test rbx, rbx
je 0x140052031
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsi]
test rbx, rbx
je 0x140052049
mov rcx, rbx
call fcn.140056ca0
mov rcx, rbx
call fcn.140077870
mov eax, 0x14
jmp 0x140052252
mov r14, qword [rdi + 0x20]
lea rax, [r14 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140052147
mov rcx, qword [rbp - 0x39]
lea r8, [rdi + 0x58]
lea r9, [rbp + 0x57]
mov qword [rbp + 0x57], r13
mov rdx, r14
call fcn.140052270
test al, al
lea rcx, [rbp + 0x6f]
mov rax, qword [rbp - 0x31]
cmovne r14, qword [rbp + 0x57]
mov rdx, r14
mov qword [rbp + 0x6f], rax
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x14005210d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rax, qword [rbp + 0x57]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400520d4
call fcn.14002c9a0
mov rcx, qword [rbp + 0x57]
call fcn.14002d160
mov qword [rbp + 0x57], r13
lea rcx, [rbp - 0x39]
call fcn.14002d050
test rbx, rbx
je 0x1400520eb
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsi]
test rbx, rbx
je 0x140052103
mov rcx, rbx
call fcn.140056ca0
mov rcx, rbx
call fcn.140077870
mov eax, 0x15
jmp 0x140052252
mov rax, qword [rdi + 0x20]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14005212c
call fcn.14002c9a0
mov rcx, qword [rdi + 0x20]
call fcn.14002d160
mov qword [rdi + 0x20], r13
mov rax, qword [rbp + 0x57]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140052147
call fcn.14002c9a0
mov rcx, qword [rbp + 0x57]
call fcn.14002d160
mov rcx, qword [rbp + 0x77]
lea rdx, [rbp - 0x39]
call fcn.14002d210
test al, al
jne 0x1400521a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea rcx, [rbp - 0x39]
call fcn.14002d050
test rbx, rbx
je 0x140052187
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsi]
test rbx, rbx
je 0x14005219f
mov rcx, rbx
call fcn.140056ca0
mov rcx, rbx
call fcn.140077870
mov eax, 0x17
jmp 0x140052252
mov rcx, qword [rbp - 0x39]
call fcn.140064ee0
mov qword [rdi + 0x48], rax
test rax, rax
jne 0x140052209
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x7f]
xor edx, edx
mov dword [rcx], eax
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea rcx, [rbp - 0x39]
call fcn.14002d050
test rbx, rbx
je 0x1400521ea
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsi]
test rbx, rbx
je 0x140052202
mov rcx, rbx
call fcn.140056ca0
mov rcx, rbx
call fcn.140077870
mov eax, 0x2b
jmp 0x140052252
lea rdx, [rbp - 9]
lea rcx, [rbp - 0x39]
call fcn.14002ddc0
mov rdx, rax
mov rcx, rdi
call fcn.14002da90
lea rcx, [rbp - 0x39]
call fcn.14002d050
test rbx, rbx
je 0x140052238
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsi]
test rbx, rbx
je 0x140052250
mov rcx, rbx
call fcn.140056ca0
mov rcx, rbx
call fcn.140077870
xor eax, eax
mov rbx, qword [rsp + 0xf8]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret