Function at 0x470950
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
test r8, r8
mov esi, ecx
mov rbx, rdx
mov r13, r8
mov qword [rsp + 0xa8], r9
je 0x470c5c
mov r9d, dword [0x0051315c]
test r9d, r9d
je 0x470ab0
cmp dword [0x00513140], 0xffffffff
je 0x470ac4
mov eax, dword [0x0054e160]
test eax, eax
jne 0x470ac4
movzx edx, byte [r13]
cmp dl, 0x2d
je 0x470af3
mov r8d, dword [0x00513140]
test r8d, r8d
jne 0x470c74
cmp dl, 0x2b
je 0x470c74
sub edx, 0x2b
and edx, 0xfd
je 0x470afb
test eax, eax
mov qword [0x0054e158], 0
je 0x4709fd
mov dword [0x00513144], 0xffffffff
mov dword [0x00513148], 0xffffffff
mov edi, dword [rsp + 0xb8]
mov r12d, dword [rsp + 0xb8]
lea rbp, [0x005223f5]
and edi, 2
and r12d, 1
nop word [rax + rax]
test eax, eax
jne 0x470a38
mov r10, qword [0x00513150]
movzx r14d, byte [r10]
test r14b, r14b
jne 0x470cf0
movsxd r8, dword [0x0051315c]
mov dword [0x0054e160], 0
cmp r8d, esi
jge 0x470c81
movsxd rax, r8d
mov r15, qword [rbx + rax*8]
cmp byte [r15], 0x2d
mov qword [0x00513150], r15
je 0x470b70
test edi, edi
mov qword [0x00513150], rbp
jne 0x470cb3
test r12d, r12d
je 0x470c5c
mov r14d, dword [0x00513148]
cmp r14d, 0xffffffff
je 0x470b50
mov r15d, dword [0x00513144]
cmp r15d, 0xffffffff
jne 0x470b04
add r8d, 1
mov dword [0x0051315c], r8d
jmp 0x470a24
mov dword [0x0054e160], 1
mov dword [0x0051315c], 1
lea rcx, str.POSIXLY_CORRECT
call sub.msvcrt.dll_getenv
movzx edx, byte [r13]
test rax, rax
setne al
movzx eax, al
mov dword [0x00513140], eax
mov eax, dword [0x0054e160]
cmp dl, 0x2d
jne 0x4709b2
or dword [rsp + 0xb8], 2
add r13, 1
jmp 0x4709da
mov edx, r15d
mov ecx, r14d
mov r9, rbx
call fcn.00470470
mov edx, dword [0x0051315c]
mov eax, r15d
mov dword [0x00513144], 0xffffffff
sub eax, r14d
mov ecx, edx
add edx, 1
sub ecx, eax
mov dword [0x0051315c], edx
mov eax, dword [0x0054e160]
mov dword [0x00513148], ecx
jmp 0x470a20
mov dword [0x00513148], r8d
add r8d, 1
mov dword [0x0051315c], r8d
jmp 0x470a24
movzx r14d, byte [r15 + 1]
test r14b, r14b
jne 0x470ccc
mov edx, 0x2d
mov rcx, r13
mov dword [rsp + 0x38], r8d
call sub.msvcrt.dll_strchr
test rax, rax
movsxd r8, dword [rsp + 0x38]
je 0x470a6a
mov edi, dword [0x00513148]
cmp edi, 0xffffffff
je 0x470f16
cmp dword [0x00513144], 0xffffffff
je 0x470ecf
test r14b, r14b
jne 0x470cdb
lea rbp, [r15 + 1]
mov qword [0x00513150], rbp
cmp byte [r15 + 1], 0
jne 0x470ec8
mov edx, 0x2d
mov rcx, r13
call sub.msvcrt.dll_strchr
test rax, rax
je 0x470c5c
mov r10, r15
mov edi, 0x2d
movzx edx, byte [rax + 1]
cmp dl, 0x3a
je 0x470edb
cmp byte [r10 + 1], 0
jne 0x470c61
add dword [0x0051315c], 1
jmp 0x470c61
mov esi, dword [0x00513144]
lea rax, [0x005223f5]
add r8d, 1
mov dword [0x0051315c], r8d
mov qword [0x00513150], rax
cmp esi, 0xffffffff
je 0x470c48
mov edx, esi
mov r9, rbx
mov ecx, edi
call fcn.00470470
sub esi, edi
sub dword [0x0051315c], esi
mov dword [0x00513144], 0xffffffff
mov dword [0x00513148], 0xffffffff
mov edi, 0xffffffff
mov eax, edi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
and dword [rsp + 0xb8], 0xfffffffe
jmp 0x4709cb
mov esi, dword [0x00513144]
lea rax, [0x005223f5]
mov edi, dword [0x00513148]
mov qword [0x00513150], rax
cmp esi, 0xffffffff
jne 0x470c34
mov eax, dword [0x00513148]
cmp eax, 0xffffffff
je 0x470c48
mov dword [0x0051315c], eax
jmp 0x470c48
add r8d, 1
mov qword [0x0054e158], r15
mov edi, 1
mov dword [0x0051315c], r8d
jmp 0x470c61
mov edi, dword [0x00513148]
cmp edi, 0xffffffff
jne 0x470bad
lea r10, [r15 + 1]
cmp r14b, 0x2d
mov qword [0x00513150], r10
je 0x470e92
cmp qword [rsp + 0xa8], 0
je 0x470d81
movsxd rax, dword [0x0051315c]
cmp qword [rbx + rax*8], r10
je 0x470d81
cmp r14b, 0x2d
je 0x470eb6
test byte [rsp + 0xb8], 4
je 0x470d81
xor eax, eax
cmp r14b, 0x3a
je 0x470d3d
movsx edx, r14b
mov rcx, r13
call sub.msvcrt.dll_strchr
test rax, rax
setne al
movzx eax, al
mov r9, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
mov rdx, r13
mov dword [rsp + 0x20], eax
mov rcx, rbx
call fcn.004705b0
cmp eax, 0xffffffff
mov edi, eax
je 0x470d76
lea rax, [0x005223f5]
mov qword [0x00513150], rax
jmp 0x470c61
mov r10, qword [0x00513150]
movzx r14d, byte [r10]
lea rbp, [r10 + 1]
movsx edi, r14b
cmp edi, 0x3a
mov qword [0x00513150], rbp
je 0x470e55
cmp edi, 0x2d
je 0x470f24
mov edx, edi
mov rcx, r13
mov qword [rsp + 0x38], r10
call sub.msvcrt.dll_strchr
test rax, rax
mov r10, qword [rsp + 0x38]
je 0x470e55
cmp qword [rsp + 0xa8], 0
je 0x470bf3
cmp edi, 0x57
jne 0x470bf3
movzx edx, byte [rax + 1]
cmp dl, 0x3b
jne 0x470bf7
cmp byte [r10 + 1], 0
jne 0x470f9e
mov eax, dword [0x0051315c]
add eax, 1
cmp esi, eax
mov dword [0x0051315c], eax
jg 0x470f91
mov edx, dword [0x00513160]
lea rax, [0x005223f5]
mov qword [0x00513150], rax
test edx, edx
je 0x470e36
cmp byte [r13], 0x3a
je 0x470e36
lea rcx, str.option_requires_an_argument_____c
mov edx, 0x57
call fcn.00470530
mov dword [0x00513158], 0x57
cmp byte [r13], 0x3a
je 0x470f87
mov edi, 0x3f
jmp 0x470c61
cmp byte [r10 + 1], 0
jne 0x470e63
add dword [0x0051315c], 1
mov ecx, dword [0x00513160]
test ecx, ecx
je 0x470e82
cmp byte [r13], 0x3a
je 0x470e82
lea rcx, str.unknown_option_____c
mov edx, edi
call fcn.00470530
mov dword [0x00513158], edi
mov edi, 0x3f
jmp 0x470c61
cmp byte [r15 + 2], 0
je 0x470c10
cmp qword [rsp + 0xa8], 0
je 0x470fdb
cmp r10, qword [rbx + r8*8]
je 0x470d81
add r10, 1
xor eax, eax
mov qword [0x00513150], r10
jmp 0x470d3d
mov edi, 0x2d
jmp 0x470e63
mov dword [0x00513144], r8d
jmp 0x470bba
mov qword [0x0054e158], 0
cmp byte [r10 + 1], 0
je 0x470f30
mov eax, dword [0x0051315c]
mov qword [0x0054e158], rbp
lea rsi, [0x005223f5]
add eax, 1
mov dword [0x0051315c], eax
mov qword [0x00513150], rsi
jmp 0x470c61
lea rbp, [r15 + 1]
mov r10, r15
mov qword [0x00513150], rbp
mov r15, r10
jmp 0x470bce
cmp byte [rax + 2], 0x3a
mov eax, dword [0x0051315c]
je 0x470efa
add eax, 1
cmp esi, eax
mov dword [0x0051315c], eax
jg 0x470fc8
lea rax, [0x005223f5]
mov qword [0x00513150], rax
mov eax, dword [0x00513160]
test eax, eax
je 0x470f76
cmp byte [r13], 0x3a
je 0x470f76
lea rcx, str.option_requires_an_argument_____c
mov edx, edi
call fcn.00470530
mov dword [0x00513158], edi
cmp byte [r13], 0x3a
jne 0x470e4b
mov edi, 0x3a
jmp 0x470c61
cdqe
mov rax, qword [rbx + rax*8]
mov qword [0x00513150], rax
mov r9, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
mov rdx, r13
mov dword [rsp + 0x20], 0
mov rcx, rbx
call fcn.004705b0
mov edi, eax
jmp 0x470d63
movsxd rdx, eax
mov rdx, qword [rbx + rdx*8]
mov qword [0x0054e158], rdx
jmp 0x470efa
lea rbp, [r15 + 2]
mov r15, r10
mov qword [0x00513150], rbp
jmp 0x470bce