Function at 0x140020760
Capabilities:
Query environment variable
Resume thread
Terminate process

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x620]
sub rsp, 0x720
mov rax, qword [0x140121c38]
xor rax, rsp
mov qword [rbp + 0x610], rax
mov r15, r8
mov edi, edx
mov r14d, ecx
lea rdx, [rbp - 0x20]
xor ebx, ebx
lea rcx, str.WINDIR
mov r8d, 0x104
mov qword [rsp + 0x50], rbx
mov r12, r9
call sub.KERNEL32.dll_GetEnvironmentVariableW
lea ecx, [rdi - 1]
mov esi, eax
cmp ecx, 0xfff
ja 0x1400209fa
mov r9, r15
lea rcx, [rsp + 0x50]
mov r8d, edi
mov edx, r14d
call fcn.14001e310
mov rdi, qword [rsp + 0x50]
test eax, eax
je 0x1400209eb
lea eax, [rsi - 1]
cmp eax, 0x102
ja 0x1400209eb
mov ecx, 0x104
lea rax, [rbp - 0x20]
nop dword [rax + rax]
cmp word [rax], bx
je 0x14002080f
add rax, 2
sub rcx, 1
jne 0x140020800
mov eax, 0x104
sub rax, rcx
test rcx, rcx
cmove rax, rbx
je 0x1400209eb
mov edx, 0x104
lea rcx, [rbp - 0x20]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x140020866
lea r9, str._syswow64_rundll32.exe
mov eax, 0x7ffffffe
sub r9, rcx
test rax, rax
je 0x140020866
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x140020866
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140020845
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], bx
je 0x1400209eb
xor edx, edx
mov dword [rsp + 0x28], 0x104
lea rax, [rbp + 0x1f0]
xor ecx, ecx
lea r8, [rdi + 0xc]
mov qword [rsp + 0x20], rax
lea r9d, [rdx - 1]
call sub.KERNEL32.dll_MultiByteToWideChar
movsxd rcx, eax
cmp rcx, 0x104
jae 0x1400209eb
test eax, eax
jle 0x1400209eb
lea r9, [rbp + 0x1f0]
mov edx, 0x104
lea r8, str.rundll32.exe___s__1
lea rcx, [rbp + 0x400]
call fcn.14001e920
test eax, eax
js 0x1400209eb
xorps xmm1, xmm1
mov dword [rsp + 0x70], 0x68
xor eax, eax
lea rdx, [rbp + 0x400]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x20]
mov dword [rbp - 0x2c], eax
xorps xmm0, xmm0
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], ebx
movups xmmword [rsp + 0x58], xmm0
movups xmmword [rsp + 0x74], xmm1
movups xmmword [rbp - 0x7c], xmm1
movups xmmword [rbp - 0x6c], xmm1
movups xmmword [rbp - 0x5c], xmm1
movups xmmword [rbp - 0x4c], xmm1
movups xmmword [rbp - 0x3c], xmm1
call r12
test eax, eax
je 0x1400209eb
mov r9d, dword [rdi]
lea rdx, [0x1400ee7e0]
mov rcx, qword [rsp + 0x58]
mov r8, rdi
call fcn.14001f570
test rax, rax
jne 0x14002099b
mov rcx, qword [rsp + 0x58]
mov edx, 0xffffffff
call sub.KERNEL32.dll_TerminateProcess
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_CloseHandle
mov rcx, qword [rsp + 0x60]
call sub.KERNEL32.dll_CloseHandle
jmp 0x1400209eb
mov rcx, qword [rsp + 0x60]
call sub.KERNEL32.dll_ResumeThread
mov rcx, qword [rsp + 0x58]
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x1f4
call sub.KERNEL32.dll_GetExitCodeProcess
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_CloseHandle
mov rcx, qword [rsp + 0x60]
call sub.KERNEL32.dll_CloseHandle
cmp dword [rsp + 0x50], ebx
mov eax, 1
cmove ebx, eax
test rdi, rdi
je 0x140020a04
mov rcx, rdi
call fcn.1400574f0
jmp 0x140020a04
mov ecx, 0x57
call sub.KERNEL32.dll_SetLastError
mov eax, ebx
mov rcx, qword [rbp + 0x610]
xor rcx, rsp
call fcn.140056c90
add rsp, 0x720
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret