Function at 0x48b5c0
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]
mov dword [rbp - 0x44], r9d
mov r9d, dword [rcx + 8]
mov qword [rbp - 0x40], rcx
mov qword [rbp - 0x50], rdx
mov qword [rbp - 0x20], r8
test r9d, r9d
jle 0x48b910
mov rax, qword [rbp - 0x40]
mov r13, qword [rax + 0x10]
test r13, r13
je 0x48b710
cmp qword [r13 + 0x60], 0
mov eax, dword [r13 + 0x28]
mov dword [rbp - 0x18], eax
je 0x48b833
mov rdi, qword [rbp - 0x20]
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov rcx, rdi
mov rbx, rax
mov dword [rbp - 0x28], eax
call fcn.0048e090
mov ecx, dword [r13 + 0x58]
xor edx, edx
mov r12d, eax
mov r15d, dword [r13 + 0x68]
mov r14, qword [r13 + 0x60]
div ecx
lea r8d, [rcx - 2]
mov eax, r12d
mov edi, ecx
mov esi, edx
xor edx, edx
div r8d
mov eax, ebx
mov qword [rbp - 0x30], rax
lea r12d, [rdx + 1]
mov r9d, r12d
sub edi, r12d
sub r9d, ecx
jmp 0x48b6c9
mov ecx, dword [r13 + 0x18]
mov r10, qword [r13 + 0x30]
mov r11d, ebx
test ecx, ecx
mov eax, dword [r10 + r11*8]
je 0x48b685
bswap eax
xor edx, edx
cmp eax, dword [rbp - 0x28]
jb 0x48b6b6
test ecx, ecx
mov rax, qword [r13]
je 0x48b704
mov edx, dword [r10 + r11*8 + 4]
bswap edx
mov edx, edx
mov dword [rbp - 0x38], r9d
add rdx, rax
mov rcx, qword [rbp - 0x20]
call sub.msvcrt.dll_strcmp
mov r9d, dword [rbp - 0x38]
test eax, eax
sete dl
test dl, dl
jne 0x48b723
lea eax, [rsi + r9]
lea edx, [rsi + r12]
cmp esi, edi
cmovb eax, edx
mov esi, eax
mov eax, esi
test r15d, r15d
mov ebx, dword [r14 + rax*4]
je 0x48b6d6
bswap ebx
test ebx, ebx
je 0x48b710
sub ebx, 1
cmp dword [rbp - 0x18], ebx
ja 0x48b670
mov eax, ebx
sub eax, dword [rbp - 0x18]
xor edx, edx
mov rcx, qword [rbp - 0x30]
shl rax, 4
add rax, qword [r13 + 0x48]
cmp qword [rax], rcx
jbe 0x48b6b6
mov dword [rbp - 0x38], r9d
mov rdx, qword [rax + 8]
jmp 0x48b6a4
mov edx, dword [r10 + r11*8 + 4]
jmp 0x48b69d
xor eax, eax
lea rsp, [rbp + 0x18]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r15d, dword [rbp - 0x18]
cmp rbx, r15
jae 0x48b8b0
mov r8d, dword [r13 + 0x18]
mov rax, qword [r13]
mov rdx, qword [r13 + 0x38]
test r8d, r8d
je 0x48b8f0
lea rcx, [rdx + rbx*8]
mov edx, dword [rcx + 4]
mov r12d, dword [rcx]
mov ecx, dword [rbp - 0x44]
bswap edx
bswap r12d
mov edx, edx
add r12d, 1
add rax, rdx
test ecx, ecx
mov qword [rbp - 0x20], rax
je 0x48b8d4
mov rax, qword [rbp - 0x50]
test rax, rax
je 0x48b929
mov r14, qword [rax + 0x10]
test r14, r14
je 0x48b929
lea rax, [r13 + 0x80]
mov rcx, rax
mov qword [rbp - 0x28], rax
call fcn.0048d9f0
test eax, eax
jne 0x48ba72
mov rdi, qword [r13 + 0x78]
test rdi, rdi
je 0x48bb76
mov rax, qword [r13 + 0x70]
lea rdx, [rdi + rdi*2]
lea r15, [rax + rdx*8 - 0x18]
jmp 0x48b7cd
sub r15, 0x18
test rdi, rdi
je 0x48bb76
mov rcx, qword [r15]
mov rdx, r14
sub rdi, 1
mov rsi, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x48b7c0
mov rcx, qword [rbp - 0x28]
call fcn.0048dc80
test eax, eax
jne 0x48ba72
cmp qword [rsi + 8], 0xffffffffffffffff
je 0x48b8d4
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x48bdbd
cmp rax, 0xffffffffffffffff
je 0x48bb6d
mov rax, qword [rax + rbx*8]
test rax, rax
je 0x48b980
lea rdi, [rax + 8]
mov r12, qword [rax]
mov qword [rbp - 0x20], rdi
jmp 0x48b8d4
mov eax, dword [rbp - 0x18]
xor r15d, r15d
mov qword [rbp - 0x28], rax
mov rsi, rax
jmp 0x48b865
mov edx, dword [r14 + rbx*8 + 4]
mov rcx, qword [rbp - 0x20]
bswap edx
mov edx, edx
add rdx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
js 0x48b89a
je 0x48b920
lea r15, [rbx + 1]
cmp r15, rsi
jae 0x48b710
mov r12, qword [r13]
mov edi, dword [r13 + 0x18]
mov r14, qword [r13 + 0x30]
lea rbx, [rsi + r15]
shr rbx, 1
test edi, edi
jne 0x48b842
mov edx, dword [r14 + rbx*8 + 4]
mov rcx, qword [rbp - 0x20]
add rdx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jns 0x48b85b
cmp rbx, r15
jbe 0x48b710
mov rsi, rbx
jmp 0x48b87a
mov rax, rbx
sub rax, r15
shl rax, 4
add rax, qword [r13 + 0x50]
mov rdi, qword [rax + 8]
mov r12, qword [rax]
mov qword [rbp - 0x20], rdi
mov ecx, dword [rbp - 0x44]
test ecx, ecx
jne 0x48b76c
mov rax, qword [rbp + 0x80]
mov qword [rax], r12
mov rax, qword [rbp - 0x20]
jmp 0x48b712
lea rdx, [rdx + rbx*8]
mov edi, dword [rdx + 4]
mov r12d, dword [rdx]
add r12d, 1
add rax, rdi
mov qword [rbp - 0x20], rax
jmp 0x48b8c9
call fcn.0048c540
jmp 0x48b5f8
mov r15, qword [rbp - 0x28]
jmp 0x48b727
mov edx, dword [0x007ef808]
test edx, edx
je 0x48b950
mov r14, qword [0x007ef800]
test r14, r14
jne 0x48b786
call fcn.0048e0c0
mov r14, rax
jmp 0x48b786
lea rcx, str.OUTPUT_CHARSET
call sub.msvcrt.dll_getenv
test rax, rax
mov rsi, rax
je 0x48b96d
cmp byte [rax], 0
jne 0x48bb0d
mov r14, qword [0x007ef800]
mov dword [0x007ef808], 1
jmp 0x48b93a
lea rcx, [0x006570e0]
call fcn.0048d8b0
test eax, eax
jne 0x48ba72
lea rcx, [rbp - 8]
lea r13, [rbp + 8]
mov rax, qword [0x007ef818]
xor r15d, r15d
xor r14d, r14d
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x18], rcx
lea rcx, [rbp - 0x10]
mov rdi, rbp
add rax, 8
mov rbx, qword [rbp - 0x20]
mov qword [rbp - 0x28], rcx
mov rcx, r13
mov r13d, r14d
mov r14, r15
mov r15, rcx
jmp 0x48ba0f
test r13d, r13d
je 0x48ba80
add r13d, 1
mov rcx, r14
imul edx, r13d, 0xff0
movsxd rdx, edx
mov qword [0x007ef810], rdx
call sub.msvcrt.dll_realloc
mov r14, rax
test r14, r14
je 0x48bb43
lea rax, [r14 + 8]
mov qword [0x007ef818], r14
mov qword [rbp], rax
mov rax, qword [0x007ef810]
mov qword [rbp - 0x10], rbx
mov qword [rbp - 8], r12
cmp rax, 7
jbe 0x48b9d2
mov rcx, qword [rsi + 8]
mov r8, qword [rbp - 0x18]
sub rax, 8
mov rdx, qword [rbp - 0x28]
mov qword [rsp + 0x20], r15
mov r9, rdi
mov qword [rbp + 8], rax
call fcn.004a49e0
cmp rax, 0xffffffffffffffff
jne 0x48baa3
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 7
je 0x48b9d2
lea rcx, [0x006570e0]
call fcn.0048d920
test eax, eax
je 0x48b710
call sub.msvcrt.dll_abort
nop word [rax + rax]
mov ecx, 0xff0
mov qword [0x007ef810], 0xff0
mov r13d, 1
call sub.msvcrt.dll_malloc
mov r14, rax
jmp 0x48b9fb
mov rdx, qword [rbp]
mov rax, qword [0x007ef818]
mov rbx, qword [rbp - 0x30]
mov rcx, rdx
sub rcx, rax
sub rcx, 8
mov qword [rax], rcx
mov rcx, qword [rsi + 0x10]
mov qword [rcx + rbx*8], rax
sub rax, rdx
add rax, qword [0x007ef810]
mov rcx, rax
and rax, 0xfffffffffffffff8
and ecx, 7
mov qword [0x007ef810], rax
add rdx, rcx
lea rcx, [0x006570e0]
mov qword [0x007ef818], rdx
call fcn.0048d920
test eax, eax
jne 0x48ba72
mov rax, qword [rsi + 0x10]
mov rax, qword [rax + rbx*8]
jmp 0x48b823
mov rcx, rax
call sub.msvcrt.dll_strlen
lea r15, [rax + 1]
mov rcx, r15
call sub.msvcrt.dll_malloc
test rax, rax
mov r14, rax
je 0x48bb37
mov r8, r15
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov qword [0x007ef800], r14
jmp 0x48b974
lea rcx, [0x006570e0]
mov qword [0x007ef818], 0
mov qword [0x007ef810], 0
call fcn.0048d920
test eax, eax
jne 0x48ba72
or rax, 0xffffffffffffffff
jmp 0x48b712
mov rcx, qword [rbp - 0x28]
call fcn.0048dc80
test eax, eax
jne 0x48ba72
mov rcx, qword [rbp - 0x28]
call fcn.0048db40
test eax, eax
jne 0x48ba72
mov rax, qword [r13 + 0x78]
test rax, rax
mov qword [rbp - 0x30], rax
mov rax, qword [r13 + 0x70]
je 0x48bbe9
mov r9, qword [rbp - 0x30]
mov rdi, rax
mov qword [rbp - 0x38], rax
lea rax, [r9 + r9*2]
mov r15, r9
lea r8, [rdi + rax*8 - 0x18]
mov rdi, r8
jmp 0x48bbce
sub rdi, 0x18
test r15, r15
je 0x48bbed
mov rcx, qword [rdi]
mov rdx, r14
sub r15, 1
mov rsi, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x48bbc5
jmp 0x48b7e3
mov qword [rbp - 0x38], rax
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x30]
test rcx, rcx
je 0x48bcf7
lea rdx, [rax + rax*2 + 3]
shl rdx, 3
call sub.msvcrt.dll_realloc
mov rsi, rax
test rsi, rsi
je 0x48bda7
mov rcx, r14
mov qword [r13 + 0x70], rsi
call sub.msvcrt.dll__strdup_1
test rax, rax
mov r14, rax
je 0x48bda7
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp - 0x50]
lea r8, [0x00691c5b]
mov rcx, qword [rbp - 0x40]
xor r9d, r9d
lea rax, [rax + rax*2]
lea rsi, [rsi + rax*8]
lea rax, [rbp + 8]
mov qword [rsi], r14
mov qword [rsi + 8], 0xffffffffffffffff
mov qword [rsp + 0x20], rax
call fcn.0048b5c0
test rax, rax
je 0x48bce5
lea rdx, str.charset
mov rcx, rax
call sub.msvcrt.dll_strstr
test rax, rax
je 0x48bce5
lea r9, [rax + 8]
lea rdx, [0x00691c65]
mov rcx, r9
mov qword [rbp - 0x30], r9
call sub.msvcrt.dll_strcspn
mov r8, rax
lea rax, [rax + 0x1f]
and rax, 0xfffffffffffffff0
call fcn.00649e40
mov r9, qword [rbp - 0x30]
sub rsp, rax
lea rax, [rsp + 0x30]
mov rdx, r9
mov rcx, rax
mov rdi, rax
call fcn.0064b0e0
mov edx, 0x2f
mov byte [rax], 0
mov rcx, r14
call sub.msvcrt.dll_strchr
test rax, rax
je 0x48bd0d
mov rdx, rdi
mov rcx, r14
call fcn.004a44d0
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], 0
add qword [r13 + 0x78], 1
jmp 0x48b7e3
lea rcx, [rax + rax*2 + 3]
shl rcx, 3
call sub.msvcrt.dll_malloc
mov rsi, rax
jmp 0x48bc0f
mov r9, r14
mov edx, dword [r9]
add r9, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x48bd10
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [r9 + 2]
cmove r9, rdx
add al, al
sbb r9, 3
sub r9, r14
lea rax, [r9 + 0x29]
and rax, 0xfffffffffffffff0
call fcn.00649e40
sub rsp, rax
mov r8, r9
mov rdx, r14
lea r11, [rsp + 0x30]
mov qword [rbp - 0x30], r9
mov rcx, r11
call sub.msvcrt.dll_memcpy
mov r9, qword [rbp - 0x30]
mov r11, rax
mov rdx, rdi
mov rcx, r11
add r9, rax
movabs rax, 0x4c534e4152542f2f
mov qword [r9], rax
mov eax, 0x5449
mov byte [r9 + 0xa], 0
mov word [r9 + 8], ax
call fcn.004a44d0
mov qword [rsi + 8], rax
jmp 0x48bce5
mov rcx, qword [rbp - 0x28]
call fcn.0048dc80
test eax, eax
je 0x48bb6d
jmp 0x48ba72
lea rcx, [0x006570e0]
call fcn.0048d8b0
test eax, eax
jne 0x48ba72
cmp qword [rsi + 0x10], 0
je 0x48bdf5
lea rcx, [0x006570e0]
call fcn.0048d920
test eax, eax
jne 0x48ba72
mov rax, qword [rsi + 0x10]
jmp 0x48b80c
mov ecx, dword [rbp - 0x18]
add ecx, dword [r13 + 0x40]
mov edx, 8
call sub.msvcrt.dll_calloc
test rax, rax
mov qword [rsi + 0x10], rax
jne 0x48b994
mov qword [rsi + 0x10], 0xffffffffffffffff
jmp 0x48bdd8