Function at 0x4c8c8d
Capabilities:
Query environment variable

Disassembly:
push rbp
push rdi
sub rsp, 0xe8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x80], rcx
mov qword [rbp + 0x88], rdx
mov qword [rbp + 0x90], r8
mov dword [rbp + 0x98], r9d
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x18], 0
cmp qword [rbp + 0x80], 0
je 0x4c8d00
cmp qword [rbp + 0x88], 0
je 0x4c8d00
cmp qword [rbp + 0x90], 0
jne 0x4c8d0a
mov eax, 0
jmp 0x4c92f3
mov rcx, qword [rbp + 0x80]
call fcn.004c87c4
cmp qword [rbp + 0x80], rax
jne 0x4c8f99
lea rcx, [0x00518720]
call sub.msvcrt.dll_getenv
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x4c8f99
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_strlen
add rax, 1
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 1
ja 0x4c8d61
mov qword [rbp - 8], 2
mov rcx, qword [rbp + 0x80]
call sub.msvcrt.dll_strlen
mov rdx, rax
mov rax, qword [rbp - 8]
add rax, rdx
add rax, 1
mov qword [rbp - 0x18], rax
add qword [rbp - 0x18], 4
cmp qword [rbp - 0x18], 0xfbf
ja 0x4c8dc1
mov rax, qword [rbp - 0x18]
add rax, 0xf
add rax, 0xf
shr rax, 4
shl rax, 4
call fcn.004ccca0
sub rsp, rax
lea rax, [rsp + 0x20]
add rax, 0xf
shr rax, 4
shl rax, 4
mov qword [rbp], rax
jmp 0x4c8dd9
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x18], rax
mov rax, qword [rbp - 0x10]
mov qword [rbp + 8], rax
mov rax, qword [rbp + 8]
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 8]
movzx eax, byte [rax]
cmp al, 0x3b
je 0x4c8e03
mov rax, qword [rbp + 8]
movzx eax, byte [rax]
test al, al
jne 0x4c8f8e
mov rax, qword [rbp + 8]
cmp rax, qword [rbp + 0x10]
jne 0x4c8e2f
mov rax, qword [rbp]
mov byte [rax], 0x2e
mov rax, qword [rbp]
add rax, 1
mov byte [rax], 0x2f
mov rax, qword [rbp]
add rax, 2
mov byte [rax], 0
jmp 0x4c8ec5
mov rdx, qword [rbp + 8]
mov rax, qword [rbp + 0x10]
sub rdx, rax
mov rax, rdx
mov rcx, rax
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 8]
sub rax, 1
movzx eax, byte [rax]
cmp al, 0x2f
je 0x4c8eaa
mov rax, qword [rbp + 8]
sub rax, 1
movzx eax, byte [rax]
cmp al, 0x5c
je 0x4c8eaa
mov rdx, qword [rbp + 8]
mov rax, qword [rbp + 0x10]
sub rdx, rax
mov rax, rdx
mov rdx, rax
mov rax, qword [rbp]
add rax, rdx
mov byte [rax], 0x2f
mov rdx, qword [rbp + 8]
mov rax, qword [rbp + 0x10]
sub rdx, rax
mov rax, rdx
lea rdx, [rax + 1]
mov rax, qword [rbp]
add rax, rdx
mov byte [rax], 0
jmp 0x4c8ec5
mov rdx, qword [rbp + 8]
mov rax, qword [rbp + 0x10]
sub rdx, rax
mov rax, rdx
mov rdx, rax
mov rax, qword [rbp]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp]
mov rdx, qword [rbp + 0x80]
mov rcx, rax
call sub.msvcrt.dll_strcat
mov rax, qword [rbp]
mov edx, 1
mov rcx, rax
call fcn.004c8880
test eax, eax
je 0x4c8f35
mov rax, qword [rbp]
mov rcx, 0xffffffffffffffff
mov rdx, rax
mov eax, 0
mov rdi, rdx
repne scasb al, byte [rdi]
mov rax, rcx
not rax
lea rdx, [rax - 1]
mov rax, qword [rbp]
add rax, rdx
mov dword [rax], 0x6578652e
mov byte [rax + 4], 0
mov rax, qword [rbp]
mov edx, 1
mov rcx, rax
call fcn.004c8880
test eax, eax
jne 0x4c8f6d
lea rdx, [rbp - 0x60]
mov rax, qword [rbp]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__stat64]
call rax
test eax, eax
js 0x4c8f6d
movzx eax, word [rbp - 0x5a]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x8000
jne 0x4c8f6d
mov rax, qword [rbp]
mov qword [rbp + 0x80], rax
jmp 0x4c8f99
mov rax, qword [rbp + 8]
movzx eax, byte [rax]
test al, al
je 0x4c8f98
mov rax, qword [rbp + 8]
add rax, 1
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x10]
mov qword [rbp + 8], rax
jmp 0x4c8f93
add qword [rbp + 8], 1
jmp 0x4c8de9
nop
cmp dword [rbp + 0x98], 0
je 0x4c8fb4
mov rcx, qword [rbp + 0x80]
call fcn.004c87e0
mov qword [rbp + 0x20], rax
jmp 0x4c8fc4
mov rcx, qword [rbp + 0x80]
call sub.msvcrt.dll__strdup
mov qword [rbp + 0x20], rax
cmp qword [rbp + 0x20], 0
je 0x4c92ac
lea rdx, [rbp - 0x20]
mov rax, qword [rbp + 0x20]
mov rcx, rax
call fcn.004c8900
mov qword [rbp + 0x58], rax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_free
cmp qword [rbp + 0x58], 0
je 0x4c92af
lea rdx, [rbp - 0x24]
mov rax, qword [rbp + 0x88]
mov rcx, rax
call fcn.004c8900
mov qword [rbp + 0x50], rax
cmp qword [rbp + 0x50], 0
je 0x4c92b2
mov eax, dword [rbp - 0x20]
sub eax, 1
mov dword [rbp - 0x20], eax
mov edx, dword [rbp - 0x20]
mov eax, dword [rbp - 0x24]
cmp edx, eax
jne 0x4c9098
mov dword [rbp + 0x44], 0
jmp 0x4c9076
mov eax, dword [rbp + 0x44]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x50]
add rax, rdx
mov rdx, qword [rax]
mov eax, dword [rbp + 0x44]
cdqe
lea rcx, [rax*8]
mov rax, qword [rbp + 0x58]
add rax, rcx
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4c9080
add dword [rbp + 0x44], 1
mov eax, dword [rbp - 0x24]
cmp dword [rbp + 0x44], eax
jl 0x4c9038
jmp 0x4c9081
nop
mov eax, dword [rbp - 0x20]
test eax, eax
jle 0x4c92b5
mov eax, dword [rbp - 0x24]
cmp dword [rbp + 0x44], eax
je 0x4c92b5
lea rdx, [rbp - 0x28]
mov rax, qword [rbp + 0x90]
mov rcx, rax
call fcn.004c8900
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
je 0x4c92b8
mov edx, dword [rbp - 0x24]
mov eax, dword [rbp - 0x28]
cmp edx, eax
cmovle eax, edx
mov dword [rbp - 0x1c], eax
mov dword [rbp + 0x40], 0
jmp 0x4c910f
mov eax, dword [rbp + 0x40]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x48]
add rax, rdx
mov rdx, qword [rax]
mov eax, dword [rbp + 0x40]
cdqe
lea rcx, [rax*8]
mov rax, qword [rbp + 0x50]
add rax, rcx
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4c9119
add dword [rbp + 0x40], 1
mov eax, dword [rbp + 0x40]
cmp eax, dword [rbp - 0x1c]
jl 0x4c90d1
jmp 0x4c911a
nop
cmp dword [rbp + 0x40], 0
je 0x4c92bb
mov dword [rbp + 0x3c], 0
mov dword [rbp + 0x44], 0
jmp 0x4c9161
mov eax, dword [rbp + 0x44]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x58]
add rax, rdx
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov edx, eax
mov eax, dword [rbp + 0x3c]
add eax, edx
mov dword [rbp + 0x3c], eax
add dword [rbp + 0x44], 1
mov eax, dword [rbp - 0x20]
cmp dword [rbp + 0x44], eax
jl 0x4c9134
mov eax, dword [rbp - 0x24]
sub eax, dword [rbp + 0x40]
cdqe
mov edx, eax
mov eax, edx
add eax, eax
add edx, eax
mov eax, dword [rbp + 0x3c]
add eax, edx
mov dword [rbp + 0x3c], eax
mov eax, dword [rbp + 0x40]
mov dword [rbp + 0x44], eax
jmp 0x4c91b6
mov eax, dword [rbp + 0x44]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x48]
add rax, rdx
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov edx, eax
mov eax, dword [rbp + 0x3c]
add eax, edx
mov dword [rbp + 0x3c], eax
add dword [rbp + 0x44], 1
mov eax, dword [rbp - 0x28]
cmp dword [rbp + 0x44], eax
jl 0x4c9189
add dword [rbp + 0x3c], 1
mov eax, dword [rbp + 0x3c]
cdqe
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp + 0x30], rax
cmp qword [rbp + 0x30], 0
je 0x4c92be
mov rax, qword [rbp + 0x30]
mov byte [rax], 0
mov dword [rbp + 0x44], 0
jmp 0x4c9215
mov eax, dword [rbp + 0x44]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x58]
add rax, rdx
mov rdx, qword [rax]
mov rax, qword [rbp + 0x30]
mov rcx, rax
call sub.msvcrt.dll_strcat
add dword [rbp + 0x44], 1
mov eax, dword [rbp - 0x20]
cmp dword [rbp + 0x44], eax
jl 0x4c91ee
mov rax, qword [rbp + 0x30]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov rdx, rax
mov rax, qword [rbp + 0x30]
add rax, rdx
mov qword [rbp + 0x28], rax
mov eax, dword [rbp + 0x40]
mov dword [rbp + 0x44], eax
jmp 0x4c9264
mov rax, qword [rbp + 0x28]
mov word [rax], 0x2e2e
mov byte [rax + 2], 0
add qword [rbp + 0x28], 2
mov rax, qword [rbp + 0x28]
lea rdx, [rax + 1]
mov qword [rbp + 0x28], rdx
mov byte [rax], 0x2f
add dword [rbp + 0x44], 1
mov eax, dword [rbp - 0x24]
cmp dword [rbp + 0x44], eax
jl 0x4c923f
mov rax, qword [rbp + 0x28]
mov byte [rax], 0
mov eax, dword [rbp + 0x40]
mov dword [rbp + 0x44], eax
jmp 0x4c92a2
mov eax, dword [rbp + 0x44]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x48]
add rax, rdx
mov rdx, qword [rax]
mov rax, qword [rbp + 0x30]
mov rcx, rax
call sub.msvcrt.dll_strcat
add dword [rbp + 0x44], 1
mov eax, dword [rbp - 0x28]
cmp dword [rbp + 0x44], eax
jl 0x4c927b
jmp 0x4c92b5
nop
jmp 0x4c92bf
nop
jmp 0x4c92bf
nop
jmp 0x4c92bf
nop
jmp 0x4c92bf
nop
jmp 0x4c92bf
nop
jmp 0x4c92bf
nop
mov rax, qword [rbp + 0x58]
mov rcx, rax
call fcn.004c8c20
mov rax, qword [rbp + 0x50]
mov rcx, rax
call fcn.004c8c20
mov rax, qword [rbp + 0x48]
mov rcx, rax
call fcn.004c8c20
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp + 0x30]
lea rsp, [rbp + 0x68]
pop rdi
pop rbp
ret