Function at 0x1400606f4
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov r12, rcx
lea rbx, [0x14010ee78]
mov ebp, r9d
mov rcx, rbx
mov r14, r8
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov sil, byte [r12 + 0xd]
xor ecx, ecx
cmp ebp, ecx
setl al
and sil, 0x11
mov byte [rsp + 0xf8], al
cmp al, cl
jne 0x14006074d
test bpl, 0x40
je 0x140060754
xor ebp, ebp
mov sil, bpl
jmp 0x140060756
xor ebp, ebp
lea rdx, str.RANDOM
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebp
jne 0x14006077e
call fcn.140052f10
movabs rcx, 0x7fffffffffffffff
and rax, rcx
jmp 0x14006079a
lea rdx, str.__THIS
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebp
jne 0x140060801
lea rax, [r12 + 0x75bd036]
lea rcx, [rsp + 0x20]
mov rdx, rax
mov word [rsp + 0x20], bp
call fcn.1400c38f0
lea rcx, [rsp + 0x20]
mov word [rsp + 0x9a], bp
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
cmp eax, 1
cmovl edi, ebp
lea ecx, [rdi + 2]
movsxd rdx, ecx
mov rcx, r14
call fcn.140058138
sub edi, 1
mov r12, qword [r14]
mov rsi, r12
js 0x14006095c
lea rcx, [rsp + 0x20]
sub rcx, r12
movzx eax, word [rcx + rsi]
mov word [rsi], ax
add rsi, 2
sub edi, 1
jns 0x1400607ec
jmp 0x14006095c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r13b, bpl
movsx r15d, sil
cmp byte [rsp + 0xf8], bpl
jne 0x14006082e
cmp word [rdi], 0x26
je 0x140060908
cmp sil, bpl
jne 0x1400608df
mov edx, 0x52
mov rcx, r14
call fcn.140058138
mov r12, qword [r14]
xor ecx, ecx
mov word [r12], bp
mov rsi, r12
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdx, qword [r14]
mov r8d, 0x50
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
xor eax, eax
cmp ebp, eax
jle 0x1400608ae
cmp word [r12], ax
jne 0x1400608a6
lea ecx, [rbp + 0xc]
movsxd rdx, ecx
mov rcx, r14
call fcn.140058138
mov r12, qword [r14]
xor eax, eax
xor ecx, ecx
mov word [r12], ax
mov rsi, r12
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdx, qword [r14]
lea r8d, [rbp + 0xa]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
xor eax, eax
cmp ebp, eax
jg 0x140060953
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x14006094d
xor ebp, ebp
cmp r13b, bpl
jne 0x14006094d
mov r13b, 1
cmp byte [rsp + 0xf8], bpl
jne 0x14006094d
mov r12, qword [rsp + 0xe0]
or r9d, 0xffffffff
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
call fcn.14001b59c
cmp rax, rbp
jne 0x140060914
cmp r15d, ebp
jne 0x140060922
cmp r13b, bpl
jne 0x140060922
mov r13b, 1
jmp 0x14006082e
add rdi, 2
mov r15d, 1
jmp 0x1400608df
mov rdi, qword [rax]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
lea ecx, [rbp + 2]
movsxd rdx, ecx
mov rcx, r14
call fcn.140058138
mov r12, qword [r14]
mov rsi, r12
jmp 0x140060946
movzx eax, word [rdi]
mov word [rsi], ax
add rsi, 2
add rdi, 2
sub ebp, 1
jns 0x140060938
jmp 0x14006095a
xor eax, eax
cmp ebp, eax
jle 0x14006095a
movsxd rcx, ebp
lea rsi, [r12 + rcx*2]
xor ebp, ebp
mov word [rsi], bp
cmp rbx, rbp
je 0x14006096d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, r12
mov rbx, qword [rsp + 0xe8]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret