Function at 0x4ad970
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 [0x004c6968]
mov qword [0x005118d8], 0
test eax, eax
mov esi, ecx
mov r10, r8
mov r13, r9
jne 0x4adad8
mov dword [0x004c6968], 1
mov eax, 1
lea rcx, str.POSIXLY_CORRECT
mov qword [rsp + 0xb0], r10
mov qword [rsp + 0xa8], rdx
mov dword [0x005118e0], eax
mov dword [0x005118e4], eax
mov qword [0x005118f8], 0
call sub.msvcrt.dll_getenv
mov r10, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0xa8]
mov qword [0x005118e8], rax
movzx ecx, byte [r10]
cmp cl, 0x2d
je 0x4adb90
test rax, rax
sete al
cmp cl, 0x2b
movzx eax, al
jne 0x4adb99
mov dword [0x005118d0], 1
xor eax, eax
add r10, 1
mov dword [0x005118f0], eax
nop
mov r15, qword [0x005118f8]
test r15, r15
je 0x4adaf0
movsx edi, byte [r15]
test dil, dil
je 0x4adaf0
test r13, r13
je 0x4adc30
movsxd rax, dword [0x004c6968]
mov r9, qword [rdx + rax*8]
mov rbp, rax
movzx ecx, byte [r9 + 1]
cmp cl, 0x2d
je 0x4add30
mov eax, dword [rsp + 0xc8]
test eax, eax
je 0x4adc30
cmp byte [r9 + 2], 0
jne 0x4add30
movzx r8d, byte [r10]
test r8b, r8b
je 0x4add30
mov eax, r8d
mov rbx, r10
jmp 0x4adab8
movzx eax, byte [rbx + 1]
add rbx, 1
test al, al
je 0x4add30
cmp al, cl
jne 0x4adaa8
lea r14, [r15 + 1]
movzx ecx, byte [r15 + 1]
mov qword [0x005118f8], r14
jmp 0x4adc4d
mov ecx, dword [0x005118d0]
test ecx, ecx
je 0x4ad9b0
jmp 0x4ada30
mov ebp, dword [0x004c6968]
cmp dword [0x005118e0], ebp
jle 0x4adb04
mov dword [0x005118e0], ebp
cmp ebp, dword [0x005118e4]
jge 0x4adb12
mov dword [0x005118e4], ebp
mov ebx, dword [0x005118f0]
cmp ebx, 1
je 0x4adbb0
cmp esi, ebp
je 0x4adbd8
movsxd rax, ebp
mov r9, qword [rdx + rax*8]
cmp byte [r9], 0x2d
jne 0x4adbf8
cmp byte [r9 + 1], 0x2d
jne 0x4adbf8
cmp byte [r9 + 2], 0
jne 0x4adbf8
mov eax, dword [0x005118e4]
add ebp, 1
mov ecx, dword [0x005118e0]
mov dword [0x004c6968], ebp
cmp eax, ecx
je 0x4ae160
cmp ebp, ecx
je 0x4adb7f
mov rcx, rdx
call fcn.004ad850
mov eax, dword [0x005118e4]
mov dword [0x005118e0], esi
mov dword [0x004c6968], esi
jmp 0x4adbe4
add r10, 1
mov eax, 2
mov dword [0x005118f0], eax
mov dword [0x005118d0], 1
jmp 0x4ada30
mov eax, dword [0x005118e0]
cmp dword [0x005118e4], eax
je 0x4ade10
cmp ebp, eax
jne 0x4ade28
mov ecx, ebp
jmp 0x4ade56
mov eax, dword [0x005118e4]
mov esi, dword [0x005118e0]
cmp eax, esi
je 0x4adbee
mov dword [0x004c6968], eax
mov edi, 0xffffffff
jmp 0x4adc1b
cmp byte [r9], 0x2d
je 0x4adcf0
test ebx, ebx
je 0x4adbee
add ebp, 1
mov qword [0x005118d8], r9
mov edi, 1
mov dword [0x004c6968], 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 [0x005118f8], r14
je 0x4adea8
mov rax, r10
jmp 0x4adc6a
movzx r8d, byte [rax + 1]
add rax, 1
test r8b, r8b
je 0x4adea8
cmp r8b, dil
jne 0x4adc58
test rax, rax
sete r8b
cmp dil, 0x3a
sete r9b
or r8d, r9d
test cl, cl
jne 0x4adc8c
add dword [0x004c6968], 1
test r8b, r8b
jne 0x4adeb3
cmp byte [rax], 0x57
movzx ecx, byte [rax + 1]
je 0x4adf60
cmp cl, 0x3a
jne 0x4adc1b
cmp byte [rax + 2], 0x3a
movzx ecx, byte [r15 + 1]
je 0x4ae13a
test cl, cl
movsxd rax, dword [0x004c6968]
je 0x4ae238
add eax, 1
mov qword [0x005118d8], r14
mov dword [0x004c6968], eax
mov qword [0x005118f8], 0
jmp 0x4adc1b
movzx ecx, byte [r9 + 1]
test cl, cl
je 0x4adc02
test r13, r13
je 0x4ae1b0
cmp cl, 0x2d
je 0x4add1e
lea r15, [r9 + 1]
movsx edi, cl
mov qword [0x005118f8], r15
jmp 0x4ada72
movsx edi, byte [r9 + 2]
lea r15, [r9 + 2]
mov qword [0x005118f8], r15
nop
test dil, dil
mov rax, r15
je 0x4add54
cmp dil, 0x3d
je 0x4add54
nop
movzx r8d, byte [rax + 1]
add rax, 1
test r8b, r8b
je 0x4add54
cmp r8b, 0x3d
jne 0x4add40
mov rbx, qword [r13]
test rbx, rbx
je 0x4ae0f0
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 0x4adddb
mov ebp, 1
mov rbx, qword [r12 + 0x20]
add r12, 0x20
add r14d, 1
test rbx, rbx
je 0x4adf00
mov r8, rdi
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4addc5
mov rcx, rbx
call sub.msvcrt.dll_strlen
cmp edi, eax
je 0x4ae050
test rsi, rsi
jne 0x4addc0
mov dword [rsp + 0x30], r14d
mov rsi, r12
jmp 0x4addc5
cmp ebp, eax
je 0x4adbca
mov dword [0x005118e4], ebp
mov ecx, ebp
jmp 0x4ade56
mov rcx, rdx
mov qword [rsp + 0xb0], r10
mov qword [rsp + 0xa8], rdx
call fcn.004ad850
mov ecx, dword [0x004c6968]
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0xb0]
cmp esi, ecx
jle 0x4adea0
movsxd rax, ecx
jmp 0x4ade71
add rax, 1
add ecx, 1
cmp esi, eax
mov dword [0x004c6968], ecx
jle 0x4adea0
mov r8, qword [rdx + rax*8]
mov ecx, eax
cmp byte [r8], 0x2d
jne 0x4ade60
cmp byte [r8 + 1], 0
je 0x4ade60
mov ebp, dword [0x004c6968]
cmp esi, ebp
mov dword [0x005118e0], ecx
jne 0x4adb29
jmp 0x4adbd8
mov ebp, ecx
jmp 0x4ade8a
test cl, cl
jne 0x4adeb3
add dword [0x004c6968], 1
mov ebx, dword [0x004c6964]
test ebx, ebx
je 0x4adeee
cmp qword [0x005118e8], 0
mov ecx, 2
mov rbx, qword [rdx]
je 0x4ae363
call qword [fcn.004bfbf0]
mov r9d, edi
mov r8, rbx
lea rdx, str._s:_illegal_option_____c_n
mov rcx, rax
call fcn.004ad940
mov dword [0x004c6960], edi
mov edi, 0x3f
jmp 0x4adc1b
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 0x4ae170
test r11, r11
mov r12, r11
je 0x4ae0f0
mov r14d, dword [rsp + 0x30]
jmp 0x4ae06e
cmp cl, 0x3b
jne 0x4adca2
cmp byte [r15 + 1], 0
movsxd rax, dword [0x004c6968]
je 0x4ae304
add eax, 1
mov qword [0x005118d8], r14
mov dword [0x004c6968], eax
movzx eax, byte [r14]
mov qword [0x005118f8], r14
mov rcx, r14
test al, al
jne 0x4adfac
jmp 0x4adfb0
movzx eax, byte [rcx + 1]
add rcx, 1
test al, al
je 0x4adfb0
cmp al, 0x3d
jne 0x4adfa0
mov r15, qword [r13]
test r15, r15
je 0x4ae595
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 0x4ae019
mov ebp, 1
mov r15, qword [r13 + 0x20]
add r13, 0x20
add ebx, 1
test r15, r15
je 0x4ae27d
mov r8, rdi
mov rdx, r14
mov rcx, r15
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4ae005
mov rcx, r15
call sub.msvcrt.dll_strlen
cmp rsi, rax
je 0x4ae43f
test r12, r12
jne 0x4ae000
mov dword [rsp + 0x30], ebx
mov r12, r13
jmp 0x4ae005
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 [0x004c6968], ecx
cmp byte [rax], 0
jne 0x4ae0d0
cmp r8d, 1
je 0x4ae259
mov rcx, r15
call sub.msvcrt.dll_strlen
add rax, r15
cmp qword [rsp + 0xc0], 0
mov qword [0x005118f8], rax
je 0x4ae0b3
mov rax, qword [rsp + 0xc0]
mov dword [rax], r14d
mov rax, qword [r12 + 0x10]
mov edi, dword [r12 + 0x18]
test rax, rax
je 0x4adc1b
mov dword [rax], edi
xor edi, edi
jmp 0x4adc1b
test r8d, r8d
je 0x4ae1c0
add rax, 1
mov qword [0x005118d8], rax
jmp 0x4ae08b
mov r12d, dword [rsp + 0xc8]
test r12d, r12d
je 0x4ae383
cmp cl, 0x2d
je 0x4ae4eb
movzx r8d, byte [r10]
test r8b, r8b
je 0x4ae54a
mov rcx, r10
mov eax, r8d
jmp 0x4ae130
movzx eax, byte [rcx + 1]
add rcx, 1
test al, al
je 0x4ae54a
cmp al, dil
jne 0x4ae120
jmp 0x4adabc
test cl, cl
je 0x4ae35b
add dword [0x004c6968], 1
mov qword [0x005118d8], r14
mov qword [0x005118f8], 0
jmp 0x4adc1b
mov dword [0x005118e4], ebp
mov eax, ebp
jmp 0x4adb7f
mov eax, dword [0x004c6964]
test eax, eax
jne 0x4ae325
mov rcx, r15
call sub.msvcrt.dll_strlen
mov dword [0x004c6960], 0
add dword [0x004c6968], 1
add rax, r15
mov qword [0x005118f8], rax
jmp 0x4adef4
movzx r8d, byte [r10]
lea r15, [r9 + 1]
movsx edi, cl
jmp 0x4adc34
mov eax, dword [0x004c6964]
test eax, eax
je 0x4ae08b
movsxd rcx, ecx
mov rsi, qword [r12]
mov rax, qword [rdx + rcx*8 - 8]
mov rbx, qword [rdx]
cmp byte [rax + 1], 0x2d
je 0x4ae5d1
movsx edi, byte [rax]
mov ecx, 2
call qword [fcn.004bfbf0]
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.004ad940
mov rbx, qword [0x005118f8]
mov rcx, rbx
call sub.msvcrt.dll_strlen
add rbx, rax
mov eax, dword [r12 + 0x18]
mov qword [0x005118f8], rbx
mov dword [0x004c6960], eax
jmp 0x4adef4
cmp esi, eax
je 0x4ae418
lea ecx, [rax + 1]
mov rax, qword [rdx + rax*8]
mov dword [0x004c6968], ecx
mov qword [0x005118d8], rax
jmp 0x4adcd9
cmp ecx, esi
jge 0x4ae46c
movsxd rcx, ecx
add ebp, 2
mov rax, qword [rdx + rcx*8]
mov dword [0x004c6968], ebp
mov qword [0x005118d8], rax
jmp 0x4ae08b
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 0x4ae4bd
test r12, r12
je 0x4ae595
test al, al
mov r8d, dword [r12 + 8]
je 0x4ae3e6
test r8d, r8d
je 0x4ae5aa
add rcx, 1
mov qword [0x005118d8], rcx
mov rcx, r14
call sub.msvcrt.dll_strlen
add rax, r14
cmp qword [rsp + 0xc0], 0
mov qword [0x005118f8], rax
je 0x4ae0b3
mov rax, qword [rsp + 0xc0]
mov esi, dword [rsp + 0x30]
mov dword [rax], esi
jmp 0x4ae0b3
cmp esi, eax
je 0x4ae521
mov r14, qword [rdx + rax*8]
lea ecx, [rax + 1]
mov dword [0x004c6968], ecx
mov qword [0x005118d8], r14
jmp 0x4adf8b
mov rbx, qword [rdx]
mov qword [rsp + 0x30], r9
mov ecx, 2
call qword [fcn.004bfbf0]
mov r9, qword [rsp + 0x30]
lea rdx, str._s:_option___s_is_ambiguous_n
mov rcx, rax
mov r8, rbx
call fcn.004ad940
mov r15, qword [0x005118f8]
jmp 0x4ae17e
xor r14d, r14d
jmp 0x4ae149
call qword [fcn.004bfbf0]
mov r9d, edi
mov r8, rbx
lea rdx, str._s:_invalid_option_____c_n
mov rcx, rax
call fcn.004ad940
jmp 0x4adeee
mov esi, dword [0x004c6964]
test esi, esi
je 0x4ae3c2
cmp cl, 0x2d
je 0x4ae4f9
mov rbx, qword [rdx]
mov ecx, 2
movsx esi, byte [r9]
call qword [fcn.004bfbf0]
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.004ad940
add dword [0x004c6968], 1
lea rax, [0x004fedc8]
mov dword [0x004c6960], 0
mov qword [0x005118f8], rax
jmp 0x4adef4
cmp r8d, 1
jne 0x4ae2d0
movsxd rax, dword [0x004c6968]
cmp eax, esi
jge 0x4ae677
lea ecx, [rax + 1]
mov rax, qword [rdx + rax*8]
mov dword [0x004c6968], ecx
mov qword [0x005118d8], rax
jmp 0x4ae2d0
mov eax, dword [0x004c6964]
test eax, eax
jne 0x4ae55d
mov dword [0x004c6960], edi
xor edi, edi
cmp byte [r10], 0x3a
setne dil
lea edi, [rdi + rdi*4 + 0x3a]
jmp 0x4adcd9
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 0x4ae2af
mov r13d, dword [0x004c6964]
test r13d, r13d
jne 0x4ae5f6
mov rcx, r15
mov qword [rsp + 0xb0], r10
call sub.msvcrt.dll_strlen
mov r10, qword [rsp + 0xb0]
add rax, r15
mov qword [0x005118f8], rax
mov eax, dword [r12 + 0x18]
mov dword [0x004c6960], eax
cmp byte [r10], 0x3a
jne 0x4adef4
mov edi, 0x3a
jmp 0x4adc1b
mov r9d, dword [0x004c6964]
test r9d, r9d
jne 0x4ae63d
mov rcx, r14
call sub.msvcrt.dll_strlen
add dword [0x004c6968], 1
add rax, r14
mov qword [0x005118f8], rax
jmp 0x4adef4
mov edi, dword [0x004c6964]
test edi, edi
je 0x4ae3c2
mov rbx, qword [rdx]
mov ecx, 2
call qword [fcn.004bfbf0]
lea rdx, str._s:_unrecognized_option_____s_n
mov r9, r15
mov rcx, rax
mov r8, rbx
call fcn.004ad940
jmp 0x4ae3c2
mov r11d, dword [0x004c6964]
test r11d, r11d
jne 0x4ae6bd
mov dword [0x004c6960], edi
xor edi, edi
cmp byte [r10], 0x3a
setne dil
lea edi, [rdi + rdi*4 + 0x3a]
jmp 0x4adc1b
mov ebp, dword [0x004c6964]
test ebp, ebp
jne 0x4ae396
jmp 0x4ae3c2
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov ecx, 2
call qword [fcn.004bfbf0]
lea rdx, str._s:_option_requires_an_argument_____c_n
mov r9d, edi
mov rcx, rax
mov r8, rbx
call fcn.004ad940
mov r10, qword [rsp + 0xb0]
jmp 0x4ae426
mov qword [0x005118f8], 0
mov edi, 0x57
jmp 0x4adc1b
mov r8d, dword [0x004c6964]
test r8d, r8d
jne 0x4ae6f5
mov rcx, r14
call sub.msvcrt.dll_strlen
add rax, r14
mov qword [0x005118f8], rax
jmp 0x4adef4
mov ecx, 2
call qword [fcn.004bfbf0]
mov r9, rsi
mov r8, rbx
lea rdx, str._s:_option_____s_doesnt_allow_an_argument_n
mov rcx, rax
call fcn.004ad940
jmp 0x4ae20f
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.004bfbf0]
lea rdx, str._s:_option___s_requires_an_argument_n
mov rcx, rax
mov r8, rbx
mov r9, rsi
call fcn.004ad940
mov r15, qword [0x005118f8]
mov r10, qword [rsp + 0xb0]
jmp 0x4ae47c
movsxd rax, dword [0x004c6968]
mov ecx, 2
mov rbx, qword [rdx]
mov rsi, qword [rdx + rax*8]
call qword [fcn.004bfbf0]
lea rdx, str._s:_option___W__s_is_ambiguous_n
mov r8, rbx
mov rcx, rax
mov r9, rsi
call fcn.004ad940
mov r14, qword [0x005118f8]
jmp 0x4ae4cd
mov ecx, dword [0x004c6964]
test ecx, ecx
jne 0x4ae728
mov rbx, qword [0x005118f8]
mov qword [rsp + 0xb0], r10
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov r10, qword [rsp + 0xb0]
add rbx, rax
mov qword [0x005118f8], rbx
cmp byte [r10], 0x3a
jne 0x4adef4
jmp 0x4ae4b3
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov ecx, 2
call qword [fcn.004bfbf0]
lea rdx, str._s:_option_requires_an_argument_____c_n
mov r9d, edi
mov rcx, rax
mov r8, rbx
call fcn.004ad940
mov r10, qword [rsp + 0xb0]
jmp 0x4ae531
mov rbx, qword [rdx]
mov ecx, 2
mov rsi, qword [r12]
call qword [fcn.004bfbf0]
lea rdx, str._s:_option___W__s_doesnt_allow_an_argument_n
mov rcx, rax
mov r8, rbx
mov r9, rsi
call fcn.004ad940
mov r14, qword [0x005118f8]
jmp 0x4ae5ba
mov rbx, qword [rdx]
mov qword [rsp + 0xb0], r10
mov ecx, 2
mov rsi, qword [rdx + rax*8 - 8]
call qword [fcn.004bfbf0]
lea rdx, str._s:_option___s_requires_an_argument_n
mov rcx, rax
mov r8, rbx
mov r9, rsi
call fcn.004ad940
mov r10, qword [rsp + 0xb0]
jmp 0x4ae685