Function at 0x4bd4a0
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x80]
test rdx, rdx
mov rdi, rdx
mov rsi, rcx
sete dl
test r8, r8
mov r12, r8
sete al
mov r13d, r9d
or dl, al
jne 0x4bd694
test rcx, rcx
je 0x4bd694
call fcn.004bd190
xor r14d, r14d
cmp rax, rsi
je 0x4bd6a0
test r13d, r13d
mov rcx, rsi
jne 0x4bd660
call fcn.004c1810
mov r13, rax
xor ebx, ebx
test r13, r13
je 0x4bd63a
lea rdx, [rbp - 0x38]
mov rcx, r13
call fcn.004bd280
mov rcx, r13
mov rsi, rax
call sub.msvcrt.dll_free
test rsi, rsi
je 0x4bd63a
lea rdx, [rbp - 0x34]
mov rcx, rdi
call fcn.004bd280
test rax, rax
mov rdi, rax
je 0x4bd670
mov eax, dword [rbp - 0x38]
mov ebx, dword [rbp - 0x34]
lea r13d, [rax - 1]
cmp r13d, ebx
mov dword [rbp - 0x38], r13d
mov dword [rbp - 0x50], ebx
jne 0x4bd5b5
test r13d, r13d
jle 0x4bd680
lea ebx, [rax - 2]
lea rax, [rbx + 1]
xor ebx, ebx
mov qword [rbp - 0x48], rax
jmp 0x4bd58e
lea r15d, [rbx + 1]
add rbx, 1
cmp rbx, qword [rbp - 0x48]
je 0x4bd5a2
mov rdx, qword [rdi + rbx*8]
mov r15d, ebx
mov rcx, qword [rsi + rbx*8]
call fcn.004c1658
test eax, eax
je 0x4bd580
cmp dword [rbp - 0x50], r15d
je 0x4bd680
test r13d, r13d
jle 0x4bd680
lea rdx, [rbp - 0x30]
mov rcx, r12
call fcn.004bd280
test rax, rax
mov r12, rax
je 0x4bd680
mov ebx, dword [rbp - 0x34]
mov eax, dword [rbp - 0x30]
mov dword [rbp - 0x50], ebx
cmp ebx, eax
mov dword [rbp - 0x54], eax
cmovle eax, ebx
test eax, eax
jle 0x4bd9c8
lea ebx, [rax - 1]
xor r15d, r15d
add rbx, 1
jmp 0x4bd603
lea r13d, [r15 + 1]
add r15, 1
cmp rbx, r15
je 0x4bd830
mov rdx, qword [r12 + r15*8]
mov r13d, r15d
mov rcx, qword [rdi + r15*8]
call fcn.004c1658
test eax, eax
je 0x4bd5f2
xor ebx, ebx
test r15d, r15d
jne 0x4bd830
mov rcx, rsi
call fcn.004bd240
mov rcx, rdi
call fcn.004bd240
mov rcx, r12
call fcn.004bd240
mov rcx, r14
call sub.msvcrt.dll_free
mov rax, rbx
lea rsp, [rbp + 0x18]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call fcn.004bd1a0
mov r13, rax
jmp 0x4bd509
mov rcx, rsi
call fcn.004bd240
jmp 0x4bd63a
mov rcx, rsi
xor ebx, ebx
call fcn.004bd240
mov rcx, rdi
call fcn.004bd240
jmp 0x4bd63a
xor ebx, ebx
jmp 0x4bd642
lea rcx, [0x00504f20]
call sub.msvcrt.dll_getenv
test rax, rax
je 0x4bd4f5
mov rcx, rax
mov qword [rbp - 0x48], rax
call sub.msvcrt.dll_strlen
mov rcx, rsi
lea rbx, [rax + 1]
mov eax, 2
cmp rbx, 1
cmove rbx, rax
call sub.msvcrt.dll_strlen
mov rdx, qword [rbp - 0x48]
add rax, rbx
lea rcx, [rax + 5]
cmp rcx, 0xfbf
ja 0x4bd9b0
add rax, 0x23
and rax, 0xfffffffffffffff0
call fcn.004bfc50
sub rsp, rax
lea rbx, [rsp + 0x20]
lea rax, [rbp - 0x30]
mov r15, rdx
mov qword [rbp - 0x50], rax
jmp 0x4bd71f
lea rcx, [r15 + 1]
test al, al
je 0x4bd727
mov r15, rcx
movzx eax, byte [r15]
cmp al, 0x3b
jne 0x4bd714
cmp rdx, r15
je 0x4bd810
mov r10, r15
mov rcx, rbx
sub r10, rdx
mov r8, r10
mov qword [rbp - 0x48], r10
call sub.msvcrt.dll_memcpy
movzx eax, byte [r15 - 1]
mov r10, qword [rbp - 0x48]
cmp al, 0x2f
lea rdx, [rbx + r10]
je 0x4bd823
cmp al, 0x5c
je 0x4bd823
mov byte [rdx], 0x2f
mov byte [rbx + r10 + 1], 0
mov rdx, rsi
mov rcx, rbx
call sub.msvcrt.dll_strcat
xor edx, edx
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__access]
test eax, eax
je 0x4bd7d5
mov rdx, rbx
mov ecx, dword [rdx]
add rdx, 4
lea eax, [rcx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4bd788
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea rcx, [rdx + 2]
cmove rdx, rcx
mov ecx, eax
add cl, al
mov rcx, rbx
sbb rdx, 3
mov dword [rdx], 0x6578652e
mov byte [rdx + 4], 0
xor edx, edx
call qword [sym.imp.msvcrt.dll__access]
test eax, eax
jne 0x4bd7f8
mov rdx, qword [rbp - 0x50]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x4bd7f8
movzx eax, word [rbp - 0x2a]
and ax, 0xf000
cmp ax, 0x8000
je 0x4bd9a0
cmp byte [r15], 0
je 0x4bd4f5
lea rcx, [r15 + 1]
mov rdx, rcx
jmp 0x4bd71c
mov r8d, 0x2f2e
mov byte [rbx + 2], 0
mov word [rbx], r8w
jmp 0x4bd76b
mov byte [rdx], 0
jmp 0x4bd76b
mov eax, dword [rbp - 0x38]
test eax, eax
jle 0x4bd9cf
sub eax, 1
mov r15, rsi
xor ebx, ebx
lea rax, [rsi + rax*8 + 8]
mov qword [rbp - 0x48], rax
nop dword [rax]
mov rcx, qword [r15]
add r15, 8
call sub.msvcrt.dll_strlen
add eax, ebx
cmp r15, qword [rbp - 0x48]
mov ebx, eax
jne 0x4bd850
mov edx, dword [rbp - 0x50]
mov ecx, dword [rbp - 0x54]
sub edx, r13d
lea ebx, [rdx + rdx*2]
add eax, ebx
cmp ecx, r13d
mov dword [rbp - 0x48], eax
jle 0x4bd8a8
sub ecx, 1
movsxd rax, r13d
lea rbx, [r12 + rax*8]
mov r15d, ecx
sub r15d, r13d
add rax, r15
lea r15, [r12 + rax*8 + 8]
mov rcx, qword [rbx]
add rbx, 8
call sub.msvcrt.dll_strlen
add dword [rbp - 0x48], eax
cmp r15, rbx
jne 0x4bd894
mov eax, dword [rbp - 0x48]
add eax, 1
movsxd rcx, eax
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
je 0x4bd622
mov byte [rax], 0
mov eax, dword [rbp - 0x38]
test eax, eax
jle 0x4bd8f5
sub eax, 1
mov r15, rsi
lea rax, [rsi + rax*8 + 8]
mov qword [rbp - 0x48], rax
nop dword [rax + rax]
mov rdx, qword [r15]
mov rcx, rbx
add r15, 8
call sub.msvcrt.dll_strcat
cmp qword [rbp - 0x48], r15
jne 0x4bd8e0
mov rax, rbx
mov ecx, dword [rax]
add rax, 4
lea edx, [rcx - 0x1010101]
not ecx
and edx, ecx
and edx, 0x80808080
je 0x4bd8f8
mov ecx, edx
shr ecx, 0x10
test edx, 0x8080
cmove edx, ecx
lea rcx, [rax + 2]
cmove rax, rcx
mov ecx, edx
add cl, dl
mov edx, dword [rbp - 0x34]
sbb rax, 3
cmp edx, r13d
jle 0x4bd95e
sub edx, 1
sub edx, r13d
lea rdx, [rdx + rdx*2 + 3]
add rdx, rax
mov ecx, 0x2e2e
mov byte [rax + 2], 0
add rax, 3
mov word [rax - 3], cx
cmp rax, rdx
mov byte [rax - 1], 0x2f
jne 0x4bd944
mov byte [rax], 0
mov eax, dword [rbp - 0x30]
cmp eax, r13d
jle 0x4bd622
sub eax, 1
movsxd rdx, r13d
lea r15, [r12 + rdx*8]
sub eax, r13d
add rax, rdx
lea r13, [r12 + rax*8 + 8]
mov rdx, qword [r15]
mov rcx, rbx
add r15, 8
call sub.msvcrt.dll_strcat
cmp r15, r13
jne 0x4bd982
jmp 0x4bd622
mov rsi, rbx
jmp 0x4bd4f5
mov qword [rbp - 0x48], rdx
call sub.msvcrt.dll_malloc
mov rdx, qword [rbp - 0x48]
mov r14, rax
mov rbx, rax
jmp 0x4bd707
xor ebx, ebx
jmp 0x4bd622
xor eax, eax
jmp 0x4bd866