Function at 0x4c7620
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov eax, dword [0x004e3428]
mov qword [0x0054e688], 0
mov ebp, ecx
mov r12, rdx
mov qword [rsp + 0xd0], r8
mov qword [rsp + 0xd8], r9
test eax, eax
jne 0x4c78e1
mov dword [0x004e3428], 1
mov eax, 1
lea rcx, str.POSIXLY_CORRECT
mov dword [0x0054e690], eax
mov dword [0x0054e694], eax
mov qword [0x0054e6a8], 0
call sub.msvcrt.dll_getenv
mov rdi, qword [rsp + 0xd0]
mov qword [0x0054e698], rax
movzx edx, byte [rdi]
cmp dl, 0x2d
je 0x4c7b30
cmp dl, 0x2b
je 0x4c7b14
test rax, rax
sete al
movzx eax, al
mov dword [0x0054e6a0], eax
mov dword [0x0054e680], 1
mov rsi, qword [0x0054e6a8]
test rsi, rsi
je 0x4c7900
movzx r15d, byte [rsi]
test r15b, r15b
je 0x4c7900
cmp qword [rsp + 0xd8], 0
je 0x4c79a4
movsxd rax, dword [0x004e3428]
lea rdi, [rax*8]
mov dword [rsp + 0x3c], eax
mov qword [rsp + 0x50], rax
mov rax, qword [r12 + rax*8]
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x40], rax
movzx eax, byte [rax + 1]
cmp al, 0x2d
mov byte [rsp + 0x48], al
je 0x4c7784
mov r14d, dword [rsp + 0xe8]
test r14d, r14d
je 0x4c79a4
mov rax, qword [rsp + 0x40]
cmp byte [rax + 2], 0
jne 0x4c7784
mov rax, qword [rsp + 0xd0]
movzx ecx, byte [rax]
test cl, cl
je 0x4c7784
movzx r8d, byte [rsp + 0x48]
cmp r8b, cl
je 0x4c7d85
mov rax, qword [rsp + 0xd0]
jmp 0x4c7779
cmp r8b, dl
je 0x4c7d85
add rax, 1
movzx edx, byte [rax]
test dl, dl
jne 0x4c7770
cmp r15b, 0x3d
mov rdi, rsi
je 0x4c77a3
test r15b, r15b
jne 0x4c7798
jmp 0x4c77a3
cmp al, 0x3d
je 0x4c77a3
add rdi, 1
movzx eax, byte [rdi]
test al, al
jne 0x4c7794
mov rax, qword [rsp + 0xd8]
mov r13, qword [rax]
test r13, r13
je 0x4c7cc5
mov rax, rdi
xor edx, edx
xor ecx, ecx
sub rax, rsi
mov byte [rsp + 0x6f], r15b
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0xc0], ebp
mov rbx, qword [rsp + 0xd8]
mov rbp, r13
xor r14d, r14d
mov dword [rsp + 0x68], 0xffffffff
mov edi, edx
mov r15, rax
mov r13, rcx
jmp 0x4c7807
mov edi, 1
add rbx, 0x20
mov rbp, qword [rbx]
add r14d, 1
test rbp, rbp
je 0x4c7850
mov r8, r15
mov rdx, rsi
mov rcx, rbp
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4c77f7
mov rcx, rbp
call sub.msvcrt.dll_strlen
cmp r15d, eax
je 0x4c7c30
test r13, r13
jne 0x4c77f2
mov r13, rbx
add rbx, 0x20
mov rbp, qword [rbx]
mov dword [rsp + 0x68], r14d
add r14d, 1
test rbp, rbp
jne 0x4c7807
nop word [rax + rax]
mov eax, edi
mov rbx, r13
movzx r15d, byte [rsp + 0x6f]
test eax, eax
mov rdi, qword [rsp + 0x60]
mov ebp, dword [rsp + 0xc0]
je 0x4c82dc
mov r13d, dword [0x004e3424]
test r13d, r13d
je 0x4c78ae
mov rbx, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
mov r9, qword [rsp + 0x40]
lea rcx, [rax + 0x60]
lea rdx, str._s:_option___s_is_ambiguous_n
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov eax, dword [0x004e3428]
mov rsi, qword [0x0054e6a8]
mov dword [rsp + 0x3c], eax
mov rcx, rsi
call sub.msvcrt.dll_strlen
add rsi, rax
mov qword [0x0054e6a8], rsi
mov eax, dword [rsp + 0x3c]
mov dword [0x004e3420], 0
mov ebx, 0x3f
add eax, 1
mov dword [0x004e3428], eax
jmp 0x4c7a76
mov r15d, dword [0x0054e680]
test r15d, r15d
je 0x4c766d
jmp 0x4c76cd
mov eax, dword [0x004e3428]
cmp dword [0x0054e690], eax
jle 0x4c7914
mov dword [0x0054e690], eax
cmp eax, dword [0x0054e694]
jge 0x4c7922
mov dword [0x0054e694], eax
mov ebx, dword [0x0054e6a0]
cmp ebx, 1
je 0x4c7a90
cmp ebp, eax
je 0x4c7af0
movsxd rdx, eax
lea rdi, [0x0051d960]
mov ecx, 3
mov rdx, qword [r12 + rdx*8]
mov rsi, rdx
repe cmpsb byte [rsi], byte [rdi]
jne 0x4c7a50
mov edx, dword [0x0054e694]
mov ecx, dword [0x0054e690]
add eax, 1
mov dword [0x004e3428], eax
cmp edx, ecx
je 0x4c7ca0
cmp eax, ecx
je 0x4c7986
mov rcx, r12
call fcn.004c7540
mov edx, dword [0x0054e694]
cmp ebp, edx
mov dword [0x0054e690], ebp
mov dword [0x004e3428], ebp
jne 0x4c7b04
mov ebx, 0xffffffff
jmp 0x4c7a76
mov rax, qword [rsp + 0xd0]
lea r14, [rsi + 1]
movsx ebx, r15b
mov qword [0x0054e6a8], r14
movzx ecx, byte [rax]
test cl, cl
je 0x4c79e8
cmp cl, r15b
mov rax, qword [rsp + 0xd0]
jne 0x4c79dd
jmp 0x4c7b60
cmp dl, r15b
je 0x4c7b60
add rax, 1
movzx edx, byte [rax]
test dl, dl
jne 0x4c79d4
cmp byte [rsi + 1], 0
jne 0x4c7a04
mov edx, 1
xor eax, eax
add dword [0x004e3428], 1
test dl, dl
je 0x4c7bd0
mov r8d, dword [0x004e3424]
test r8d, r8d
je 0x4c7a3e
cmp qword [0x0054e698], 0
mov rsi, qword [r12]
je 0x4c7e8a
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_illegal_option_____c_n
lea rcx, [rax + 0x60]
mov r9d, ebx
mov r8, rsi
call sub.msvcrt.dll_fprintf
mov dword [0x004e3420], ebx
mov ebx, 0x3f
jmp 0x4c7a76
cmp byte [rdx], 0x2d
je 0x4c7b95
test ebx, ebx
je 0x4c799a
add eax, 1
mov qword [0x0054e688], rdx
mov ebx, 1
mov dword [0x004e3428], eax
mov eax, ebx
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, dword [0x0054e690]
cmp dword [0x0054e694], edx
je 0x4c7d70
cmp eax, edx
je 0x4c7ab4
mov rcx, r12
call fcn.004c7540
mov edx, dword [0x004e3428]
cmp ebp, edx
movsxd rax, edx
jg 0x4c7ad5
jmp 0x4c7b80
add rax, 1
add edx, 1
cmp ebp, eax
mov dword [0x004e3428], edx
jle 0x4c7b80
mov rcx, qword [r12 + rax*8]
cmp byte [rcx], 0x2d
jne 0x4c7ac0
cmp byte [rcx + 1], 0
je 0x4c7ac0
mov eax, dword [0x004e3428]
jmp 0x4c7b82
mov ebp, dword [0x0054e690]
mov edx, dword [0x0054e694]
cmp ebp, edx
je 0x4c799a
mov dword [0x004e3428], edx
mov ebx, 0xffffffff
jmp 0x4c7a76
mov dword [0x0054e6a0], 0
add qword [rsp + 0xd0], 1
jmp 0x4c76c3
mov dword [0x0054e6a0], 2
add qword [rsp + 0xd0], 1
jmp 0x4c76c3
lea r14, [rsi + 1]
mov rax, qword [rsp + 0xd0]
movsx ebx, r15b
mov qword [0x0054e6a8], r14
nop
test rax, rax
sete dl
cmp r15b, 0x3a
sete cl
or edx, ecx
cmp byte [rsi + 1], 0
je 0x4c79f5
jmp 0x4c79fc
mov eax, edx
cmp ebp, eax
mov dword [0x0054e690], edx
jne 0x4c7939
jmp 0x4c7af0
movzx ecx, byte [rdx + 1]
test cl, cl
je 0x4c7a59
cmp qword [rsp + 0xd8], 0
setne r8b
xor eax, eax
cmp cl, 0x2d
sete al
and rax, r8
lea rsi, [rdx + rax + 1]
mov qword [0x0054e6a8], rsi
movzx r15d, byte [rsi]
jmp 0x4c76ea
cmp byte [rax], 0x57
movzx edx, byte [rax + 1]
je 0x4c7d99
cmp dl, 0x3a
jne 0x4c7a76
cmp byte [rax + 2], 0x3a
je 0x4c7f61
cmp byte [rsi + 1], 0
jne 0x4c7f23
movsxd rax, dword [0x004e3428]
cmp ebp, eax
je 0x4c8099
lea edx, [rax + 1]
mov rax, qword [r12 + rax*8]
mov dword [0x004e3428], edx
mov qword [0x0054e688], rax
mov qword [0x0054e6a8], 0
jmp 0x4c7a76
mov rdi, qword [rsp + 0x60]
mov ebp, dword [rsp + 0xc0]
mov eax, dword [rsp + 0x3c]
add eax, 1
mov dword [0x004e3428], eax
cmp byte [rdi], 0
jne 0x4c7cad
cmp dword [rbx + 8], 1
je 0x4c7f36
mov rcx, rsi
call sub.msvcrt.dll_strlen
add rsi, rax
cmp qword [rsp + 0xe0], 0
mov qword [0x0054e6a8], rsi
je 0x4c7c80
mov rax, qword [rsp + 0xe0]
mov dword [rax], r14d
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x4c7f77
mov edx, dword [rbx + 0x18]
xor ebx, ebx
mov dword [rax], edx
jmp 0x4c7a76
mov dword [0x0054e694], eax
mov edx, eax
jmp 0x4c7986
mov ebp, dword [rbx + 8]
test ebp, ebp
je 0x4c7eab
add rdi, 1
mov qword [0x0054e688], rdi
jmp 0x4c7c58
cmp byte [rsp + 0x48], 0x2d
je 0x4c7d06
mov r10d, dword [rsp + 0xe8]
test r10d, r10d
je 0x4c7d06
mov rax, qword [rsp + 0xd0]
movzx ecx, byte [rax]
test cl, cl
je 0x4c7d06
cmp cl, r15b
jne 0x4c7cfb
jmp 0x4c7b48
cmp dl, r15b
je 0x4c7d85
add rax, 1
movzx edx, byte [rax]
test dl, dl
jne 0x4c7cf2
mov r9d, dword [0x004e3424]
test r9d, r9d
je 0x4c7d54
cmp byte [rsp + 0x48], 0x2d
je 0x4c8164
mov rax, qword [rsp + 0x40]
mov rbx, qword [r12]
movsx edi, byte [rax]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_unrecognized_option___c_s_n
lea rcx, [rax + 0x60]
mov qword [rsp + 0x20], rsi
mov r8, rbx
mov r9d, edi
call sub.msvcrt.dll_fprintf
mov eax, dword [0x004e3428]
mov dword [rsp + 0x3c], eax
lea rax, [0x0051da50]
mov qword [0x0054e6a8], rax
jmp 0x4c78c0
cmp eax, edx
je 0x4c7ab4
mov dword [0x0054e694], eax
mov edx, eax
jmp 0x4c7ab4
lea r14, [rsi + 1]
movsx ebx, r15b
mov qword [0x0054e6a8], r14
jmp 0x4c79c2
cmp dl, 0x3b
jne 0x4c7bdd
cmp byte [rsi + 1], 0
je 0x4c8049
add dword [0x004e3428], 1
mov qword [0x0054e688], r14
movzx esi, byte [r14]
mov qword [0x0054e6a8], r14
mov rbx, r14
cmp sil, 0x3d
je 0x4c7de7
test sil, sil
jne 0x4c7ddb
jmp 0x4c7de7
cmp sil, 0x3d
je 0x4c7de7
add rbx, 1
movzx esi, byte [rbx]
test sil, sil
jne 0x4c7dd5
mov rax, qword [rsp + 0xd8]
mov r15, qword [rax]
test r15, r15
je 0x4c8236
mov rax, rbx
xor edx, edx
mov byte [rsp + 0x40], sil
sub rax, r14
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0xc0], ebp
mov ecx, eax
mov qword [rsp + 0xc8], r12
xor edi, edi
mov dword [rsp + 0x3c], 0
xor r13d, r13d
mov rsi, rax
mov r12d, edx
mov rbx, qword [rsp + 0xd8]
mov rbp, rcx
jmp 0x4c7e59
mov r12d, 1
add rbx, 0x20
mov r15, qword [rbx]
add edi, 1
test r15, r15
je 0x4c7f7f
mov r8, rsi
mov rdx, r14
mov rcx, r15
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4c7e46
mov rcx, r15
call sub.msvcrt.dll_strlen
cmp rbp, rax
je 0x4c80c6
test r13, r13
jne 0x4c7e40
mov dword [rsp + 0x3c], edi
mov r13, rbx
jmp 0x4c7e46
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_invalid_option_____c_n
lea rcx, [rax + 0x60]
mov r9d, ebx
mov r8, rsi
call sub.msvcrt.dll_fprintf
jmp 0x4c7a3e
mov edi, dword [0x004e3424]
test edi, edi
je 0x4c7c58
mov rax, qword [rsp + 0x50]
mov rax, qword [r12 + rax*8]
cmp byte [rax + 1], 0x2d
je 0x4c8071
movsx edi, byte [rax]
mov rbp, qword [rbx]
mov rsi, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option___c_s_doesnt_allow_an_argument_n
lea rcx, [rax + 0x60]
mov qword [rsp + 0x20], rbp
mov r9d, edi
mov r8, rsi
call sub.msvcrt.dll_fprintf
mov rsi, qword [0x0054e6a8]
mov rcx, rsi
call sub.msvcrt.dll_strlen
add rsi, rax
mov eax, dword [rbx + 0x18]
mov ebx, 0x3f
mov qword [0x0054e6a8], rsi
mov dword [0x004e3420], eax
jmp 0x4c7a76
mov qword [0x0054e688], r14
add dword [0x004e3428], 1
jmp 0x4c7c1d
cmp ebp, eax
jle 0x4c8003
mov eax, dword [rsp + 0x3c]
add eax, 2
mov dword [0x004e3428], eax
mov rax, qword [rsp + 0x58]
mov rax, qword [r12 + rax + 8]
mov qword [0x0054e688], rax
jmp 0x4c7c58
cmp byte [rsi + 1], 0
jne 0x4c7f23
mov qword [0x0054e688], 0
jmp 0x4c7c1d
mov ebx, dword [rbx + 0x18]
jmp 0x4c7a76
mov eax, r12d
movzx esi, byte [rsp + 0x40]
mov rbx, qword [rsp + 0x48]
test eax, eax
mov ebp, dword [rsp + 0xc0]
mov r12, qword [rsp + 0xc8]
je 0x4c82ef
mov edx, dword [0x004e3424]
test edx, edx
je 0x4c7fdf
movsxd rax, dword [0x004e3428]
mov rbx, qword [r12]
mov rsi, qword [r12 + rax*8]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option___W__s_is_ambiguous_n
lea rcx, [rax + 0x60]
mov r8, rbx
mov r9, rsi
call sub.msvcrt.dll_fprintf
mov r14, qword [0x0054e6a8]
mov rcx, r14
mov ebx, 0x3f
call sub.msvcrt.dll_strlen
lea r9, [r14 + rax]
add dword [0x004e3428], 1
mov qword [0x0054e6a8], r9
jmp 0x4c7a76
mov r11d, dword [0x004e3424]
test r11d, r11d
jne 0x4c8193
mov rcx, rsi
call sub.msvcrt.dll_strlen
add rsi, rax
mov eax, dword [rbx + 0x18]
mov qword [0x0054e6a8], rsi
mov dword [0x004e3420], eax
mov rax, qword [rsp + 0xd0]
cmp byte [rax], 0x3a
jne 0x4c7a44
mov ebx, 0x3a
jmp 0x4c7a76
movsxd rax, dword [0x004e3428]
cmp ebp, eax
je 0x4c81c8
mov r14, qword [r12 + rax*8]
lea edx, [rax + 1]
mov dword [0x004e3428], edx
mov qword [0x0054e688], r14
jmp 0x4c7dba
mov rdi, qword [rbx]
mov rsi, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option_____s_doesnt_allow_an_argument_n
lea rcx, [rax + 0x60]
mov r9, rdi
mov r8, rsi
call sub.msvcrt.dll_fprintf
jmp 0x4c7ef7
mov eax, dword [0x004e3424]
test eax, eax
jne 0x4c8211
mov rax, qword [rsp + 0xd0]
mov dword [0x004e3420], ebx
xor ebx, ebx
cmp byte [rax], 0x3a
setne bl
lea ebx, [rbx + rbx*4 + 0x3a]
jmp 0x4c7c1d
movzx esi, byte [rsp + 0x40]
mov qword [rsp + 0xd8], rbx
mov ebp, dword [rsp + 0xc0]
mov r12, qword [rsp + 0xc8]
mov rbx, qword [rsp + 0x48]
test sil, sil
mov rax, qword [rsp + 0xd8]
je 0x4c824b
cmp dword [rax + 8], 0
jne 0x4c82bf
cmp dword [0x004e3424], 0
je 0x4c8136
mov rax, qword [rsp + 0xd8]
mov rbx, qword [r12]
mov rsi, qword [rax]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option___W__s_doesnt_allow_an_argument_n
lea rcx, [rax + 0x60]
mov r8, rbx
mov r9, rsi
call sub.msvcrt.dll_fprintf
mov rdx, qword [0x0054e6a8]
xor eax, eax
or rcx, 0xffffffffffffffff
mov ebx, 0x3f
mov rdi, rdx
repne scasb al, byte [rdi]
mov rax, rcx
not rax
lea rax, [rdx + rax - 1]
mov qword [0x0054e6a8], rax
jmp 0x4c7a76
mov rbx, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_unrecognized_option_____s_n
lea rcx, [rax + 0x60]
mov r9, rsi
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov eax, dword [0x004e3428]
mov dword [rsp + 0x3c], eax
jmp 0x4c7d54
mov rax, qword [rsp + 0x50]
mov rsi, qword [r12]
mov rdi, qword [r12 + rax*8]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option___s_requires_an_argument_n
lea rcx, [rax + 0x60]
mov r8, rsi
mov r9, rdi
call sub.msvcrt.dll_fprintf
mov rsi, qword [0x0054e6a8]
jmp 0x4c8013
mov ecx, dword [0x004e3424]
test ecx, ecx
je 0x4c81f2
mov rsi, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option_requires_an_argument_____c_n
lea rcx, [rax + 0x60]
mov r9d, ebx
mov r8, rsi
call sub.msvcrt.dll_fprintf
mov rax, qword [rsp + 0xd0]
mov dword [0x004e3420], ebx
xor ebx, ebx
cmp byte [rax], 0x3a
setne bl
lea ebx, [rbx + rbx*4 + 0x3a]
jmp 0x4c7a76
mov rsi, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option_requires_an_argument_____c_n
lea rcx, [rax + 0x60]
mov r9d, ebx
mov r8, rsi
call sub.msvcrt.dll_fprintf
jmp 0x4c80a7
mov qword [0x0054e6a8], 0
mov ebx, 0x57
jmp 0x4c7a76
cmp dword [rax + 8], 1
je 0x4c829e
mov rcx, r14
call sub.msvcrt.dll_strlen
cmp qword [rsp + 0xe0], 0
lea r9, [r14 + rax]
mov qword [0x0054e6a8], r9
je 0x4c8279
mov rax, qword [rsp + 0xe0]
mov dword [rax], edi
mov rax, qword [rsp + 0xd8]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x4c82cc
mov rdi, qword [rsp + 0xd8]
xor ebx, ebx
mov edx, dword [rdi + 0x18]
mov dword [rax], edx
jmp 0x4c7a76
movsxd rax, dword [0x004e3428]
cmp ebp, eax
jle 0x4c8309
lea edx, [rax + 1]
mov rax, qword [r12 + rax*8]
mov dword [0x004e3428], edx
mov qword [0x0054e688], rax
jmp 0x4c8251
add rbx, 1
mov qword [0x0054e688], rbx
jmp 0x4c8251
mov rax, qword [rsp + 0xd8]
mov ebx, dword [rax + 0x18]
jmp 0x4c7a76
test r13, r13
je 0x4c7cc5
mov r14d, dword [rsp + 0x68]
jmp 0x4c7c3c
test r13, r13
je 0x4c8236
mov edi, dword [rsp + 0x3c]
mov qword [rsp + 0xd8], r13
jmp 0x4c80e7
cmp dword [0x004e3424], 0
je 0x4c8337
mov rsi, qword [r12 + rax*8 - 8]
mov rbx, qword [r12]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_option___s_requires_an_argument_n
lea rcx, [rax + 0x60]
mov r9, rsi
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov rdx, qword [0x0054e6a8]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
mov rax, rcx
not rax
lea rax, [rdx + rax - 1]
mov qword [0x0054e6a8], rax
mov rax, qword [rsp + 0xd0]
cmp byte [rax], 0x3a
jne 0x4c7a44
jmp 0x4c803f