Function at 0x140051370
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4b8
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x420], xmm6
mov qword [rbp + 0x418], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x58]
call fcn.140069b70
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x400], rax
test rax, rax
je 0x1400514f6
mov qword [rbp + 0x3e8], rsi
mov rax, qword [rbp - 0x50]
mov qword [rbp + 0x3e0], rax
mov qword [rbp + 0x3c8], 2
xorps xmm0, xmm0
movups xmmword [rbp + 0x3d0], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x410], rax
xor edi, edi
xor ebx, ebx
xor r13d, r13d
cmp r8, 0x201
jae 0x140051430
jmp 0x14005141f
jae 0x140051508
cmp r8, 0x201
jae 0x140051430
mov r15d, 0x200
lea r14, [rbp - 0x58]
mov r12, r8
jmp 0x140051488
sub r8, r13
sub rbx, r13
cmp rbx, r8
jae 0x14005145f
lea rcx, [rbp + 0x3c8]
mov rdx, r13
call fcn.140083200
mov rax, qword [rbp + 0x3c8]
mov qword [rbp + 0x410], rax
mov rdi, qword [rbp + 0x3d0]
mov eax, 0xffffffff
cmp rdi, rax
mov r13d, 0xffffffff
cmovb r13, rdi
mov qword [rbp + 0x3d8], r13
mov rbx, rdi
mov r15, r13
mov r14, qword [rbp + 0x410]
mov r12, r13
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov rcx, qword [rbp + 0x400]
mov rdx, r14
mov r8d, r12d
call qword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x1400514b7
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x140051655
mov r8d, esi
cmp r12, r8
jne 0x140051410
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140051676
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x14005141f
jmp 0x140051430
lea rcx, [rbp - 0x58]
call fcn.14004b5d0
mov byte [rsi + 0x18], 2
jmp 0x140051637
cmp r15, r8
jb 0x140051690
lea rcx, [rbp + 0x3a8]
mov rdx, r14
call fcn.140055c60
mov r14, qword [rbp + 0x3a8]
movups xmm6, xmmword [rbp + 0x3b0]
movzx ebx, byte [rbp + 0x3c0]
mov eax, dword [rbp + 0x3c1]
mov dword [rbp + 0x408], eax
mov eax, dword [rbp + 0x3c4]
mov dword [rbp + 0x40b], eax
test rdi, rdi
je 0x14005156a
add rdi, rdi
mov r8d, 2
mov rcx, qword [rbp + 0x410]
mov rdx, rdi
call fcn.140007d30
cmp bl, 2
jne 0x1400515f3
mov rsi, qword [rbp + 0x3e8]
mov byte [rsi + 0x18], 2
mov eax, r14d
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x140051616
test rax, rax
je 0x140051616
lea rax, [r14 - 1]
mov qword [rbp + 0x410], rax
mov rcx, qword [r14 - 1]
mov rax, qword [r14 + 7]
mov qword [rbp + 0x3f8], rcx
mov qword [rbp + 0x3f0], rax
call qword [rax]
mov rax, qword [rbp + 0x3f0]
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x1400515da
mov r8, qword [rax + 0x10]
mov rcx, qword [rbp + 0x3f8]
call fcn.140007d30
mov edx, 0x18
mov r8d, 8
mov rcx, qword [rbp + 0x410]
call fcn.140007d30
jmp 0x140051616
mov eax, dword [rbp + 0x408]
mov ecx, dword [rbp + 0x40b]
mov rsi, qword [rbp + 0x3e8]
mov dword [rsi + 0x1c], ecx
mov dword [rsi + 0x19], eax
mov qword [rsi], r14
movups xmmword [rsi + 8], xmm6
mov byte [rsi + 0x18], bl
mov rdx, qword [rbp + 0x3e0]
test rdx, rdx
je 0x140051637
add rdx, rdx
mov r8d, 2
mov rcx, qword [rbp + 0x400]
call fcn.140007d30
mov rax, rsi
movaps xmm6, xmmword [rbp + 0x420]
add rsp, 0x4b8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
mov r14d, eax
shl r14, 0x20
or r14, 2
mov bl, 2
test rdi, rdi
jne 0x140051552
jmp 0x14005156a
lea rcx, str.internal_error:_entered_unreachable_code
lea r8, str.Ey_t_
mov edx, 0x28
call fcn.140083e40
jmp 0x1400516a5
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.140084370
ud2