Function at 0x1801731d0
Capabilities:
Query environment variable

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x70
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x70], rbx
mov qword [rbp + 0x78], rsi
mov qword [rbp + 0x80], rdi
mov rax, qword [0x1803bc678]
xor rax, rbp
mov qword [rbp + 0x30], rax
cmp dword [rcx + 8], 0
mov r12d, r9d
mov rdi, r8
mov qword [rbp + 0x18], rdx
mov rsi, rdx
mov qword [rbp + 0x20], rcx
mov rbx, rcx
jg 0x18017321f
call fcn.1801719f0
mov r13, qword [rbx + 0x10]
test r13, r13
je 0x1801733f0
cmp qword [r13 + 0x60], 0
mov eax, dword [r13 + 0x28]
mov dword [rbp], eax
je 0x180173384
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x180173242
mov rcx, rdi
call fcn.180174d70
mov esi, dword [r13 + 0x58]
xor edx, edx
mov r14d, dword [r13 + 0x68]
mov r8d, eax
mov r15, qword [r13 + 0x60]
div esi
lea ecx, [rsi - 2]
mov eax, r8d
mov r10d, edx
xor edx, edx
div ecx
lea r11d, [rdx + 1]
nop word [rax + rax]
mov eax, r10d
mov r9d, dword [r15 + rax*4]
test r14d, r14d
je 0x18017328f
bswap r9d
test r9d, r9d
je 0x1801733f0
mov ecx, dword [rbp]
dec r9d
cmp r9d, ecx
jae 0x1801732e9
mov rax, qword [r13 + 0x30]
mov edx, dword [r13 + 0x18]
lea r8, [rax + r9*8]
mov eax, dword [rax + r9*8]
test edx, edx
je 0x1801732b9
bswap eax
cmp eax, ebx
jb 0x180173327
mov eax, dword [r8 + 4]
test edx, edx
je 0x1801732c7
bswap eax
mov r8d, eax
mov rax, rdi
add r8, qword [r13]
sub r8, rdi
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x180173323
inc rax
test ecx, ecx
jne 0x1801732d4
jmp 0x180173323
mov r8d, r9d
mov eax, ebx
sub r8d, ecx
shl r8, 4
add r8, qword [r13 + 0x48]
cmp qword [r8], rax
jbe 0x180173327
mov r8, qword [r8 + 8]
mov rax, rdi
sub r8, rdi
nop dword [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x180173323
inc rax
test ecx, ecx
jne 0x180173310
test edx, edx
je 0x180173340
mov ecx, esi
mov eax, r11d
sub eax, esi
sub ecx, r11d
cmp r10d, ecx
cmovb eax, r11d
add r10d, eax
jmp 0x180173280
mov rsi, qword [rbp + 0x18]
mov r15d, r9d
mov eax, dword [rbp]
cmp r15, rax
jae 0x18017341b
mov rax, qword [r13 + 0x38]
mov ecx, dword [r13 + 0x18]
lea rdx, [rax + r15*8]
mov eax, dword [rax + r15*8 + 4]
test ecx, ecx
je 0x18017336a
bswap eax
mov r8d, eax
add r8, qword [r13]
mov eax, dword [rdx]
mov qword [rbp + 8], r8
test ecx, ecx
je 0x18017337d
bswap eax
inc eax
jmp 0x180173435
xor r9d, r9d
mov r8, rax
test eax, eax
je 0x1801733f0
mov r10d, dword [r13 + 0x18]
mov rbx, qword [r13]
mov r11, qword [r13 + 0x30]
nop word [rax + rax]
lea r15, [r8 + r9]
shr r15, 1
mov eax, dword [r11 + r15*8 + 4]
test r10d, r10d
je 0x1801733b3
bswap eax
mov edx, eax
mov rax, rdi
add rdx, rbx
sub rdx, rdi
nop
movzx ecx, byte [rax]
cmp cl, byte [rax + rdx]
jne 0x1801733d3
inc rax
test cl, cl
jne 0x1801733c0
xor eax, eax
jmp 0x1801733d8
sbb eax, eax
or eax, 1
test eax, eax
jns 0x1801733e1
mov r8, r15
jmp 0x1801733eb
jle 0x180173347
lea r9, [r15 + 1]
cmp r9, r8
jb 0x1801733a0
xor eax, eax
mov rcx, qword [rbp + 0x30]
xor rcx, rbp
call fcn.1801e5c70
mov rbx, qword [rbp + 0x70]
mov rsi, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x80]
lea rsp, [rbp + 0x40]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov rcx, r15
sub rcx, rax
mov rax, qword [r13 + 0x50]
add rcx, rcx
mov rdx, qword [rax + rcx*8 + 8]
mov rax, qword [rax + rcx*8]
mov qword [rbp + 8], rdx
mov qword [rbp + 0x10], rax
test r12d, r12d
je 0x180173a04
test rsi, rsi
je 0x180173454
mov r14, qword [rsi + 0x10]
test r14, r14
jne 0x1801734e6
cmp dword [0x1803e7e54], 0
jne 0x1801734d2
lea rcx, str.OUTPUT_CHARSET
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rax, rax
je 0x1801734bf
cmp byte [rax], 0
je 0x1801734bf
or rbx, 0xffffffffffffffff
nop dword [rax + rax]
cmp byte [rax + rbx + 1], 0
lea rbx, [rbx + 1]
jne 0x180173480
lea rcx, [rbx + 1]
call qword [0x180225ae8]
mov r14, rax
test rax, rax
je 0x1801734ac
lea r8, [rbx + 1]
mov rdx, rdi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov qword [0x1803e7e68], r14
mov dword [0x1803e7e54], 1
jmp 0x1801734d9
mov r14, qword [0x1803e7e68]
mov dword [0x1803e7e54], 1
jmp 0x1801734d9
mov r14, qword [0x1803e7e68]
test r14, r14
jne 0x1801734e6
call fcn.180174ef0
mov r14, rax
lea r12, [r13 + 0x80]
mov rcx, r12
call fcn.180172e90
test eax, eax
je 0x180173500
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov r9, qword [r13 + 0x78]
xor esi, esi
test r9, r9
je 0x180173561
mov rbx, qword [r13 + 0x70]
lea r10, [r9 + r9*2]
shl r10, 3
nop word [rax + rax]
lea r10, [r10 - 0x18]
dec r9
mov rax, qword [r10 + rbx]
lea r11, [r10 + rbx]
mov r8, r14
sub r8, rax
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x180173553
inc rax
test ecx, ecx
jne 0x180173540
test edx, edx
je 0x18017355e
test r9, r9
jne 0x180173520
jmp 0x180173561
mov rsi, r11
mov rcx, r12
call fcn.180172fa0
test eax, eax
je 0x180173574
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
test rsi, rsi
jne 0x1801737cd
mov rcx, r12
call fcn.1801730b0
test eax, eax
je 0x180173590
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov r11, qword [r13 + 0x78]
mov r10, r11
test r11, r11
je 0x1801735f0
mov rbx, qword [r13 + 0x70]
lea r9, [r11 + r11*2]
shl r9, 3
nop dword [rax + rax]
lea r9, [r9 - 0x18]
dec r10
mov rax, qword [r9 + rbx]
lea rsi, [r9 + rbx]
mov r8, r14
sub r8, rax
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1801735e3
inc rax
test ecx, ecx
jne 0x1801735d0
test edx, edx
je 0x18017379e
test r10, r10
jne 0x1801735b0
mov r8, qword [r13 + 0x70]
lea rax, [r11 + r11*2]
lea rdi, [rax*8]
lea rcx, [rdi + 0x18]
test r8, r8
je 0x180173617
mov rdx, rcx
mov rcx, r8
call qword [0x180225ae0]
jmp 0x18017361d
call qword [0x180225ae8]
mov rbx, rax
test rax, rax
je 0x1801737b1
mov rcx, r14
mov qword [r13 + 0x70], rax
call qword [0x180225d40]
mov r14, rax
test rax, rax
je 0x1801737b1
mov rdx, qword [rbp + 0x18]
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x20], rcx
lea rsi, [rdi + rbx]
mov rcx, qword [rbp + 0x20]
lea r8, [0x18030b3c8]
xor r9d, r9d
mov qword [rsi], rax
mov qword [rsi + 8], 0xffffffffffffffff
call fcn.1801731d0
cmp rax, 0xffffffffffffffff
je 0x1801737c4
test rax, rax
je 0x180173792
lea rdx, [0x180229040]
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
mov rbx, rax
test rax, rax
je 0x180173792
lea rdx, [0x18022904c]
lea rcx, [rax + 8]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcspn]
mov rdi, rax
movabs rdx, 0xffffffffffffff0
lea rcx, [rax + 1]
lea rax, [rcx + 0xf]
cmp rax, rcx
ja 0x1801736cd
mov rax, rdx
and rax, 0xfffffffffffffff0
call fcn.1801e70d0
sub rsp, rax
lea rdx, [rbx + 8]
mov r8, rdi
lea r12, [rsp + 0x30]
mov rcx, r12
call sub.VCRUNTIME140.dll_memcpy
mov edx, Ordinal_50
mov byte [r12 + rdi], 0
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
test rax, rax
jne 0x18017377c
or rdi, 0xffffffffffffffff
nop dword [rax + rax]
inc rdi
cmp byte [r14 + rdi], 0
jne 0x180173710
lea rax, [rdi + 0xb]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x180173731
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1801e70d0
sub rsp, rcx
mov r8, rdi
mov rdx, r14
lea rbx, [rsp + 0x30]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
movsd xmm0, qword [str.__TRANSLIT]
mov rcx, rbx
movsd qword [rbx + rdi], xmm0
movzx eax, word [0x180229058]
mov word [rbx + rdi + 8], ax
movzx eax, byte [0x18022905a]
mov byte [rbx + rdi + 0xa], al
jmp 0x18017377f
mov rcx, r14
mov rdx, r12
call fcn.1801faf10
mov qword [rsi + 8], rax
lea r12, [r13 + 0x80]
mov qword [rsi + 0x10], 0
inc qword [r13 + 0x78]
mov rcx, r12
call fcn.180172fa0
test eax, eax
je 0x1801737cd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rcx, r12
call fcn.180172fa0
test eax, eax
je 0x1801737c4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
or rax, 0xffffffffffffffff
jmp 0x1801733f2
cmp qword [rsi + 8], 0xffffffffffffffff
je 0x180173a04
mov rcx, qword [rsi + 0x10]
test rcx, rcx
jne 0x18017383d
lea rcx, [0x1803bc198]
call fcn.180172b50
test eax, eax
je 0x1801737f8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
cmp qword [rsi + 0x10], 0
jne 0x180173822
mov ecx, dword [r13 + 0x40]
mov edx, 8
add ecx, dword [rbp]
call qword [0x180225af8]
mov qword [rsi + 0x10], rax
test rax, rax
jne 0x18017386d
mov qword [rsi + 0x10], 0xffffffffffffffff
lea rcx, [0x1803bc198]
call fcn.180172bb0
test eax, eax
je 0x180173839
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rcx, qword [rsi + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x1801737c4
cmp qword [rcx + r15*8], 0
lea rbx, [r15*8]
jne 0x1801739be
lea rcx, [0x1803bc198]
call fcn.180172b50
test eax, eax
je 0x18017386d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rax, qword [0x1803e7e58]
mov r14, qword [rbp + 8]
add rax, 8
mov r12, qword [rbp + 0x10]
xor r13d, r13d
mov ebx, r13d
mov edi, r13d
nop dword [rax]
mov qword [rbp + 0x18], rax
mov rax, qword [0x1803e7e60]
mov qword [rbp + 8], r14
mov qword [rbp + 0x10], r12
cmp rax, 8
jb 0x1801738e0
mov rcx, qword [rsi + 8]
lea r9, [rbp + 0x18]
add rax, 0xfffffffffffffff8
lea r8, [rbp + 0x10]
mov qword [rbp + 0x20], rax
lea rdx, [rbp + 8]
lea rax, [rbp + 0x20]
mov qword [rsp + 0x20], rax
call fcn.1801faed0
cmp rax, 0xffffffffffffffff
jne 0x180173953
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 7
jne 0x180173938
test edi, edi
jle 0x180173901
inc edi
mov rcx, rbx
imul eax, edi, 0xff0
movsxd rdx, eax
mov qword [0x1803e7e60], rdx
call qword [0x180225ae0]
jmp 0x18017391c
mov ecx, 0xff0
mov qword [0x1803e7e60], 0xff0
mov edi, 1
call qword [0x180225ae8]
mov rbx, rax
test rax, rax
je 0x1801739db
mov qword [0x1803e7e58], rax
lea rax, [rax + 8]
jmp 0x180173890
lea rcx, [0x1803bc198]
call fcn.180172bb0
test eax, eax
je 0x1801733f0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rcx, qword [0x1803e7e58]
lea rbx, [r15*8]
mov rdx, qword [rbp + 0x18]
mov rax, rdx
sub rax, rcx
sub rax, 8
mov qword [rcx], rax
mov rax, qword [rsi + 0x10]
mov qword [rbx + rax], rcx
mov rax, qword [0x1803e7e60]
sub rax, rdx
add rcx, rax
mov rax, rcx
and rcx, 0xfffffffffffffff8
and eax, 7
mov qword [0x1803e7e60], rcx
add rax, rdx
lea rcx, [0x1803bc198]
mov qword [0x1803e7e58], rax
call fcn.180172bb0
test eax, eax
je 0x1801739ba
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rcx, qword [rsi + 0x10]
mov rcx, qword [rcx + rbx]
mov r12, qword [rcx]
lea r14, [rcx + 8]
mov rcx, qword [rbp + 0x90]
mov rax, r14
mov qword [rcx], r12
jmp 0x1801733f2
lea rcx, [0x1803bc198]
mov qword [0x1803e7e58], r13
mov qword [0x1803e7e60], r13
call fcn.180172bb0
test eax, eax
je 0x1801737c4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rcx, qword [rbp + 0x90]
mov r12, qword [rbp + 0x10]
mov r14, qword [rbp + 8]
mov rax, r14
mov qword [rcx], r12
jmp 0x1801733f2