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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0xa10]
sub rsp, 0xb10
mov rax, qword [0x140025ba8]
xor rax, rsp
mov qword [rbp + 0xa00], rax
mov rsi, rcx
mov r12d, r8d
mov rdi, rdx
lea rcx, [rbp - 0x20]
xor edx, edx
mov r8d, 0x208
call sub.MSVCR100.dll_memset
mov edx, 0x2e
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsrchr]
mov rbx, rax
test rax, rax
je 0x140005a17
mov qword [rsp + 0xb50], r13
lea rcx, [rbp + 0x1f2]
xor r13d, r13d
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x1f0], r13w
call sub.MSVCR100.dll_memset
lea edx, [r13 + 0x20]
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_wcsrchr]
mov rcx, rbx
test rax, rax
je 0x140005829
call qword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
movsxd rcx, eax
test eax, eax
jle 0x140005847
cmp word [rbx + rcx*2], 0x20
je 0x14000582f
dec rcx
dec eax
test rcx, rcx
jg 0x140005816
jmp 0x140005847
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rbp + 0x1f0]
movsxd r9, eax
mov r8, rbx
mov edx, 0x104
call qword [sym.imp.MSVCR100.dll_wcsncpy_s]
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x38], 0x208
lea rax, [rbp - 0x20]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
lea r8, [rbp + 0x1f0]
xor r9d, r9d
mov rdx, 0xffffffff80000000
mov rcx, rsi
mov dword [rsp + 0x20], 1
call fcn.140005400
test eax, eax
je 0x140005927
lea rcx, [rbp + 0x610]
xor edx, edx
mov r8d, 0x3e8
call sub.MSVCR100.dll_memset
lea r8, [rbp - 0x20]
lea rdx, str._s_shellopencommand
lea rcx, [rbp + 0x610]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rbp - 0x20]
xor edx, edx
mov r8d, 0x208
call sub.MSVCR100.dll_memset
lea rcx, [rbp + 0x402]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x400], r13w
call sub.MSVCR100.dll_memset
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x38], 0x208
lea rax, [rbp + 0x400]
mov qword [rsp + 0x30], r13
lea r8, [rbp + 0x610]
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov rdx, 0xffffffff80000000
mov rcx, rsi
mov dword [rsp + 0x20], 2
call fcn.140005400
test eax, eax
jne 0x14000592e
xor al, al
jmp 0x140005a0f
lea rdx, [rbp - 0x20]
lea rcx, [rbp + 0x400]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rdx, [0x140019a98]
lea rcx, [rbp - 0x20]
call qword [sym.imp.MSVCR100.dll_wcsstr]
test rax, rax
jne 0x140005991
lea rdx, [0x140019a90]
lea rcx, [rbp - 0x20]
call qword [sym.imp.MSVCR100.dll_wcsstr]
test rax, rax
jne 0x140005991
lea rdx, [0x140019184]
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rcx, [rbp - 0x20]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x14000599d
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor edx, edx
lea rcx, [rsp + 0x58]
lea r8d, [rdx + 0x60]
call sub.MSVCR100.dll_memset
mov dword [rsp + 0x50], WSAGetLastError
test r12d, r12d
je 0x1400059c8
lea rax, str.WinSta0Default
mov qword [rsp + 0x60], rax
jmp 0x1400059d4
mov dword [rbp - 0x74], 1
mov word [rbp - 0x70], r13w
lea rax, [rbp - 0x40]
lea rdx, [rbp - 0x20]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
xor ecx, ecx
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov al, 1
mov r13, qword [rsp + 0xb50]
mov rcx, qword [rbp + 0xa00]
xor rcx, rsp
call fcn.140015b50
add rsp, 0xb10
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret