Function at 0x140008190
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov eax, dword [0x140016038]
mov qword [0x140024188], 0
mov ebx, ecx
mov rsi, rdx
mov rbp, r8
mov r12, r9
test eax, eax
jne 0x140008448
mov dword [0x140016038], 1
mov eax, 1
lea rcx, str.POSIXLY_CORRECT
mov dword [0x140024190], eax
mov dword [0x140024194], eax
mov qword [0x1400241a8], 0
call sub.msvcrt.dll_getenv
movzx edx, word [rbp]
mov qword [0x140024198], rax
cmp dx, 0x2d
je 0x140008528
test rax, rax
sete al
movzx eax, al
cmp dx, 0x2b
jne 0x140008531
mov dword [0x140024180], 1
xor eax, eax
add rbp, 2
mov dword [0x1400241a0], eax
nop dword [rax]
mov rdx, qword [0x1400241a8]
test rdx, rdx
je 0x140008460
movzx r13d, word [rdx]
test r13w, r13w
je 0x140008460
test r12, r12
je 0x1400085fb
movsxd rax, dword [0x140016038]
mov rcx, qword [rsi + rax*8]
movzx r8d, word [rcx + 2]
cmp r8w, 0x2d
je 0x14000829b
mov eax, dword [rsp + 0xb8]
test eax, eax
je 0x1400085f0
cmp word [rcx + 4], 0
je 0x140008a30
mov rdx, qword [0x1400241a8]
movzx r13d, word [rdx]
mov r14, rdx
test r13w, r13w
je 0x1400082c4
cmp r13w, 0x3d
je 0x1400082c4
nop dword [rax + rax]
movzx eax, word [r14 + 2]
add r14, 2
test ax, ax
je 0x1400082c4
cmp ax, 0x3d
jne 0x1400082b0
mov rcx, qword [r12]
movsxd rax, dword [0x140016038]
test rcx, rcx
je 0x14000838e
mov dword [rsp + 0x3c], 0xffffffff
mov r15, r12
xor edi, edi
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
jmp 0x140008317
mov rcx, qword [r15 + 0x20]
add r15, 0x20
add edi, 1
test rcx, rcx
je 0x14000836b
mov rdx, qword [0x1400241a8]
mov r8, r14
sub r8, rdx
sar r8, 1
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x140008300
mov rcx, qword [r15]
mov r13, r14
sub r13, qword [0x1400241a8]
sar r13, 1
call sub.msvcrt.dll_wcslen
cmp r13d, eax
je 0x140008840
cmp qword [rsp + 0x30], 0
je 0x1400085e0
mov rcx, qword [r15 + 0x20]
add r15, 0x20
mov dword [rsp + 0x38], 1
add edi, 1
test rcx, rcx
jne 0x140008310
mov r15d, dword [rsp + 0x38]
test r15d, r15d
jne 0x1400089f0
movsxd rax, dword [0x140016038]
cmp qword [rsp + 0x30], 0
mov edx, eax
jne 0x14000884f
mov edi, dword [rsp + 0xb8]
mov edx, eax
test edi, edi
je 0x1400083cb
mov rax, qword [rsi + rax*8]
cmp word [rax + 2], 0x2d
je 0x140008b9a
mov rax, qword [0x1400241a8]
mov rcx, rbp
movzx edx, word [rax]
call sub.msvcrt.dll_wcschr
test rax, rax
jne 0x1400085f0
mov eax, dword [0x140016038]
mov ebx, dword [0x140016034]
movsxd rdx, eax
test ebx, ebx
je 0x14000841f
mov rax, qword [rsi + rdx*8]
mov rdi, qword [0x1400241a8]
mov rbx, qword [rsi]
cmp word [rax + 2], 0x2d
je 0x140008bb2
movzx esi, word [rax]
mov ecx, 2
call qword [fcn.140014e80]
mov qword [rsp + 0x20], rdi
lea rdx, str._ls:_unrecognized_option___lc_ls_n
mov r8, rbx
mov rcx, rax
mov r9d, esi
call fcn.140008160
mov edx, dword [0x140016038]
lea rax, [0x14001f0a6]
add edx, 1
mov dword [0x140016030], 0
mov qword [0x1400241a8], rax
mov dword [0x140016038], edx
jmp 0x14000893b
mov ecx, dword [0x140024180]
test ecx, ecx
je 0x1400081d3
jmp 0x140008238
movsxd r8, dword [0x140016038]
cmp dword [0x140024190], r8d
jle 0x140008477
mov dword [0x140024190], r8d
cmp r8d, dword [0x140024194]
jge 0x140008487
mov dword [0x140024194], r8d
cmp dword [0x1400241a0], 1
je 0x140008550
cmp ebx, r8d
jne 0x1400084c0
mov edx, dword [0x140024194]
mov ebx, dword [0x140024190]
cmp edx, ebx
je 0x1400084af
mov dword [0x140016038], edx
mov edi, 0xffffffff
jmp 0x140008512
mov rcx, qword [rsi + r8*8]
lea rdx, [0x14001eec0]
call sub.msvcrt.dll_wcscmp
test eax, eax
mov eax, dword [0x140016038]
je 0x1400086c8
cmp eax, ebx
je 0x140008499
movsxd rdx, eax
mov rcx, qword [rsi + rdx*8]
cmp word [rcx], 0x2d
je 0x140008690
mov edx, dword [0x1400241a0]
test edx, edx
je 0x1400084af
add eax, 1
mov qword [0x140024188], rcx
mov edi, 1
mov dword [0x140016038], eax
mov eax, edi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add rbp, 2
mov eax, 2
mov dword [0x1400241a0], eax
mov dword [0x140024180], 1
jmp 0x140008238
mov eax, dword [0x140024190]
cmp dword [0x140024194], eax
je 0x140008720
cmp r8d, eax
je 0x140008576
mov rcx, rsi
call fcn.140008080
movsxd r8, dword [0x140016038]
movsxd rax, r8d
xor r9d, r9d
cmp ebx, r8d
jg 0x1400085a5
jmp 0x140008b67
add rax, 1
lea edi, [rcx + 1]
mov r9d, 1
cmp ebx, eax
jle 0x140008828
mov rdx, qword [rsi + rax*8]
mov ecx, eax
cmp word [rdx], 0x2d
jne 0x140008590
cmp word [rdx + 2], 0
je 0x140008590
test r9b, r9b
je 0x1400085c6
mov dword [0x140016038], edi
movsxd r8, edi
mov edi, eax
mov dword [0x140024190], edi
cmp ebx, r8d
je 0x140008499
jmp 0x1400084c0
mov dword [rsp + 0x3c], edi
mov qword [rsp + 0x30], r15
jmp 0x140008300
mov rdx, qword [0x1400241a8]
movzx r13d, word [rdx]
add rdx, 2
movzx edi, r13w
mov rcx, rbp
mov qword [0x1400241a8], rdx
mov edx, edi
call sub.msvcrt.dll_wcschr
mov rdx, qword [0x1400241a8]
movzx ecx, word [rdx]
test cx, cx
je 0x140008710
test rax, rax
je 0x1400088f8
cmp r13w, 0x3a
je 0x1400088f8
cmp word [rax], 0x57
movzx r8d, word [rax + 2]
je 0x140008738
cmp r8w, 0x3a
jne 0x140008512
cmp word [rax + 4], 0x3a
je 0x140008945
movsxd rax, dword [0x140016038]
test cx, cx
je 0x140008a95
add eax, 1
mov qword [0x140024188], rdx
mov dword [0x140016038], eax
mov qword [0x1400241a8], 0
jmp 0x140008512
movzx r8d, word [rcx + 2]
test r8w, r8w
je 0x1400084f3
test r12, r12
je 0x140008a68
cmp r8w, 0x2d
je 0x140008a74
lea rax, [rcx + 2]
mov qword [0x1400241a8], rax
jmp 0x140008276
mov edx, dword [0x140024194]
mov ecx, dword [0x140024190]
add eax, 1
mov dword [0x140016038], eax
cmp edx, ecx
je 0x140008a58
cmp eax, ecx
je 0x1400086f7
mov rcx, rsi
call fcn.140008080
mov edx, dword [0x140024194]
mov dword [0x140024190], ebx
mov dword [0x140016038], ebx
jmp 0x1400084a5
add dword [0x140016038], 1
jmp 0x140008627
cmp r8d, eax
je 0x140008576
mov dword [0x140024194], r8d
jmp 0x140008576
cmp r8w, 0x3b
jne 0x14000864a
movsxd rax, dword [0x140016038]
test cx, cx
je 0x140008b6f
add eax, 1
mov qword [0x140024188], rdx
mov dword [0x140016038], eax
mov qword [0x1400241a8], rdx
mov r15, rdx
cmp cx, 0x3d
je 0x140008794
test cx, cx
jne 0x140008786
jmp 0x140008794
cmp ax, 0x3d
je 0x140008794
movzx eax, word [r15 + 2]
add r15, 2
test ax, ax
jne 0x140008780
mov rcx, qword [r12]
test rcx, rcx
je 0x140008d83
mov dword [rsp + 0x38], 0
xor edi, edi
xor r14d, r14d
mov dword [rsp + 0x30], 0
jmp 0x1400087dc
mov rcx, qword [r12 + 0x20]
add r12, 0x20
add edi, 1
test rcx, rcx
je 0x140008ae9
mov rdx, qword [0x1400241a8]
mov r8, r15
sub r8, rdx
sar r8, 1
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x1400087c0
mov r13, r15
mov rcx, qword [r12]
sub r13, qword [0x1400241a8]
sar r13, 1
mov r13d, r13d
call sub.msvcrt.dll_wcslen
cmp r13, rax
je 0x140008c9f
test r14, r14
je 0x140008a89
mov dword [rsp + 0x30], 1
jmp 0x1400087c0
mov dword [0x140016038], edi
movsxd r8, edi
jmp 0x1400085c8
mov dword [rsp + 0x3c], edi
mov edx, dword [0x140016038]
mov qword [rsp + 0x30], r15
mov rdi, qword [rsp + 0x30]
lea eax, [rdx + 1]
cmp word [r14], 0
mov dword [0x140016038], eax
mov ecx, dword [rdi + 8]
je 0x1400088d0
test ecx, ecx
je 0x14000896c
lea r10, [r14 + 2]
mov qword [0x140024188], r10
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add rax, rax
add qword [0x1400241a8], rax
cmp qword [rsp + 0xb0], 0
je 0x1400088a9
mov rax, qword [rsp + 0xb0]
mov esi, dword [rsp + 0x3c]
mov dword [rax], esi
mov rsi, qword [rsp + 0x30]
mov rax, qword [rsi + 0x10]
mov edi, dword [rsi + 0x18]
test rax, rax
je 0x140008512
mov dword [rax], edi
xor edi, edi
jmp 0x140008512
cmp ecx, 1
jne 0x14000887a
cmp eax, ebx
jge 0x140008c2e
cdqe
add edx, 2
mov rax, qword [rsi + rax*8]
mov dword [0x140016038], edx
mov qword [0x140024188], rax
jmp 0x14000887a
mov r11d, dword [0x140016034]
test r11d, r11d
je 0x140008935
cmp qword [0x140024198], 0
mov rbx, qword [rsi]
mov ecx, 2
je 0x140008bdd
call qword [fcn.140014e80]
mov r9d, edi
mov r8, rbx
lea rdx, str._ls:_illegal_option_____lc_n
mov rcx, rax
call fcn.140008160
mov dword [0x140016030], edi
mov edi, 0x3f
jmp 0x140008512
test cx, cx
je 0x140008b93
add dword [0x140016038], 1
mov qword [0x140024188], rdx
mov qword [0x1400241a8], 0
jmp 0x140008512
mov r13d, dword [0x140016034]
test r13d, r13d
je 0x1400089bd
cdqe
mov rbx, qword [rsp + 0x30]
mov rax, qword [rsi + rax*8 - 8]
mov rdi, qword [rbx]
mov rbx, qword [rsi]
cmp word [rax + 2], 0x2d
je 0x140008d5e
movzx esi, word [rax]
mov ecx, 2
call qword [fcn.140014e80]
mov qword [rsp + 0x20], rdi
mov r8, rbx
lea rdx, str._ls:_option___lc_ls_doesnt_allow_an_argument_n
mov rcx, rax
mov r9d, esi
call fcn.140008160
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add rax, rax
add qword [0x1400241a8], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x18]
mov dword [0x140016030], eax
jmp 0x14000893b
mov r14d, dword [0x140016034]
test r14d, r14d
jne 0x140008ab6
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add dword [0x140016038], 1
mov dword [0x140016030], 0
add rax, rax
add qword [0x1400241a8], rax
jmp 0x14000893b
movzx edx, r8w
mov rcx, rbp
call sub.msvcrt.dll_wcschr
mov rdx, qword [0x1400241a8]
movzx r13d, word [rdx]
test rax, rax
jne 0x1400085fb
jmp 0x14000829b
mov dword [0x140024194], eax
mov edx, eax
jmp 0x1400086f7
lea rdx, [rcx + 2]
mov r13d, r8d
jmp 0x1400085fb
lea rdx, [rcx + 4]
movzx r13d, word [rcx + 4]
mov qword [0x1400241a8], rdx
jmp 0x14000829b
mov dword [rsp + 0x38], edi
mov r14, r12
jmp 0x1400087c0
cmp ebx, eax
je 0x140008c77
lea edx, [rax + 1]
mov rax, qword [rsi + rax*8]
mov dword [0x140016038], edx
mov qword [0x140024188], rax
jmp 0x140008680
movsxd rax, dword [0x140016038]
mov rbx, qword [rsi]
mov ecx, 2
mov rdi, qword [rsi + rax*8]
call qword [fcn.140014e80]
mov r8, rbx
lea rdx, str._ls:_option___ls_is_ambiguous_n
mov rcx, rax
mov r9, rdi
call fcn.140008160
jmp 0x140008a00
mov r9d, dword [rsp + 0x30]
test r9d, r9d
jne 0x140008cab
test r14, r14
je 0x140008d83
cmp word [r15], 0
mov eax, dword [r14 + 8]
je 0x140008bfd
test eax, eax
je 0x140008dcb
lea r9, [r15 + 2]
mov qword [0x140024188], r9
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add rax, rax
add qword [0x1400241a8], rax
cmp qword [rsp + 0xb0], 0
je 0x140008b51
mov rax, qword [rsp + 0xb0]
mov ebx, dword [rsp + 0x38]
mov dword [rax], ebx
mov rax, qword [r14 + 0x10]
mov edi, dword [r14 + 0x18]
test rax, rax
jne 0x1400088be
jmp 0x140008512
mov edi, r8d
jmp 0x1400085c8
cmp ebx, eax
je 0x140008cdd
lea edx, [rax + 1]
mov dword [0x140016038], edx
mov rdx, qword [rsi + rax*8]
mov qword [0x140024188], rdx
movzx ecx, word [rdx]
jmp 0x140008763
xor edx, edx
jmp 0x140008955
mov eax, dword [0x140016034]
test eax, eax
je 0x14000841f
mov rdi, qword [0x1400241a8]
mov rbx, qword [rsi]
mov ecx, 2
call qword [fcn.140014e80]
lea rdx, str._ls:_unrecognized_option_____ls_n
mov r9, rdi
mov r8, rbx
mov rcx, rax
call fcn.140008160
mov edx, dword [0x140016038]
jmp 0x14000841f
call qword [fcn.140014e80]
mov r9d, edi
mov r8, rbx
lea rdx, str._ls:_invalid_option_____lc_n
mov rcx, rax
call fcn.140008160
jmp 0x140008935
cmp eax, 1
jne 0x140008b22
movsxd rax, dword [0x140016038]
cmp eax, ebx
jge 0x140008df0
lea edx, [rax + 1]
mov rax, qword [rsi + rax*8]
mov dword [0x140016038], edx
mov qword [0x140024188], rax
jmp 0x140008b22
mov r12d, dword [0x140016034]
test r12d, r12d
jne 0x140008d07
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add rax, rax
add qword [0x1400241a8], rax
mov rax, qword [rsp + 0x30]
cmp word [rbp], 0x3a
mov eax, dword [rax + 0x18]
mov dword [0x140016030], eax
jne 0x14000893b
mov edi, 0x3a
jmp 0x140008512
mov edx, dword [0x140016034]
test edx, edx
jne 0x140008d36
mov dword [0x140016030], edi
xor edi, edi
cmp word [rbp], 0x3a
setne dil
lea edi, [rdi + rdi*4 + 0x3a]
jmp 0x140008680
mov dword [rsp + 0x38], edi
mov r14, r12
jmp 0x140008b00
mov r8d, dword [0x140016034]
test r8d, r8d
jne 0x140008d98
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add dword [0x140016038], 1
add rax, rax
add qword [0x1400241a8], rax
jmp 0x14000893b
mov r10d, dword [0x140016034]
test r10d, r10d
jne 0x140008e1f
mov dword [0x140016030], edi
xor edi, edi
cmp word [rbp], 0x3a
setne dil
lea edi, [rdi + rdi*4 + 0x3a]
jmp 0x140008512
cdqe
mov rbx, qword [rsi]
mov ecx, 2
mov rdi, qword [rsi + rax*8 - 8]
call qword [fcn.140014e80]
mov r8, rbx
lea rdx, str._ls:_option___ls_requires_an_argument_n
mov rcx, rax
mov r9, rdi
call fcn.140008160
jmp 0x140008c3e
mov rbx, qword [rsi]
mov ecx, 2
call qword [fcn.140014e80]
mov r9d, edi
lea rdx, str._ls:_option_requires_an_argument_____lc_n
mov rcx, rax
mov r8, rbx
call fcn.140008160
jmp 0x140008c85
mov ecx, 2
call qword [fcn.140014e80]
mov r9, rdi
mov r8, rbx
lea rdx, str._ls:_option_____ls_doesnt_allow_an_argument_n
mov rcx, rax
call fcn.140008160
jmp 0x1400089bd
mov qword [0x1400241a8], 0
mov edi, 0x57
jmp 0x140008512
movsxd rax, dword [0x140016038]
mov rbx, qword [rsi]
mov ecx, 2
mov rdi, qword [rsi + rax*8]
call qword [fcn.140014e80]
mov r8, rbx
lea rdx, str._ls:_option___W__ls_is_ambiguous_n
mov rcx, rax
mov r9, rdi
call fcn.140008160
jmp 0x140008cbb
mov ecx, dword [0x140016034]
test ecx, ecx
jne 0x140008e47
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add rax, rax
add qword [0x1400241a8], rax
jmp 0x14000893b
cmp dword [0x140016034], 0
jne 0x140008e72
mov rcx, qword [0x1400241a8]
call sub.msvcrt.dll_wcslen
add rax, rax
add qword [0x1400241a8], rax
cmp word [rbp], 0x3a
jne 0x14000893b
jmp 0x140008c6d
mov rbx, qword [rsi]
mov ecx, 2
call qword [fcn.140014e80]
mov r9d, edi
lea rdx, str._ls:_option_requires_an_argument_____lc_n
mov rcx, rax
mov r8, rbx
call fcn.140008160
jmp 0x140008ced
mov rdi, qword [r14]
mov rbx, qword [rsi]
mov ecx, 2
call qword [fcn.140014e80]
lea rdx, str._ls:_option___W__ls_doesnt_allow_an_argument_n
mov rcx, rax
mov r9, rdi
mov r8, rbx
call fcn.140008160
jmp 0x140008dd5
mov rdi, qword [rsi + rax*8 - 8]
mov rbx, qword [rsi]
mov ecx, 2
call qword [fcn.140014e80]
lea rdx, str._ls:_option___ls_requires_an_argument_n
mov rcx, rax
mov r9, rdi
mov r8, rbx
call fcn.140008160
jmp 0x140008df9