Function at 0x14003a1a0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rax, qword [rdx + 8]
mov rsi, qword [rcx]
mov r13, qword [rcx + 8]
mov rbp, qword [rdx]
lea r12, [rsp + 0x60]
lea r15, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov edi, r8d
mov rdx, r15
mov rcx, r12
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r13
call sym.newWideCString__stdZwidestrs_u305
mov rax, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
mov rcx, qword [0x14018fe10]
mov qword [rsp + 0x28], rax
call sym.__emutls_get_address
mov rbx, rax
movzx eax, byte [rax]
test al, al
jne 0x14003a550
test edi, edi
je 0x14003a3c8
test rbp, rbp
je 0x14003a440
lea rdx, [rsi + rbp + 1]
mov rcx, r12
call sym.rawNewString
mov rdi, qword [rsp + 0x68]
mov r9, qword [rsp + 0x60]
lea r10, [r9 + rdi + 8]
test rsi, rsi
jle 0x14003a2ad
mov r8, rsi
add r8, 1
jo 0x14003a6a0
test r8, r8
js 0x14003a850
mov rcx, r10
lea rdx, [r13 + 8]
mov qword [rsp + 0x38], r9
call sym.memcpy
mov r9, qword [rsp + 0x38]
mov r10, rax
add rsi, r9
jo 0x14003a6a0
lea r10, [rsi + rdi + 8]
mov r9, rsi
mov rsi, r9
mov eax, 0x3d
add rsi, 1
mov word [r10], ax
jo 0x14003a8d8
test rbp, rbp
jle 0x14003a2fd
mov r8, rbp
add r8, 1
jo 0x14003aa09
test r8, r8
js 0x14003a888
mov rdx, qword [rsp + 0x30]
lea rcx, [rsi + rdi + 8]
add rdx, 8
call sym.memcpy
add rbp, rsi
jo 0x14003aa09
mov rsi, rbp
mov rdx, r15
mov rcx, r12
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
call sym.newWideCString__stdZwidestrs_u305
cmp byte [rbx], 0
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
jne 0x14003a668
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__wputenv]
mov r13d, eax
test eax, eax
je 0x14003a5e0
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, r12
mov dword [rax], 0x16
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a938
test rdi, rdi
je 0x14003a36f
test byte [rdi + 7], 0x40
je 0x14003a8b0
movdqa xmm4, xmmword [rsp + 0x80]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm4
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a3b9
movdqa xmm5, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm5
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a3b9
mov rax, qword [rsp + 0x28]
mov rcx, r12
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x60], rax
call sym.eqdestroy___stdZwidestrs_u7
mov r13d, 0xffffffff
jmp 0x14003a427
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wgetenv]
test rax, rax
je 0x14003a243
movdqa xmm0, xmmword [rsp + 0x80]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm0
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a424
movdqa xmm1, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm1
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a424
mov rax, qword [rsp + 0x28]
mov rcx, r12
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x60], rax
call sym.eqdestroy___stdZwidestrs_u7
xor r13d, r13d
mov eax, r13d
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsi + 3]
mov rcx, r12
call sym.rawNewString
mov r15, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov rdi, r15
lea r9, [rbp + r15 + 8]
test rsi, rsi
jle 0x14003a499
mov r8, rsi
add r8, 1
jo 0x14003a920
test r8, r8
js 0x14003a8f0
mov rcx, r9
lea rdx, [r13 + 8]
call sym.memcpy
add rsi, rbp
mov r9, rax
jo 0x14003a920
lea r9, [rsi + r15 + 8]
mov rbp, rsi
mov rax, rbp
mov dword [r9], 0x20203d
add rax, 3
jo 0x14003a950
lea rcx, [rsp + 0x70]
mov rdx, r12
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], r15
call sym.newWideCString__stdZwidestrs_u305
movzx eax, byte [rbx]
test al, al
jne 0x14003a948
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.msvcrt.dll__wputenv]
mov r13d, eax
test eax, eax
je 0x14003a6d0
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, r12
movdqa xmm5, xmmword [rsp + 0x80]
mov dword [rax], 0x16
movaps xmmword [rsp + 0x60], xmm5
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a3b9
movdqa xmm3, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm3
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a3b9
test r15, r15
je 0x14003a3a2
test byte [r15 + 7], 0x40
jne 0x14003a3a2
mov rcx, r15
call sym.deallocShared
jmp 0x14003a3a2
xor edi, edi
xor r13d, r13d
movdqa xmm2, xmmword [rsp + 0x80]
mov byte [rbx], 0
mov rcx, r12
mov byte [rsp + 0x30], al
movaps xmmword [rsp + 0x60], xmm2
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a427
movdqa xmm3, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm3
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a427
test rdi, rdi
movzx eax, byte [rsp + 0x30]
je 0x14003a5ab
test byte [rdi + 7], 0x40
je 0x14003a8c0
mov byte [rsp + 0x30], al
mov rax, qword [rsp + 0x28]
mov rcx, r12
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x60], rax
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a427
movzx eax, byte [rsp + 0x30]
mov byte [rbx], al
jmp 0x14003a427
mov rcx, r12
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a694
test rdi, rdi
je 0x14003a60a
test byte [rdi + 7], 0x40
je 0x14003a6c0
movdqa xmm4, xmmword [rsp + 0x80]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm4
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a427
movdqa xmm2, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm2
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a427
mov rax, qword [rsp + 0x28]
mov rcx, r12
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x60], rax
call sym.eqdestroy___stdZwidestrs_u7
jmp 0x14003a427
mov byte [rbx], 0
mov rcx, r12
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a691
test rdi, rdi
je 0x14003a691
test byte [rdi + 7], 0x40
je 0x14003a9b9
xor r13d, r13d
mov eax, 1
xor edi, edi
jmp 0x14003a555
mov qword [rsp + 0x40], r10
mov qword [rsp + 0x38], r9
call sym.raiseOverflow
mov r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x40]
jmp 0x14003a2ad
mov rcx, rdi
call sym.deallocShared
jmp 0x14003a60a
mov rsi, qword [sym.imp.msvcrt.dll__wgetenv]
mov rcx, r14
call rsi
xor edx, edx
mov rcx, r14
mov word [rax], dx
call rsi
mov ecx, 0x3d
mov word [rax + 2], cx
mov rax, qword [sym.imp.msvcrt.dll__environ]
mov rax, qword [rax]
cmp qword [rax], 0
je 0x14003a7b7
xor r8d, r8d
xor ecx, ecx
mov rdx, r14
call sym.wcstombs
cmp rax, 0xffffffffffffffff
je 0x14003a7b7
test rax, rax
js 0x14003a9e9
add rax, 1
mov rsi, rax
jo 0x14003aa13
test rax, rax
js 0x14003a9c6
mov rdx, rax
mov rcx, r12
call sym.newSeq__stdZprivateZwin95setenv_u138
mov rbp, qword [rsp + 0x60]
mov r9, qword [rsp + 0x68]
test rbp, rbp
jle 0x14003a9f6
lea rcx, [r9 + 8]
mov r8, rsi
mov rdx, r14
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x40], rcx
call sym.wcstombs
mov r9, qword [rsp + 0x38]
cmp rax, 0xffffffffffffffff
je 0x14003a7a5
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x38], rcx
call sym.getenv
mov rcx, qword [rsp + 0x38]
mov byte [rax], 0
call sym.getenv
mov r9, qword [rsp + 0x48]
mov byte [rax + 1], 0x3d
mov rcx, r12
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], r9
call sym.eqdestroy___stdZprivateZwin95setenv_u149
mov rax, qword [rsp + 0x30]
mov rdx, r12
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], rax
call sym.newWideCString__stdZwidestrs_u305
movzx eax, byte [rbx]
test al, al
jne 0x14003a555
mov rdx, qword [rsp + 0x88]
mov rcx, r14
call qword [0x1401a8340]
test eax, eax
jne 0x14003a95d
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, r12
movdqa xmm5, xmmword [rsp + 0x80]
mov dword [rax], 0x16
movaps xmmword [rsp + 0x60], xmm5
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a3b9
movdqa xmm4, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm4
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
je 0x14003a52c
jmp 0x14003a3b9
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov qword [rsp + 0x40], r10
movabs rcx, 0x8000000000000000
mov qword [rsp + 0x38], r9
call sym.raiseRangeErrorI
mov r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x40]
jmp 0x14003a2ad
movabs r8, 0x7fffffffffffffff
xor edx, edx
movabs rcx, 0x8000000000000000
call sym.raiseRangeErrorI
jmp 0x14003a2fd
mov rcx, rdi
call sym.deallocShared
jmp 0x14003a36f
mov rcx, rdi
call sym.deallocShared
movzx eax, byte [rsp + 0x30]
jmp 0x14003a5ab
mov qword [rsp + 0x38], r9
call sym.raiseOverflow
mov rsi, qword [rsp + 0x38]
jmp 0x14003a2c3
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov qword [rsp + 0x38], r9
movabs rcx, 0x8000000000000000
call sym.raiseRangeErrorI
mov r9, qword [rsp + 0x38]
jmp 0x14003a499
mov qword [rsp + 0x38], r9
call sym.raiseOverflow
mov r9, qword [rsp + 0x38]
jmp 0x14003a499
mov r13d, 0xffffffff
jmp 0x14003a694
xor r13d, r13d
jmp 0x14003a555
call sym.raiseOverflow
mov rax, rbp
jmp 0x14003a4ad
movdqa xmm5, xmmword [rsp + 0x80]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm5
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a424
movdqa xmm3, xmmword [rsp + 0x70]
mov rcx, r12
movaps xmmword [rsp + 0x60], xmm3
call sym.eqdestroy___stdZwidestrs_u7
cmp byte [rbx], 0
jne 0x14003a424
test r15, r15
je 0x14003a40d
test byte [r15 + 7], 0x40
jne 0x14003a40d
mov rcx, r15
call sym.deallocShared
jmp 0x14003a40d
mov rcx, rdi
call sym.deallocShared
jmp 0x14003a691
movabs r8, 0x7fffffffffffffff
xor edx, edx
movabs rcx, 0x8000000000000000
call sym.raiseRangeErrorI
movzx eax, byte [rbx]
jmp 0x14003a555
call sym.raiseRangeErrorNoArgs
movzx eax, byte [rbx]
jmp 0x14003a555
lea rdx, [rbp - 1]
xor ecx, ecx
call sym.raiseIndexError2
movzx eax, byte [rbx]
jmp 0x14003a555
call sym.raiseOverflow
jmp 0x14003a2fd
call sym.raiseOverflow
movzx eax, byte [rbx]
jmp 0x14003a555