Function at 0x4e7c40
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov eax, dword [0x00501c08]
mov qword [0x005c9f58], 0
test eax, eax
mov esi, ecx
mov r10, r8
mov r13, r9
jne 0x4e7da8
mov dword [0x00501c08], 1
mov eax, 1
lea rcx, str.POSIXLY_CORRECT
mov qword [rsp + 0xb0], r10
mov qword [rsp + 0xa8], rdx
mov dword [0x005c9f60], eax
mov dword [0x005c9f64], eax
mov qword [0x005c9f78], 0
call sub.msvcrt.dll_getenv
mov r10, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0xa8]
mov qword [0x005c9f68], rax
movzx ecx, byte [r10]
cmp cl, 0x2d
je 0x4e7e60
test rax, rax
sete al
cmp cl, 0x2b
movzx eax, al
jne 0x4e7e69
mov dword [0x005c9f50], 1
xor eax, eax
add r10, 1
mov dword [0x005c9f70], eax
nop
mov r15, qword [0x005c9f78]
test r15, r15
je 0x4e7dc0
movsx edi, byte [r15]
test dil, dil
je 0x4e7dc0
test r13, r13
je 0x4e7f00
movsxd rax, dword [0x00501c08]
mov r9, qword [rdx + rax*8]
mov rbp, rax
movzx ecx, byte [r9 + 1]
cmp cl, 0x2d
je 0x4e8000
mov eax, dword [rsp + 0xc8]
test eax, eax
je 0x4e7f00
cmp byte [r9 + 2], 0
jne 0x4e8000
movzx r8d, byte [r10]
test r8b, r8b
je 0x4e8000
mov eax, r8d
mov rbx, r10
jmp 0x4e7d88
movzx eax, byte [rbx + 1]
add rbx, 1
test al, al
je 0x4e8000
cmp al, cl
jne 0x4e7d78
lea r14, [r15 + 1]
movzx ecx, byte [r15 + 1]
mov qword [0x005c9f78], r14
jmp 0x4e7f1d
mov ecx, dword [0x005c9f50]
test ecx, ecx
je 0x4e7c80
jmp 0x4e7d00
mov ebp, dword [0x00501c08]
cmp dword [0x005c9f60], ebp
jle 0x4e7dd4
mov dword [0x005c9f60], ebp
cmp ebp, dword [0x005c9f64]
jge 0x4e7de2
mov dword [0x005c9f64], ebp
mov ebx, dword [0x005c9f70]
cmp ebx, 1
je 0x4e7e80
cmp esi, ebp
je 0x4e7ea8
movsxd rax, ebp
mov r9, qword [rdx + rax*8]
cmp byte [r9], 0x2d
jne 0x4e7ec8
cmp byte [r9 + 1], 0x2d
jne 0x4e7ec8
cmp byte [r9 + 2], 0
jne 0x4e7ec8
mov eax, dword [0x005c9f64]
add ebp, 1
mov ecx, dword [0x005c9f60]
mov dword [0x00501c08], ebp
cmp eax, ecx
je 0x4e8430
cmp ebp, ecx
je 0x4e7e4f
mov rcx, rdx
call fcn.004e7b20
mov eax, dword [0x005c9f64]
mov dword [0x005c9f60], esi
mov dword [0x00501c08], esi
jmp 0x4e7eb4
add r10, 1
mov eax, 2
mov dword [0x005c9f70], eax
mov dword [0x005c9f50], 1
jmp 0x4e7d00
mov eax, dword [0x005c9f60]
cmp dword [0x005c9f64], eax
je 0x4e80e0
cmp ebp, eax
jne 0x4e80f8
mov ecx, ebp
jmp 0x4e8126
mov eax, dword [0x005c9f64]
mov esi, dword [0x005c9f60]
cmp eax, esi
je 0x4e7ebe
mov dword [0x00501c08], eax
mov edi, 0xffffffff
jmp 0x4e7eeb
cmp byte [r9], 0x2d
je 0x4e7fc0
test ebx, ebx
je 0x4e7ebe
add ebp, 1
mov qword [0x005c9f58], r9
mov edi, 1
mov dword [0x00501c08], ebp
mov eax, edi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx r8d, byte [r10]
lea r14, [r15 + 1]
test r8b, r8b
movzx ecx, byte [r15 + 1]
mov qword [0x005c9f78], r14
je 0x4e8178
mov rax, r10
jmp 0x4e7f3a
movzx r8d, byte [rax + 1]
add rax, 1
test r8b, r8b
je 0x4e8178
cmp r8b, dil
jne 0x4e7f28
test rax, rax
sete r8b
cmp dil, 0x3a
sete r9b
or r8d, r9d
test cl, cl
jne 0x4e7f5c
add dword [0x00501c08], 1
test r8b, r8b
jne 0x4e8183
cmp byte [rax], 0x57
movzx ecx, byte [rax + 1]
je 0x4e8230
cmp cl, 0x3a
jne 0x4e7eeb
cmp byte [rax + 2], 0x3a
movzx ecx, byte [r15 + 1]
je 0x4e840a
test cl, cl
movsxd rax, dword [0x00501c08]
je 0x4e8508
add eax, 1
mov qword [0x005c9f58], r14
mov dword [0x00501c08], eax
mov qword [0x005c9f78], 0
jmp 0x4e7eeb
movzx ecx, byte [r9 + 1]
test cl, cl
je 0x4e7ed2
test r13, r13
je 0x4e8480
cmp cl, 0x2d
je 0x4e7fee
lea r15, [r9 + 1]
movsx edi, cl
mov qword [0x005c9f78], r15
jmp 0x4e7d42
movsx edi, byte [r9 + 2]
lea r15, [r9 + 2]
mov qword [0x005c9f78], r15
nop
test dil, dil
mov rax, r15
je 0x4e8024
cmp dil, 0x3d
je 0x4e8024
nop
movzx r8d, byte [rax + 1]
add rax, 1
test r8b, r8b
je 0x4e8024
cmp r8b, 0x3d
jne 0x4e8010
mov rbx, qword [r13]
test rbx, rbx
je 0x4e83c0
mov r11, rax
xor r8d, r8d
mov r12, r13
mov byte [rsp + 0x38], dil
sub r11, r15
mov dword [rsp + 0x48], ebp
xor r14d, r14d
xor ebp, ebp
mov dword [rsp + 0xa0], esi
mov rdi, r11
mov rsi, r8
mov qword [rsp + 0xb8], r13
mov r13, rax
mov dword [rsp + 0x30], 0xffffffff
mov qword [rsp + 0x40], r9
mov byte [rsp + 0x4f], cl
mov qword [rsp + 0xa8], rdx
mov qword [rsp + 0xb0], r10
jmp 0x4e80ab
mov ebp, 1
mov rbx, qword [r12 + 0x20]
add r12, 0x20
add r14d, 1
test rbx, rbx
je 0x4e81d0
mov r8, rdi
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4e8095
mov rcx, rbx
call sub.msvcrt.dll_strlen
cmp edi, eax
je 0x4e8320
test rsi, rsi
jne 0x4e8090
mov dword [rsp + 0x30], r14d
mov rsi, r12
jmp 0x4e8095
cmp ebp, eax
je 0x4e7e9a
mov dword [0x005c9f64], ebp
mov ecx, ebp
jmp 0x4e8126
mov rcx, rdx
mov qword [rsp + 0xb0], r10
mov qword [rsp + 0xa8], rdx
call fcn.004e7b20
mov ecx, dword [0x00501c08]
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0xb0]
cmp esi, ecx
jle 0x4e8170
movsxd rax, ecx
jmp 0x4e8141
add rax, 1
add ecx, 1
cmp esi, eax
mov dword [0x00501c08], ecx
jle 0x4e8170
mov r8, qword [rdx + rax*8]
mov ecx, eax
cmp byte [r8], 0x2d
jne 0x4e8130
cmp byte [r8 + 1], 0
je 0x4e8130
mov ebp, dword [0x00501c08]
cmp esi, ebp
mov dword [0x005c9f60], ecx
jne 0x4e7df9
jmp 0x4e7ea8
mov ebp, ecx
jmp 0x4e815a
test cl, cl
jne 0x4e8183
add dword [0x00501c08], 1
mov ebx, dword [0x00501c04]
test ebx, ebx
je 0x4e81be
cmp qword [0x005c9f68], 0
mov ecx, 2
mov rbx, qword [rdx]
je 0x4e8633
call qword [fcn.004fa060]
mov r9d, edi
mov r8, rbx
lea rdx, str._s:_illegal_option_____c_n
mov rcx, rax
call fcn.004e7c10
mov dword [0x00501c00], edi
mov edi, 0x3f
jmp 0x4e7eeb
mov ebx, ebp
mov r11, rsi
mov rax, r13
movsx edi, byte [rsp + 0x38]
test ebx, ebx
mov r9, qword [rsp + 0x40]
movzx ecx, byte [rsp + 0x4f]
mov ebp, dword [rsp + 0x48]
mov esi, dword [rsp + 0xa0]
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0xb0]
mov r13, qword [rsp + 0xb8]
jne 0x4e8440
test r11, r11
mov r12, r11
je 0x4e83c0
mov r14d, dword [rsp + 0x30]
jmp 0x4e833e
cmp cl, 0x3b
jne 0x4e7f72
cmp byte [r15 + 1], 0
movsxd rax, dword [0x00501c08]
je 0x4e85d4
add eax, 1
mov qword [0x005c9f58], r14
mov dword [0x00501c08], eax
movzx eax, byte [r14]
mov qword [0x005c9f78], r14
mov rcx, r14
test al, al
jne 0x4e827c
jmp 0x4e8280
movzx eax, byte [rcx + 1]
add rcx, 1
test al, al
je 0x4e8280
cmp al, 0x3d
jne 0x4e8270
mov r15, qword [r13]
test r15, r15
je 0x4e8865
mov rdi, rcx
mov dword [rsp + 0xa0], esi
xor ebx, ebx
xor ebp, ebp
sub rdi, r14
mov dword [rsp + 0x30], 0
xor r12d, r12d
mov r11d, edi
mov byte [rsp + 0x48], al
mov qword [rsp + 0x38], rcx
mov rsi, r11
mov qword [rsp + 0xa8], rdx
mov qword [rsp + 0xb0], r10
jmp 0x4e82e9
mov ebp, 1
mov r15, qword [r13 + 0x20]
add r13, 0x20
add ebx, 1
test r15, r15
je 0x4e854d
mov r8, rdi
mov rdx, r14
mov rcx, r15
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4e82d5
mov rcx, r15
call sub.msvcrt.dll_strlen
cmp rsi, rax
je 0x4e870f
test r12, r12
jne 0x4e82d0
mov dword [rsp + 0x30], ebx
mov r12, r13
jmp 0x4e82d5
mov ebp, dword [rsp + 0x48]
mov rax, r13
mov esi, dword [rsp + 0xa0]
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0xb0]
lea ecx, [rbp + 1]
mov r8d, dword [r12 + 8]
mov dword [0x00501c08], ecx
cmp byte [rax], 0
jne 0x4e83a0
cmp r8d, 1
je 0x4e8529
mov rcx, r15
call sub.msvcrt.dll_strlen
add rax, r15
cmp qword [rsp + 0xc0], 0
mov qword [0x005c9f78], rax
je 0x4e8383
mov rax, qword [rsp + 0xc0]
mov dword [rax], r14d
mov rax, qword [r12 + 0x10]
mov edi, dword [r12 + 0x18]
test rax, rax
je 0x4e7eeb
mov dword [rax], edi
xor edi, edi
jmp 0x4e7eeb
test r8d, r8d
je 0x4e8490
add rax, 1
mov qword [0x005c9f58], rax
jmp 0x4e835b
mov r12d, dword [rsp + 0xc8]
test r12d, r12d
je 0x4e8653
cmp cl, 0x2d
je 0x4e87bb
movzx r8d, byte [r10]
test r8b, r8b
je 0x4e881a
mov rcx, r10
mov eax, r8d
jmp 0x4e8400
movzx eax, byte [rcx + 1]
add rcx, 1
test al, al
je 0x4e881a
cmp al, dil
jne 0x4e83f0
jmp 0x4e7d8c
test cl, cl
je 0x4e862b
add dword [0x00501c08], 1
mov qword [0x005c9f58], r14
mov qword [0x005c9f78], 0
jmp 0x4e7eeb
mov dword [0x005c9f64], ebp
mov eax, ebp
jmp 0x4e7e4f
mov eax, dword [0x00501c04]
test eax, eax
jne 0x4e85f5
mov rcx, r15
call sub.msvcrt.dll_strlen
mov dword [0x00501c00], 0
add dword [0x00501c08], 1
add rax, r15
mov qword [0x005c9f78], rax
jmp 0x4e81c4
movzx r8d, byte [r10]
lea r15, [r9 + 1]
movsx edi, cl
jmp 0x4e7f04
mov eax, dword [0x00501c04]
test eax, eax
je 0x4e835b
movsxd rcx, ecx
mov rsi, qword [r12]
mov rax, qword [rdx + rcx*8 - 8]
mov rbx, qword [rdx]
cmp byte [rax + 1], 0x2d
je 0x4e88a1
movsx edi, byte [rax]
mov ecx, 2
call qword [fcn.004fa060]
mov qword [rsp + 0x20], rsi
mov r8, rbx
lea rdx, str._s:_option___c_s_doesnt_allow_an_argument_n
mov rcx, rax
mov r9d, edi
call fcn.004e7c10
mov rbx, qword [0x005c9f78]
mov rcx, rbx
call sub.msvcrt.dll_strlen
add rbx, rax
mov eax, dword [r12 + 0x18]
mov qword [0x005c9f78], rbx
mov dword [0x00501c00], eax
jmp 0x4e81c4
cmp esi, eax
je 0x4e86e8
lea ecx, [rax + 1]
mov rax, qword [rdx + rax*8]
mov dword [0x00501c08], ecx
mov qword [0x005c9f58], rax
jmp 0x4e7fa9
cmp ecx, esi
jge 0x4e873c
movsxd rcx, ecx
add ebp, 2
mov rax, qword [rdx + rcx*8]
mov dword [0x00501c08], ebp
mov qword [0x005c9f58], rax
jmp 0x4e835b
test ebp, ebp
movzx eax, byte [rsp + 0x48]
mov rcx, qword [rsp + 0x38]
mov esi, dword [rsp + 0xa0]
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0xb0]
jne 0x4e878d
test r12, r12
je 0x4e8865
test al, al
mov r8d, dword [r12 + 8]
je 0x4e86b6
test r8d, r8d
je 0x4e887a
add rcx, 1
mov qword [0x005c9f58], rcx
mov rcx, r14
call sub.msvcrt.dll_strlen
add rax, r14
cmp qword [rsp + 0xc0], 0
mov qword [0x005c9f78], rax
je 0x4e8383
mov rax, qword [rsp + 0xc0]
mov esi, dword [rsp + 0x30]
mov dword [rax], esi
jmp 0x4e8383
cmp esi, eax
je 0x4e87f1
mov r14, qword [rdx + rax*8]
lea ecx, [rax + 1]
mov dword [0x00501c08], ecx
mov qword [0x005c9f58], r14
jmp 0x4e825b
mov rbx, qword [rdx]
mov qword [rsp + 0x30], r9
mov ecx, 2
call qword [fcn.004fa060]
mov r9, qword [rsp + 0x30]
lea rdx, str._s:_option___s_is_ambiguous_n
mov rcx, rax
mov r8, rbx
call fcn.004e7c10
mov r15, qword [0x005c9f78]
jmp 0x4e844e
xor r14d, r14d
jmp 0x4e8419
call qword [fcn.004fa060]
mov r9d, edi
mov r8, rbx
lea rdx, str._s:_invalid_option_____c_n
mov rcx, rax
call fcn.004e7c10
jmp 0x4e81be
mov esi, dword [0x00501c04]
test esi, esi
je 0x4e8692
cmp cl, 0x2d
je 0x4e87c9
mov rbx, qword [rdx]
mov ecx, 2
movsx esi, byte [r9]
call qword [fcn.004fa060]
mov qword [rsp + 0x20], r15
lea rdx, str._s:_unrecognized_option___c_s_n
mov rcx, rax
mov r8, rbx
mov r9d, esi
call fcn.004e7c10
add dword [0x00501c08], 1
lea rax, [0x005a9ea8]
mov dword [0x00501c00], 0
mov qword [0x005c9f78], rax
jmp 0x4e81c4
cmp r8d, 1
jne 0x4e85a0
movsxd rax, dword [0x00501c08]
cmp eax, esi
jge 0x4e8947
lea ecx, [rax + 1]
mov rax, qword [rdx + rax*8]
mov dword [0x00501c08], ecx
mov qword [0x005c9f58], rax
jmp 0x4e85a0
mov eax, dword [0x00501c04]
test eax, eax
jne 0x4e882d
mov dword [0x00501c00], edi
xor edi, edi
cmp byte [r10], 0x3a
setne dil
lea edi, [rdi + rdi*4 + 0x3a]
jmp 0x4e7fa9
movzx eax, byte [rsp + 0x48]
mov dword [rsp + 0x30], ebx
mov r12, r13
mov rcx, qword [rsp + 0x38]
mov esi, dword [rsp + 0xa0]
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0xb0]
jmp 0x4e857f
mov r13d, dword [0x00501c04]
test r13d, r13d
jne 0x4e88c6
mov rcx, r15
mov qword [rsp + 0xb0], r10
call sub.msvcrt.dll_strlen
mov r10, qword [rsp + 0xb0]
add rax, r15
mov qword [0x005c9f78], rax
mov eax, dword [r12 + 0x18]
mov dword [0x00501c00], eax
cmp byte [r10], 0x3a
jne 0x4e81c4
mov edi, 0x3a
jmp 0x4e7eeb
mov r9d, dword [0x00501c04]
test r9d, r9d
jne 0x4e890d
mov rcx, r14
call sub.msvcrt.dll_strlen
add dword [0x00501c08], 1
add rax, r14
mov qword [0x005c9f78], rax
jmp 0x4e81c4
mov edi, dword [0x00501c04]
test edi, edi
je 0x4e8692
mov rbx, qword [rdx]
mov ecx, 2
call qword [fcn.004fa060]
lea rdx, str._s:_unrecognized_option_____s_n
mov r9, r15
mov rcx, rax
mov r8, rbx
call fcn.004e7c10
jmp 0x4e8692
mov r11d, dword [0x00501c04]
test r11d, r11d
jne 0x4e898d
mov dword [0x00501c00], edi
xor edi, edi
cmp byte [r10], 0x3a
setne dil
lea edi, [rdi + rdi*4 + 0x3a]
jmp 0x4e7eeb
mov ebp, dword [0x00501c04]
test ebp, ebp
jne 0x4e8666
jmp 0x4e8692
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov ecx, 2
call qword [fcn.004fa060]
lea rdx, str._s:_option_requires_an_argument_____c_n
mov r9d, edi
mov rcx, rax
mov r8, rbx
call fcn.004e7c10
mov r10, qword [rsp + 0xb0]
jmp 0x4e86f6
mov qword [0x005c9f78], 0
mov edi, 0x57
jmp 0x4e7eeb
mov r8d, dword [0x00501c04]
test r8d, r8d
jne 0x4e89c5
mov rcx, r14
call sub.msvcrt.dll_strlen
add rax, r14
mov qword [0x005c9f78], rax
jmp 0x4e81c4
mov ecx, 2
call qword [fcn.004fa060]
mov r9, rsi
mov r8, rbx
lea rdx, str._s:_option_____s_doesnt_allow_an_argument_n
mov rcx, rax
call fcn.004e7c10
jmp 0x4e84df
movsxd rcx, ecx
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov rsi, qword [rdx + rcx*8 - 8]
mov ecx, 2
call qword [fcn.004fa060]
lea rdx, str._s:_option___s_requires_an_argument_n
mov rcx, rax
mov r8, rbx
mov r9, rsi
call fcn.004e7c10
mov r15, qword [0x005c9f78]
mov r10, qword [rsp + 0xb0]
jmp 0x4e874c
movsxd rax, dword [0x00501c08]
mov ecx, 2
mov rbx, qword [rdx]
mov rsi, qword [rdx + rax*8]
call qword [fcn.004fa060]
lea rdx, str._s:_option___W__s_is_ambiguous_n
mov r8, rbx
mov rcx, rax
mov r9, rsi
call fcn.004e7c10
mov r14, qword [0x005c9f78]
jmp 0x4e879d
mov ecx, dword [0x00501c04]
test ecx, ecx
jne 0x4e89f8
mov rbx, qword [0x005c9f78]
mov qword [rsp + 0xb0], r10
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov r10, qword [rsp + 0xb0]
add rbx, rax
mov qword [0x005c9f78], rbx
cmp byte [r10], 0x3a
jne 0x4e81c4
jmp 0x4e8783
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov ecx, 2
call qword [fcn.004fa060]
lea rdx, str._s:_option_requires_an_argument_____c_n
mov r9d, edi
mov rcx, rax
mov r8, rbx
call fcn.004e7c10
mov r10, qword [rsp + 0xb0]
jmp 0x4e8801
mov rbx, qword [rdx]
mov ecx, 2
mov rsi, qword [r12]
call qword [fcn.004fa060]
lea rdx, str._s:_option___W__s_doesnt_allow_an_argument_n
mov rcx, rax
mov r8, rbx
mov r9, rsi
call fcn.004e7c10
mov r14, qword [0x005c9f78]
jmp 0x4e888a
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov ecx, 2
mov rsi, qword [rdx + rax*8 - 8]
call qword [fcn.004fa060]
lea rdx, str._s:_option___s_requires_an_argument_n
mov rcx, rax
mov r8, rbx
mov r9, rsi
call fcn.004e7c10
mov r10, qword [rsp + 0xb0]
jmp 0x4e8955