Function at 0x4d3df0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4a8
mov rsi, rcx
lea rcx, [rsp + 0xa8]
call fcn.004d6c50
mov r15, qword [rsp + 0xb0]
test r15, r15
je 0x4d3f78
mov qword [rsp + 0x38], rsi
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xb8]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 2
mov qword [rsp + 0x50], 0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x30], rax
xor edi, edi
xor ebx, ebx
xor ebp, ebp
cmp r8, 0x201
jae 0x4d3ec0
jmp 0x4d3ea2
mov r15, r14
jae 0x4d3fd9
cmp r8, 0x201
jae 0x4d3ec0
lea r13, [rsp + 0xa8]
mov esi, 0x200
mov r12, r8
jmp 0x4d3f0b
sub r8, rbp
sub rbx, rbp
cmp rbx, r8
jae 0x4d3ee7
lea rcx, [rsp + 0x40]
mov rdx, rbp
call fcn.004b2340
mov rdi, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov eax, 0xffffffff
cmp rdi, rax
mov ebp, 0xffffffff
cmovb rbp, rdi
mov qword [rsp + 0x50], rbp
mov rbx, rdi
mov r13, qword [rsp + 0x30]
mov rsi, rbp
mov r12, rbp
xor ecx, ecx
call sub.kernel32.dll_SetLastError
mov r14, r15
mov rcx, r15
mov rdx, r13
mov r8d, r12d
call sub.kernel32.dll_GetEnvironmentVariableW
mov r15d, eax
test eax, eax
jne 0x4d3f37
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x4d40e8
mov r8d, r15d
cmp r12, r8
jne 0x4d3e90
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x4d410d
mov r15, r14
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x4d3ea2
jmp 0x4d3ec0
mov rbx, qword [rsp + 0xa8]
mov eax, ebx
and eax, 3
cmp eax, 1
jne 0x4d3fd0
lea rdi, [rbx - 1]
mov rcx, qword [rbx - 1]
mov rax, qword [rbx + 7]
call qword [rax]
mov rax, qword [rbx + 7]
cmp qword [rax + 8], 0
je 0x4d3fbf
mov r8, qword [rdi]
cmp qword [rax + 0x10], 0x11
jb 0x4d3fb1
mov r8, qword [r8 - 8]
mov rcx, qword [0x00572170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x00572170]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov byte [rsi + 0x18], 2
jmp 0x4d40d3
cmp rsi, r8
jb 0x4d4127
lea rcx, [rsp + 0x70]
mov rdx, r13
call fcn.004bfe30
mov r14, qword [rsp + 0x70]
movups xmm0, xmmword [rsp + 0x78]
movaps xmmword [rsp + 0x90], xmm0
movzx ebx, byte [rsp + 0x88]
mov eax, dword [rsp + 0x89]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x8c]
mov dword [rsp + 0x2b], eax
mov rsi, qword [rsp + 0x38]
test rdi, rdi
je 0x4d403c
mov rcx, qword [0x00572170]
xor edx, edx
mov r8, qword [rsp + 0x30]
call sub.kernel32.dll_HeapFree
cmp bl, 2
jne 0x4d4098
mov byte [rsi + 0x18], 2
mov eax, r14d
and eax, 3
cmp eax, 1
jne 0x4d40b8
lea rdi, [r14 - 1]
mov rcx, qword [r14 - 1]
mov rax, qword [r14 + 7]
call qword [rax]
mov rax, qword [r14 + 7]
cmp qword [rax + 8], 0
je 0x4d4085
mov r8, qword [rdi]
cmp qword [rax + 0x10], 0x11
jb 0x4d4077
mov r8, qword [r8 - 8]
mov rcx, qword [0x00572170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x00572170]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
jmp 0x4d40b8
mov qword [rsi], r14
movaps xmm0, xmmword [rsp + 0x90]
movups xmmword [rsi + 8], xmm0
mov byte [rsi + 0x18], bl
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2b]
mov dword [rsi + 0x19], eax
mov dword [rsi + 0x1c], ecx
cmp qword [rsp + 0x58], 0
je 0x4d40d3
mov r8, qword [rsp + 0x60]
mov rcx, qword [0x00572170]
xor edx, edx
call sub.kernel32.dll_HeapFree
nop
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.kernel32.dll_GetLastError
mov r14d, eax
shl r14, 0x20
or r14, 2
mov bl, 2
mov rsi, qword [rsp + 0x38]
test rdi, rdi
jne 0x4d4029
jmp 0x4d403c
lea rcx, str.internal_error:_entered_unreachable_codeN
lea r8, str.library_std_src_sys_windows_mod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.0042fe50
jmp 0x4d413c
lea rax, str.library_std_src_sys_windows_mod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.004312c0
ud2