Function at 0x4d82f0
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.004db150
mov r15, qword [rsp + 0xb0]
test r15, r15
je 0x4d8478
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 0x4d83c0
jmp 0x4d83a2
mov r15, r14
jae 0x4d84d9
cmp r8, 0x201
jae 0x4d83c0
lea r13, [rsp + 0xa8]
mov esi, 0x200
mov r12, r8
jmp 0x4d840b
sub r8, rbp
sub rbx, rbp
cmp rbx, r8
jae 0x4d83e7
lea rcx, [rsp + 0x40]
mov rdx, rbp
call fcn.004b6820
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 0x4d8437
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x4d85e8
mov r8d, r15d
cmp r12, r8
jne 0x4d8390
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x4d860d
mov r15, r14
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x4d83a2
jmp 0x4d83c0
mov rbx, qword [rsp + 0xa8]
mov eax, ebx
and eax, 3
cmp eax, 1
jne 0x4d84d0
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 0x4d84bf
mov r8, qword [rdi]
cmp qword [rax + 0x10], 0x11
jb 0x4d84b1
mov r8, qword [r8 - 8]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x00576170]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov byte [rsi + 0x18], 2
jmp 0x4d85d3
cmp rsi, r8
jb 0x4d8627
lea rcx, [rsp + 0x70]
mov rdx, r13
call fcn.004c4310
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 0x4d853c
mov rcx, qword [0x00576170]
xor edx, edx
mov r8, qword [rsp + 0x30]
call sub.kernel32.dll_HeapFree
cmp bl, 2
jne 0x4d8598
mov byte [rsi + 0x18], 2
mov eax, r14d
and eax, 3
cmp eax, 1
jne 0x4d85b8
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 0x4d8585
mov r8, qword [rdi]
cmp qword [rax + 0x10], 0x11
jb 0x4d8577
mov r8, qword [r8 - 8]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x00576170]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
jmp 0x4d85b8
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 0x4d85d3
mov r8, qword [rsp + 0x60]
mov rcx, qword [0x00576170]
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 0x4d8529
jmp 0x4d853c
lea rcx, str.internal_error:_entered_unreachable_code
lea r8, str.library_std_src_sys_windows_mod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.0042f210
jmp 0x4d863c
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.00430740
ud2