Function at 0x140235af4
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x1405420e0]
xor rax, rsp
mov qword [rbp], rax
mov r15, r8
mov rsi, rdx
mov rbx, rcx
mov qword [rsp + 0x38], rcx
lea rcx, [rsp + 0x48]
call fcn.14005da24
nop
xor edi, edi
mov r12d, edi
mov r9, r15
cmp qword [r15 + 0x18], 8
jb 0x140235b53
mov r9, qword [r15]
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
mov r14, qword [r15 + 0x10]
mov qword [rsp + 0x20], r14
mov r8, r12
mov rdx, qword [rsp + 0x58]
call fcn.1401fc598
mov r13, rax
mov qword [rsp + 0x38], rax
cmp rax, 0xffffffffffffffff
je 0x140235ec7
mov r9, r15
cmp qword [r15 + 0x18], 8
jb 0x140235b99
mov r9, qword [r15]
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
mov qword [rsp + 0x20], r14
lea r8, [rax + 1]
mov rdx, qword [rsp + 0x58]
call fcn.1401fc598
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140235ead
sub rax, r13
mov qword [rsp + 0x30], rax
lea r9, [rax - 1]
lea r8, [r13 + 1]
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x48]
call fcn.140067800
nop
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rcx, qword [rbp - 0x78]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov r13d, eax
xor edi, edi
test eax, eax
je 0x140235ded
dec eax
mov r14d, eax
mov qword [rsp + 0x78], rdi
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], di
cmp r14, 7
ja 0x140235c58
mov qword [rsp + 0x78], r14
test eax, eax
je 0x140235c4b
movzx eax, di
lea rdi, [rsp + 0x68]
mov ecx, r14d
rep stosw word [rdi], ax
xor edi, edi
mov word [rsp + r14*2 + 0x68], di
mov r8, qword [rsp + 0x68]
jmp 0x140235c9f
mov rdi, r14
or rdi, 7
mov eax, 0xa
cmp rdi, rax
cmovb rdi, rax
lea rdx, [rdi + 1]
call fcn.1400553fc
mov r8, rax
mov qword [rsp + 0x78], r14
mov qword [rbp - 0x80], rdi
xor edi, edi
test r14, r14
je 0x140235c95
movzx eax, di
mov rdi, r8
mov rcx, r14
rep stosw word [rdi], ax
xor edi, edi
mov word [r8 + r14*2], di
mov qword [rsp + 0x68], r8
lea rdx, [rsp + 0x68]
cmp qword [rbp - 0x80], 8
cmovae rdx, r8
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rcx, qword [rbp - 0x78]
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
test eax, eax
je 0x140235d19
lea r9, [rsp + 0x68]
cmp qword [rbp - 0x80], 8
cmovae r9, qword [rsp + 0x68]
mov r8, qword [rsp + 0x30]
inc r8
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x48]
call fcn.1401d2964
nop
lea rcx, [rsp + 0x68]
call fcn.140055f70
nop
lea rcx, [rbp - 0x78]
call fcn.140055f70
jmp 0x140235b46
call fcn.1400550c0
mov rdi, qword [rax + 8]
xor r14d, r14d
cmp dword [rdi], 3
jbe 0x140235dc4
lea rax, str.Failed_to_extract_environment_variable
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], MsiGetActiveDatabase
cmp qword [rsi + 0x18], 8
jb 0x140235d4b
mov rsi, qword [rsi]
lea rcx, [0x1403cb630]
mov rax, r14
test rsi, rsi
je 0x140235d6b
mov rcx, rsi
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], r14w
jne 0x140235d61
mov qword [rbp - 0x20], rcx
lea eax, [rax*2 + 2]
mov dword [rbp - 0x18], eax
mov dword [rbp - 0x14], r14d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 4
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484bc3]
mov rcx, rdi
call fcn.140001208
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], 7
mov word [rbx], r14w
lea rcx, [rsp + 0x68]
call fcn.140055f70
nop
lea rcx, [rbp - 0x78]
call fcn.140055f70
jmp 0x140235eeb
call fcn.1400550c0
mov rdi, qword [rax + 8]
xor r14d, r14d
cmp dword [rdi], 3
jbe 0x140235e98
lea rax, str.Failed_to_find_environment_variable
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 0x24
cmp qword [rsi + 0x18], 8
jb 0x140235e1f
mov rsi, qword [rsi]
lea rcx, [0x1403cb630]
mov rax, r14
test rsi, rsi
je 0x140235e3f
mov rcx, rsi
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], r14w
jne 0x140235e35
mov qword [rbp - 0x20], rcx
lea eax, [rax*2 + 2]
mov dword [rbp - 0x18], eax
mov dword [rbp - 0x14], r14d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 4
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484bc3]
mov rcx, rdi
call fcn.140001208
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], 7
mov word [rbx], r14w
jmp 0x140235ddf
xor r14d, r14d
movups xmm0, xmmword [rsp + 0x48]
movups xmm1, xmmword [rsp + 0x58]
mov qword [rsp + 0x58], r14
mov word [rsp + 0x48], r14w
jmp 0x140235edb
movups xmm0, xmmword [rsp + 0x48]
movups xmm1, xmmword [rsp + 0x58]
mov qword [rsp + 0x58], rdi
mov word [rsp + 0x48], di
movups xmmword [rbx], xmm0
mov qword [rsp + 0x60], 7
movups xmmword [rbx + 0x10], xmm1
lea rcx, [rsp + 0x48]
call fcn.140055f70
mov rax, rbx
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.140356560
mov rbx, qword [rsp + 0x168]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret