Function at 0x4c7020
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x148
cmp byte [rdx + 0x18], 0
je 0x4c7055
mov qword [rsp + 0xc8], rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0xd8], xmm0
mov rbx, qword [rdx + 0x10]
jmp 0x4c71da
mov rbx, qword [rdx + 0x10]
test rbx, rbx
je 0x4c7587
mov qword [rsp + 0x118], rdx
mov qword [rsp + 0xc8], rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0xd8], xmm0
call sub.kernel32.dll_GetEnvironmentStringsW
test rax, rax
je 0x4c75fc
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0xf0], rax
lea r13, [rsp + 0xb0]
lea r14, [rsp + 0xe8]
lea r15, [rsp + 0xf8]
lea r12, [rsp + 0x28]
lea rbp, [rsp + 0x90]
lea rcx, [rsp + 0x48]
mov rdx, r14
call fcn.004b8a30
cmp byte [rsp + 0x60], 2
je 0x4c71c5
movups xmm0, xmmword [rsp + 0x48]
movups xmm1, xmmword [rsp + 0x58]
movaps xmmword [rsp + 0x130], xmm1
movaps xmmword [rsp + 0x120], xmm0
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rax, qword [rsp + 0x128]
mov rcx, qword [rsp + 0x130]
add rcx, rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], rax
mov word [rsp + 0x38], 0
mov rcx, r15
mov rdx, r12
call fcn.004cd1b0
movups xmm0, xmmword [rsp + 0x48]
movups xmm1, xmmword [rsp + 0x58]
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0xa0], xmm1
mov rax, qword [rsp + 0x108]
mov qword [r13 + 0x10], rax
movups xmm0, xmmword [rsp + 0xf8]
movups xmmword [r13], xmm0
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x30], rsi
lea rax, [rsp + 0x78]
movups xmm0, xmmword [rax]
lea rax, [rsp + 0x38]
movups xmmword [rax], xmm0
mov rcx, r15
lea rdx, [rsp + 0xd0]
mov r8, rbp
mov r9, r12
call fcn.004b3830
cmp byte [rsp + 0x110], 2
je 0x4c70c0
mov rdx, qword [rsp + 0xf8]
test rdx, rdx
je 0x4c70c0
mov rcx, qword [rsp + 0x100]
mov r8d, 1
call fcn.00422030
jmp 0x4c70c0
mov rcx, qword [rsp + 0xe8]
call sub.kernel32.dll_FreeEnvironmentStringsW
mov rdx, qword [rsp + 0x118]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
xor edx, edx
test rcx, rcx
sete dl
add rdx, rdx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x68], rdx
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rcx
test rcx, rcx
je 0x4c7549
test rbx, rbx
je 0x4c7549
lea rsi, [rsp + 0x50]
lea rdi, [rsp + 0x90]
lea r14, [rsp + 0xd0]
jmp 0x4c725c
mov r8d, 1
call fcn.00422030
mov rbx, qword [rsp + 0x88]
test rbx, rbx
je 0x4c7549
dec rbx
mov qword [rsp + 0x88], rbx
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x4c7280
cmp eax, 2
jne 0x4c731e
jmp 0x4c7590
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x58]
test rcx, rcx
je 0x4c72fe
mov rdx, rcx
and rdx, 7
je 0x4c7421
xor r8d, r8d
nop
mov rax, qword [rax + 0x3d8]
inc r8
cmp rdx, r8
jne 0x4c72a0
mov rdx, rcx
sub rdx, r8
cmp rcx, 8
jb 0x4c72fe
nop dword [rax + rax]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
mov rax, qword [rax + 0x3d8]
add rdx, 0xfffffffffffffff8
jne 0x4c72c0
mov qword [rsp + 0x48], 1
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], 0
mov rcx, rsi
call fcn.004e99b0
mov r12, rax
test rax, rax
je 0x4c7549
mov r13, rdx
cmp byte [rdx + 0x18], 2
jne 0x4c7380
mov rcx, rdi
mov rdx, r14
mov r8, r12
call fcn.004b3a50
cmp byte [rsp + 0xa8], 2
je 0x4c724b
mov rdx, qword [rsp + 0x90]
test rdx, rdx
je 0x4c724b
mov rcx, qword [rsp + 0x98]
jmp 0x4c7240
mov rsi, qword [r12 + 8]
mov rbp, qword [r12 + 0x10]
test rbp, rbp
je 0x4c73af
js 0x4c75ad
mov edx, 1
mov rcx, rbp
call fcn.00422020
mov r15, rax
test rax, rax
jne 0x4c73b5
jmp 0x4c75b7
mov r15d, 1
mov rcx, r15
mov rdx, rsi
mov r8, rbp
call sub.msvcrt.dll_memcpy
movzx esi, byte [r12 + 0x18]
mov rdx, qword [r12 + 0x28]
mov rdi, qword [r12 + 0x30]
test rdi, rdi
je 0x4c7416
xor ebx, ebx
mov rax, rdi
shr rax, 0x3e
sete al
jne 0x4c75c9
lea r12, [rdi + rdi]
mov bl, al
add rbx, rbx
test r12, r12
je 0x4c7433
mov rcx, r12
mov r14, rdx
mov rdx, rbx
call fcn.00422020
mov rdx, r14
mov r14, rax
test r14, r14
jne 0x4c743f
jmp 0x4c75d3
mov r14d, 2
xor r12d, r12d
jmp 0x4c743f
mov rdx, rcx
cmp rcx, 8
jae 0x4c72c0
jmp 0x4c72fe
mov r14, rbx
test r14, r14
je 0x4c75d3
mov rcx, r14
mov r8, r12
call sub.msvcrt.dll_memcpy
mov qword [rsp + 0x90], rbp
mov qword [rsp + 0x98], r15
mov qword [rsp + 0xa0], rbp
mov byte [rsp + 0xa8], sil
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2b]
lea rdx, [rsp + 0xa9]
mov dword [rdx], eax
mov dword [rdx + 3], ecx
mov qword [rsp + 0xb0], rdi
mov qword [rsp + 0xb8], r14
mov qword [rsp + 0xc0], rdi
mov rbx, qword [r13 + 8]
mov rsi, qword [r13 + 0x10]
test rsi, rsi
je 0x4c74c4
js 0x4c75e3
mov edx, 1
mov rcx, rsi
call fcn.00422020
mov r14, rax
test rax, rax
jne 0x4c74ca
jmp 0x4c75ed
mov r14d, 1
mov rcx, r14
mov rdx, rbx
mov r8, rsi
call sub.msvcrt.dll_memcpy
movzx eax, byte [r13 + 0x18]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x38], rsi
mov byte [rsp + 0x40], al
lea rcx, [rsp + 0xf8]
lea r14, [rsp + 0xd0]
mov rdx, r14
lea rdi, [rsp + 0x90]
mov r8, rdi
lea r9, [rsp + 0x28]
call fcn.004b3830
cmp byte [rsp + 0x110], 2
lea rsi, [rsp + 0x50]
je 0x4c724b
mov rdx, qword [rsp + 0xf8]
test rdx, rdx
je 0x4c724b
mov rcx, qword [rsp + 0x100]
jmp 0x4c7240
mov rax, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0xc8]
mov qword [rcx + 0x18], rax
movups xmm0, xmmword [rsp + 0xd0]
movups xmmword [rcx + 8], xmm0
mov qword [rcx], 1
mov rax, rcx
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rcx], 0
jmp 0x4c7570
lea rcx, [0x00644790]
lea r8, [0x00644818]
mov edx, 0x2b
call fcn.00532500
jmp 0x4c766f
call fcn.0050e470
jmp 0x4c766f
mov edx, 1
mov rcx, rbp
call fcn.0050fe70
jmp 0x4c766f
call fcn.0050e470
jmp 0x4c766f
mov rcx, r12
mov rdx, rbx
call fcn.0050fe70
jmp 0x4c766f
call fcn.0050e470
jmp 0x4c766f
mov edx, 1
mov rcx, rsi
call fcn.0050fe70
jmp 0x4c766f
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x90], rax
lea rax, [0x004bc870]
mov qword [rsp + 0x98], rax
lea rax, str.failure_getting_env_string_from_OS:
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], 1
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x90]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], 1
lea rdx, str.library_std_src_sys_windows_os.rs
lea rcx, [rsp + 0x48]
call fcn.00532480
ud2