Function at 0x140004520
Capabilities:
Accept command line arguments
Create process on windows
Query environment variable
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xf0
mov r15d, ecx
mov r13, rdx
xor ecx, ecx
mov dword [rbp + 0x77], ecx
mov dword [rbp + 0x67], ecx
mov qword [rbp - 0x71], rcx
lea eax, [rcx + 1]
mov dword [rbp - 0x79], eax
mov ebx, eax
cmp r15d, eax
jle 0x140004a17
lea rdi, [rdx + 0x10]
mov esi, eax
or rdx, 0xffffffffffffffff
mov rax, qword [r13 + rsi*8]
mov r14, rdx
inc r14
cmp byte [rax + r14], cl
jne 0x14000457a
lea r12, [rax + 1]
cmp r14, 6
jne 0x1400045b4
lea r8d, [r14 - 1]
mov rcx, r12
lea rdx, str.winrt
call qword [sym.imp.msvcrt.dll__strnicmp]
nop dword [rax + rax]
xor ecx, ecx
test eax, eax
jne 0x1400045f4
mov dword [rbp + 0x77], 1
cmp r14, 0xb
jne 0x1400045f4
lea r8d, [r14 - 1]
mov rcx, r12
lea rdx, str.midlrt_cmd
call qword [sym.imp.msvcrt.dll__strnicmp]
nop dword [rax + rax]
xor ecx, ecx
test eax, eax
jne 0x1400045f4
lea eax, [rbx + 1]
cmp eax, r15d
jge 0x1400045f4
mov r12, qword [rdi]
inc rsi
mov qword [rbp - 0x71], r12
add rdi, 8
mov ebx, eax
jmp 0x1400045f8
mov r12, qword [rbp - 0x71]
inc ebx
inc rsi
add rdi, 8
mov rdx, 0xffffffffffffffff
cmp ebx, r15d
jl 0x140004572
mov r13d, dword [rbp + 0x77]
test r13d, r13d
je 0x140004a1a
lea ebx, [rdx + 0x69]
xor edx, edx
mov r8d, ebx
lea rcx, [rbp - 0x49]
call sub.msvcrt.dll_memset
mov ecx, 0xfffffff4
mov dword [rbp - 0x49], ebx
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
nop dword [rax + rax]
mov ecx, 0xfffffff6
mov qword [rbp + 0x17], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
nop dword [rax + rax]
mov ecx, 0xfffffff5
mov qword [rbp + 7], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
nop dword [rax + rax]
mov qword [rbp + 0xf], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
nop dword [rax + rax]
mov rcx, rax
lea rdx, [rbp - 0x69]
mov rbx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
nop dword [rax + rax]
mov rcx, rbx
mov rdi, rax
mov rdx, qword [rax]
call qword [sym.imp.msvcrt.dll_wcsstr]
nop dword [rax + rax]
xor esi, esi
mov rdx, rax
test rax, rax
jne 0x1400046cd
mov rcx, rdi
mov dword [rbp + 0x67], 0x95e
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
jmp 0x140004a1a
mov rcx, qword [rdi]
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], si
jne 0x1400046d4
mov rcx, rdi
lea rbx, [rdx + rax*2]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
cmp word [rbx], 0x22
lea r15, [rbx + 2]
cmovne r15, rbx
mov ebx, 0x208
mov ecx, ebx
call qword [sym.imp.msvcrt.dll_malloc]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x1400049f4
add dword [0x14001d9b8], ebx
lea rcx, str.MIDLRT
mov ebx, 0x104
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov ecx, eax
lea rax, [rcx - 1]
cmp rax, 0x102
jbe 0x14000477b
test r12, r12
je 0x14000483b
or r9d, 0xffffffff
mov dword [rsp + 0x28], ebx
mov r8, r12
mov qword [rsp + 0x20], r14
lea edx, [r9 + 2]
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop dword [rax + rax]
movsxd rcx, eax
mov r12d, dword [rbp - 0x79]
or r8, 0xffffffffffffffff
mov rax, r8
inc rax
cmp word [r15 + rax*2], si
jne 0x140004786
lea rbx, [rcx + 1]
add rbx, rax
mov eax, 2
mul rbx
mov rsi, rax
cmovo rsi, r8
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_malloc]
nop dword [rax + rax]
xor r10d, r10d
mov rdi, rax
test rax, rax
je 0x1400049f4
add dword [0x14001d9b8], esi
lea rcx, [rbx - 1]
mov r11d, 0x7ffffffe
mov esi, r10d
cmp rcx, r11
mov eax, 0x80070057
cmova esi, eax
test esi, esi
js 0x14000484f
mov rdx, rbx
mov rcx, rdi
test rbx, rbx
je 0x14000481d
mov r8d, r11d
mov r9, r14
sub r8, rbx
sub r9, rdi
lea rax, [r8 + rdx]
test rax, rax
je 0x14000481d
movzx eax, word [r9 + rcx]
test ax, ax
je 0x14000481d
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1400047fd
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
neg rdx
sbb esi, esi
not esi
and esi, 0x8007007a
mov word [rax], r10w
jmp 0x140004858
lea r14, str.MIDLRT.EXE
mov ecx, 0xa
mov r12d, esi
jmp 0x14000477f
test rbx, rbx
je 0x140004858
mov word [rdi], r10w
test r12d, r12d
je 0x14000487a
test r14, r14
je 0x14000487a
mov rcx, r14
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
xor r10d, r10d
mov r11d, 0x7ffffffe
test esi, esi
je 0x140004895
mov dword [rbp + 0x67], esi
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
jmp 0x140004a1a
lea rax, [rbx - 1]
mov ecx, r10d
cmp rax, r11
mov edx, 0x80070057
cmova ecx, edx
test ecx, ecx
js 0x1400048df
mov r8, rbx
mov rax, rdi
test rbx, rbx
je 0x1400048c6
cmp word [rax], r10w
je 0x1400048c6
add rax, 2
sub r8, 1
jne 0x1400048b6
mov rax, r8
neg rax
sbb ecx, ecx
not ecx
and ecx, edx
test r8, r8
je 0x1400048df
mov rdx, rbx
sub rdx, r8
jmp 0x1400048e2
mov rdx, r10
test ecx, ecx
js 0x140004943
mov rcx, rbx
lea r8, [rdi + rdx*2]
sub rcx, rdx
je 0x140004925
mov rax, rcx
lea r9, [rdx + 0x7ffffffe]
sub rax, rbx
add r9, rax
test r9, r9
je 0x140004925
movzx eax, word [r15]
test ax, ax
je 0x140004925
mov word [r8], ax
add r15, 2
add r8, 2
dec r9
sub rcx, 1
jne 0x140004902
test rcx, rcx
lea rax, [r8 - 2]
cmovne rax, r8
neg rcx
sbb ecx, ecx
not ecx
and ecx, 0x8007007a
mov word [rax], r10w
test ecx, ecx
je 0x14000494d
mov dword [rbp + 0x67], ecx
jmp 0x140004881
lea rax, [rbp - 0x61]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rax, [rbp - 0x49]
mov rdx, rdi
mov qword [rsp + 0x40], rax
xor ecx, ecx
mov qword [rsp + 0x38], r10
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
nop dword [rax + rax]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
test ebx, ebx
je 0x1400049eb
mov rcx, qword [rbp - 0x61]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x61]
lea rdx, [rbp + 0x67]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x61]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
jmp 0x140004a1a
mov dword [rbp + 0x67], 0x95e
jmp 0x140004a1a
mov ebx, 0x7d5
xor edx, edx
mov r8d, ebx
xor r9d, r9d
xor ecx, ecx
call fcn.140007878
mov ecx, ebx
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
mov r13d, ecx
mov rax, qword [rbp + 0x7f]
mov ecx, dword [rbp + 0x67]
mov rbx, qword [rsp + 0x138]
mov dword [rax], ecx
mov eax, r13d
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret