Function at 0x140036b40
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 r14d, dword [rsp + 0xb8]
mov ebp, ecx
mov r15, rdx
mov r12, r8
mov r13, r9
test r8, r8
je 0x140036e16
mov r9d, dword [0x14027429c]
mov eax, dword [0x140274280]
test r9d, r9d
je 0x140036d10
cmp eax, 0xffffffff
je 0x140036d24
mov edx, dword [0x1403f7748]
test edx, edx
jne 0x140036d24
movzx eax, byte [r12]
cmp al, 0x2d
je 0x140036d57
mov r8d, dword [0x140274280]
test r8d, r8d
jne 0x140036bb6
cmp al, 0x2b
jne 0x140036bc2
and r14d, 0xfffffffe
cmp al, 0x2b
je 0x140036d5b
mov qword [0x1403f7740], 0
test edx, edx
je 0x140036c89
mov dword [0x140274284], 0xffffffff
mov dword [0x140274288], 0xffffffff
nop dword [rax]
mov dword [0x1403f7748], 0
mov ebx, dword [0x14027429c]
cmp ebx, ebp
jge 0x140036dd8
movsxd rax, ebx
mov rsi, qword [r15 + rax*8]
cmp byte [rsi], 0x2d
mov qword [str.H_b__], rsi
je 0x140036d68
lea rax, [0x1403e0848]
mov qword [str.H_b__], rax
test r14b, 2
jne 0x140036e30
test r14b, 1
je 0x140036e16
mov esi, dword [0x140274288]
cmp esi, 0xffffffff
je 0x140036dc8
mov edi, dword [0x140274284]
cmp edi, 0xffffffff
je 0x140036c80
mov edx, edi
mov r9, r15
mov r8d, ebx
mov ecx, esi
call fcn.140036650
sub edi, esi
mov eax, ebx
mov dword [0x140274284], 0xffffffff
sub eax, edi
mov dword [0x140274288], eax
add ebx, 1
mov dword [0x14027429c], ebx
mov rdi, qword [str.H_b__]
movzx eax, byte [rdi]
test al, al
je 0x140036bf0
test r13, r13
je 0x140036cbf
movsxd rdx, dword [0x14027429c]
cmp qword [r15 + rdx*8], rdi
je 0x140036cbf
cmp al, 0x2d
je 0x14003709b
and r14d, 4
jne 0x140036e63
lea rbx, [rdi + 1]
movsx r14d, al
mov qword [str.H_b__], rbx
cmp al, 0x3a
jne 0x140036eb5
cmp byte [rdi + 1], 0
jne 0x140036ce3
add dword [0x14027429c], 1
mov ecx, dword [0x1402742a0]
test ecx, ecx
je 0x140036cf8
cmp byte [r12], 0x3a
jne 0x140037037
mov dword [0x140274298], r14d
mov r14d, 0x3f
jmp 0x140036e1c
mov dword [0x1403f7748], 1
mov dword [0x14027429c], 1
xor edx, edx
xor r8d, r8d
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [0x1403f7748]
test eax, eax
setne al
movzx eax, al
mov dword [0x140274280], eax
movzx eax, byte [r12]
cmp al, 0x2d
jne 0x140036ba6
or r14d, 2
add r12, 1
jmp 0x140036bc2
movzx eax, byte [rsi + 1]
test al, al
jne 0x140036fa6
mov edx, 0x2d
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
je 0x140036c1f
cmp dword [0x140274288], 0xffffffff
je 0x1400370ad
cmp dword [0x140274284], 0xffffffff
je 0x140037090
lea rbx, [rsi + 1]
mov qword [str.H_b__], rbx
cmp byte [rsi + 1], 0
je 0x140036f64
mov r14d, 0x2d
jmp 0x140036ce3
mov dword [0x140274288], ebx
jmp 0x140036c80
mov esi, dword [0x140274284]
lea rax, [0x1403e0848]
mov edi, dword [0x140274288]
mov qword [str.H_b__], rax
cmp esi, 0xffffffff
jne 0x140036e48
cmp edi, 0xffffffff
je 0x140036e02
mov dword [0x14027429c], edi
mov dword [0x140274284], 0xffffffff
mov dword [0x140274288], 0xffffffff
mov r14d, 0xffffffff
mov eax, r14d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add ebx, 1
mov qword [0x1403f7740], rsi
mov r14d, 1
mov dword [0x14027429c], ebx
jmp 0x140036e1c
mov edx, esi
sub esi, edi
mov r8d, ebx
mov r9, r15
mov ecx, edi
sub ebx, esi
call fcn.140036650
mov dword [0x14027429c], ebx
jmp 0x140036e02
xor edx, edx
cmp al, 0x3a
je 0x140036e7c
movsx edx, al
mov rcx, r12
call sub.msvcrt.dll_strchr
xor edx, edx
test rax, rax
setne dl
mov dword [rsp + 0x20], edx
mov r8, r13
mov rdx, r12
mov rcx, r15
mov r9, qword [rsp + 0xb0]
call fcn.1400367a0
mov r14d, eax
cmp eax, 0xffffffff
je 0x140037028
lea rax, [0x1403e0848]
mov qword [str.H_b__], rax
jmp 0x140036e1c
cmp r14d, 0x2d
je 0x1400370bb
mov edx, r14d
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
je 0x140036cd6
movzx edx, byte [rax + 1]
test r13, r13
je 0x140036f87
cmp r14d, 0x57
jne 0x140036f87
cmp dl, 0x3b
jne 0x140036f87
cmp byte [rdi + 1], 0
jne 0x1400370f3
mov eax, dword [0x14027429c]
add eax, 1
mov dword [0x14027429c], eax
cmp eax, ebp
jl 0x1400370e6
mov edx, dword [0x1402742a0]
lea rax, [0x1403e0848]
mov qword [str.H_b__], rax
test edx, edx
je 0x140036f44
cmp byte [r12], 0x3a
je 0x140036f44
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call fcn.140036710
mov dword [0x140274298], 0x57
cmp byte [r12], 0x3a
je 0x140037159
mov r14d, 0x3f
jmp 0x140036e1c
mov edx, 0x2d
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
je 0x140036e16
movzx edx, byte [rax + 1]
mov rdi, rsi
mov r14d, 0x2d
cmp dl, 0x3a
je 0x14003704b
cmp byte [rdi + 1], 0
jne 0x140036e1c
add dword [0x14027429c], 1
jmp 0x140036e1c
mov ecx, dword [0x140274288]
cmp ecx, 0xffffffff
je 0x140036fbe
cmp dword [0x140274284], 0xffffffff
je 0x140037085
lea rdi, [rsi + 1]
mov qword [str.H_b__], rdi
cmp al, 0x2d
jne 0x140036c9b
cmp byte [rsi + 2], 0
jne 0x140036c9b
mov esi, dword [0x140274284]
add ebx, 1
lea rax, [0x1403e0848]
mov dword [0x14027429c], ebx
mov qword [str.H_b__], rax
cmp esi, 0xffffffff
je 0x140036e02
mov r8d, ebx
mov edx, esi
mov r9, r15
mov dword [rsp + 0x3c], ecx
call fcn.140036650
mov ecx, dword [rsp + 0x3c]
sub esi, ecx
sub ebx, esi
mov dword [0x14027429c], ebx
jmp 0x140036e02
mov rdi, qword [str.H_b__]
movzx eax, byte [rdi]
jmp 0x140036cbf
mov edx, r14d
lea rcx, str.unknown_option_____c
call fcn.140036710
jmp 0x140036cf8
mov qword [0x1403f7740], 0
cmp byte [rdi + 1], 0
mov edx, dword [0x14027429c]
je 0x1400370c3
mov qword [0x1403f7740], rbx
lea rax, [0x1403e0848]
add edx, 1
mov qword [str.H_b__], rax
mov dword [0x14027429c], edx
jmp 0x140036e1c
mov dword [0x140274284], ebx
jmp 0x140036fbe
mov dword [0x140274284], ebx
jmp 0x140036da4
add rdi, 1
xor edx, edx
mov qword [str.H_b__], rdi
jmp 0x140036e7c
lea rbx, [rsi + 1]
mov rdi, rsi
mov qword [str.H_b__], rbx
mov rsi, rdi
jmp 0x140036daf
cmp byte [rax + 2], 0x3a
je 0x140037069
add edx, 1
mov dword [0x14027429c], edx
cmp ebp, edx
jle 0x140037119
movsxd rax, edx
mov rax, qword [r15 + rax*8]
mov qword [0x1403f7740], rax
jmp 0x140037069
cdqe
mov rax, qword [r15 + rax*8]
mov qword [str.H_b__], rax
mov dword [rsp + 0x20], 0
mov r8, r13
mov rdx, r12
mov rcx, r15
mov r9, qword [rsp + 0xb0]
call fcn.1400367a0
mov r14d, eax
jmp 0x140036ea2
lea rax, [0x1403e0848]
mov qword [str.H_b__], rax
mov eax, dword [0x1402742a0]
test eax, eax
je 0x140037147
cmp byte [r12], 0x3a
je 0x140037147
mov edx, r14d
lea rcx, str.option_requires_an_argument_____c
call fcn.140036710
mov dword [0x140274298], r14d
cmp byte [r12], 0x3a
jne 0x140036f59
mov r14d, 0x3a
jmp 0x140036e1c