Function at 0x140417220
Capabilities:
Query environment variable

Disassembly:
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x30
mov r14, r8
mov rsi, rdx
mov r15, rcx
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp byte [rdx + rdi], 0
jne 0x140417240
xor r12d, r12d
mov qword [rsp + 0x78], r12
test rdi, rdi
je 0x140417283
cmp byte [rdi + rdx - 1], 0x2e
jne 0x140417283
mov rcx, rsi
call fcn.14041d300
test rax, rax
mov qword [r14], rax
mov ecx, reloc.WS2_32.dll_ntohs
cmovne ecx, r12d
mov eax, ecx
add rsp, 0x30
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
test byte [rcx], 0x40
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbp
jne 0x140417428
mov edx, 0x2e
mov rcx, rsi
call sub.VCRUNTIME140.dll_strchr
test rax, rax
jne 0x140417428
lea rcx, str.HOSTALIASES
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140417428
lea rdx, [0x14054a95c]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbp, rax
test rax, rax
je 0x140417410
lea r8, [rsp + 0x20]
mov rcx, rax
lea rdx, [rsp + 0x78]
call fcn.14041d4c0
mov ebx, eax
test eax, eax
jne 0x14041736e
nop word [rax + rax]
mov rcx, qword [rsp + 0x78]
mov r8, rdi
mov rdx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
test eax, eax
jne 0x140417356
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rax + rdi]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
test eax, eax
je 0x140417356
mov rbx, qword [rsp + 0x78]
add rbx, rdi
movzx ecx, byte [rbx]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
test eax, eax
je 0x140417351
nop dword [rax]
movzx ecx, byte [rbx + 1]
inc rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
test eax, eax
jne 0x140417340
cmp byte [rbx], r12b
jne 0x14041739a
lea r8, [rsp + 0x20]
mov rcx, rbp
lea rdx, [rsp + 0x78]
call fcn.14041d4c0
mov ebx, eax
test eax, eax
je 0x140417300
mov rcx, qword [rsp + 0x78]
call qword [str._hA_]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test ebx, ebx
je 0x140417428
cmp ebx, 0xd
je 0x140417428
mov eax, ebx
jmp 0x140417454
movzx eax, byte [rbx + 1]
lea rdi, [rbx + 1]
test al, al
je 0x1404173be
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
test eax, eax
jne 0x1404173be
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x1404173a6
mov rsi, rdi
sub rsi, rbx
lea rcx, [rsi + 1]
call qword [str.PhA_]
mov qword [r14], rax
test rax, rax
je 0x1404173ee
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [r14]
sub rax, rbx
mov byte [rax + rdi], r12b
mov rcx, qword [rsp + 0x78]
call qword [str._hA_]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp qword [r14], r12
mov eax, reloc.WS2_32.dll_ntohs
cmovne eax, r12d
jmp 0x140417454
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
cmp eax, 1
jbe 0x140417428
mov qword [r14], r12
mov eax, ntohs
jmp 0x140417454
test byte [r15], 0x20
jne 0x14041743b
cmp dword [r15 + 0x30], r12d
je 0x14041743b
mov qword [r14], r12
xor eax, eax
jmp 0x140417454
mov rcx, rsi
call fcn.14041d300
test rax, rax
mov qword [r14], rax
mov ecx, reloc.WS2_32.dll_ntohs
cmovne ecx, r12d
mov eax, ecx
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret