Function at 0x180001360
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov ebx, edx
mov r15, rcx
xor dil, dil
call fcn.1800016e0
xor r12d, r12d
mov dword [rbp - 0x50], r12d
xor edx, edx
lea r8d, [r12 + 0x60]
lea rcx, [rbp - 0x48]
call fcn.18010a4e0
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r12
mov dword [rbp + 0x70], r12d
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x70], r12
xor eax, eax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
lea rdx, [rsp + 0x60]
mov ecx, ebx
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
or esi, 0xffffffff
test eax, eax
je 0x1800016a9
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1800016a9
mov qword [rsp + 0x68], r12
lea rax, [rbp + 0x70]
mov qword [rsp + 0x20], rax
lea r9d, [r12 + 8]
lea r8, [rsp + 0x70]
lea edx, [rsi + 0x14]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x70]
test rax, rax
cmovne rcx, rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
lea r9d, [r12 + 2]
xor r8d, r8d
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x180001694
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x70]
test rax, rax
cmovne rdx, rax
xor r8d, r8d
lea rcx, [rbp - 0x80]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x180001670
mov rcx, qword [r15]
sub rcx, 0x18
call fcn.180001d50
lea rbx, [rax + 0x18]
mov qword [rsp + 0x78], rbx
lea rdx, [0x18014e468]
lea rcx, [rbp + 0x78]
call fcn.180001c00
nop
mov rcx, qword [r15]
cmp dword [rcx - 0x10], r12d
jle 0x180001576
lea edx, [rsi + 0x40]
call fcn.180109d60
mov rdi, rax
test rax, rax
je 0x180001576
sub rdi, qword [r15]
sar rdi, 1
cmp edi, esi
je 0x180001576
mov rdx, r15
lea rcx, [rbp + 0x78]
call fcn.180001b50
mov r8d, edi
lea rdx, [rbp - 0x78]
mov rcx, r15
call fcn.180001a50
nop
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.180001b50
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18000150e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
test edi, edi
js 0x18000156b
mov rax, qword [rbp + 0x78]
movsxd rbx, dword [rax - 0x10]
cmp edi, ebx
jge 0x18000156b
cmp dword [rax - 8], 1
jle 0x180001534
mov edx, dword [rax - 0x10]
lea rcx, [rbp + 0x78]
call fcn.180001ca0
mov rax, qword [rbp + 0x78]
movsxd rcx, edi
mov edx, reloc.WLDAP32.dll_Ordinal_32
mov word [rax + rcx*2], dx
test ebx, ebx
js 0x180001560
mov rax, qword [rbp + 0x78]
cmp ebx, dword [rax - 0xc]
jg 0x180001560
mov dword [rax - 0x10], ebx
mov rax, qword [rbp + 0x78]
mov word [rax + rbx*2], r12w
mov rbx, qword [rsp + 0x78]
jmp 0x180001576
mov ecx, 0x80070057
call fcn.180002760
int3
mov ecx, 0x80070057
call fcn.180002760
int3
mov edi, r12d
nop dword [rax]
mov r8, qword [rbp + 0x78]
cmp dword [r8 - 8], 1
jle 0x18000159c
mov edx, dword [r8 - 0x10]
lea rcx, [rbp + 0x78]
call fcn.180001ca0
mov r8, qword [rbp + 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r12
mov rax, qword [rbp - 0x80]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x400
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov rdx, rbx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov r14d, eax
mov ecx, reloc.WLDAP32.dll_Ordinal_200
call qword [sym.imp.KERNEL32.dll_Sleep]
test r14d, r14d
jne 0x1800015fc
inc edi
cmp edi, 0xa
jl 0x180001580
test r14d, r14d
setne dil
mov rcx, qword [rbp - 0x70]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x180001614
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x68]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x180001628
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rdx, qword [rbp + 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x180001652
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x180001670
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x18000167f
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x180001694
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x68], r12
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1800016a9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x60], r12
mov rdx, qword [r15]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x1800016c4
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
movzx eax, dil
add rsp, 0x120
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret