Function at 0x14003a460
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x670]
sub rsp, 0x770
mov rsi, rcx
mov rdi, rdx
mov rcx, qword [rcx]
test rcx, rcx
je 0x14003a789
lea rax, [rbp + 0x690]
mov r9d, 2
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0x2000000
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14003a789
mov rcx, qword [rbp + 0x690]
mov qword [rsp + 0x7a8], r14
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov rdx, qword [rbp + 0x690]
lea rcx, [rbp + 0x6a0]
xor r14d, r14d
xor r8d, r8d
mov qword [rbp + 0x6a0], r14
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x14003a785
xor edx, edx
mov qword [rsp + 0x798], rbx
mov r8d, 0x100
lea rcx, [rbp + 0x70]
call fcn.1400514f0
xor edx, edx
lea r8d, [r14 + 0x50]
lea rcx, [rbp + 0x20]
call fcn.1400514f0
lea rcx, [rbp + 0x20]
dec rcx
cmp byte [rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x14003a521
mov eax, dword [0x1400b2ee8]
lea rdx, [rbp + 0x70]
movsd xmm0, qword [0x1400b2ee0]
mov r8d, 0x100
movsd qword [rcx], xmm0
mov dword [rcx + 8], eax
movzx eax, byte [0x1400b2eec]
mov byte [rcx + 0xc], al
lea rcx, [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rbp + 0x70]
dec rcx
cmp byte [rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x14003a565
mov eax, dword [0x1400b0ed0]
mov rbx, 0xffffffffffffffff
movups xmm0, xmmword [str.System32_atieclxx.exe]
mov r8, rbx
movups xmmword [rcx], xmm0
mov dword [rcx + 0x10], eax
movzx eax, word [0x1400b0ed4]
mov word [rcx + 0x14], ax
movzx eax, byte [0x1400b0ed6]
mov byte [rcx + 0x16], al
lea rax, [rbp + 0x70]
inc r8
cmp byte [rax + r8], r14b
jne 0x14003a5a5
inc r8
lea rdx, [rbp + 0x70]
lea rcx, [rbp + 0x470]
call fcn.14007749c
xor eax, eax
lea rcx, [rbp - 0x50]
xor edx, edx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
lea r8d, [rax + 0x68]
call fcn.1400514f0
lea rax, str.winsta0default
mov dword [rbp - 0x50], 0x68
xor edx, edx
mov qword [rbp - 0x40], rax
mov r8d, 0x100
lea rcx, [rbp + 0x170]
call fcn.1400514f0
lea rax, [rbp + 0x170]
dec rax
cmp byte [rax + 1], r14b
lea rax, [rax + 1]
jne 0x14003a611
movups xmm0, xmmword [0x1400b3460]
mov rcx, rdi
movups xmmword [rax], xmm0
call fcn.140039f40
test al, al
je 0x14003a740
mov eax, dword [rdi + 0x10]
lea rdx, str._d__d__d__x__lu
mov r9d, dword [rdi + 4]
lea rcx, [rsp + 0x78]
mov r8d, dword [rdi]
mov dword [rsp + 0x30], eax
mov eax, dword [rdi + 0x18]
mov dword [rsp + 0x28], eax
mov eax, dword [rdi + 8]
mov dword [rsp + 0x20], eax
call fcn.140036b50
lea rcx, [rbp + 0x170]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x14003a670
lea r8, [rsp + 0x78]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x14003a690
lea rax, [rbp + 0x170]
nop word [rax + rax]
cmp byte [rax + rbx + 1], r14b
lea rbx, [rbx + 1]
jne 0x14003a6b0
lea r8, [rbx + 1]
lea rdx, [rbp + 0x170]
lea rcx, [rbp + 0x270]
call fcn.14007749c
mov rcx, qword [rbp + 0x690]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
lea r8, [rbp + 0x270]
lea rax, [rbp - 0x50]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp + 0x470]
mov rax, qword [rbp + 0x6a0]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x420
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x14003a740
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x6a0]
call sub.USERENV.dll_DestroyEnvironmentBlock
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x690]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x798]
xor eax, eax
mov r14, qword [rsp + 0x7a8]
add rsp, 0x770
pop rdi
pop rsi
pop rbp
ret
xor eax, eax
jmp 0x14003a772
xor eax, eax
add rsp, 0x770
pop rdi
pop rsi
pop rbp
ret