Function at 0x1400d1fd0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x550]
sub rsp, 0x650
xor ebx, ebx
mov r15, rdx
mov r12, rcx
mov dword [0x14027199c], ebx
lea rdx, [0x1400d2400]
mov dword [0x1402719a0], ebx
mov r14d, r9d
mov esi, r8d
lea ecx, [rbx + 0x16]
call fcn.140183bbc
lea rdx, [0x1400d2400]
mov qword [0x140271930], rax
lea ecx, [rbx + 8]
call fcn.140183bbc
lea rdx, [0x1400d2400]
mov qword [0x1402718c0], rax
lea ecx, [rbx + 4]
call fcn.140183bbc
lea rdx, [0x1400d2400]
mov qword [0x1402718a0], rax
lea ecx, [rbx + 2]
call fcn.140183bbc
lea rdx, [0x1400d2400]
mov qword [0x140271890], rax
lea ecx, [rbx + 0xb]
call fcn.140183bbc
lea rdx, [0x1400d2400]
mov qword [0x1402718d8], rax
lea ecx, [rbx + 0xf]
call fcn.140183bbc
mov qword [0x1402718f8], rax
mov eax, 1
mov dword [0x1402719a0], eax
test esi, esi
jne 0x1400d20d5
cmp dword [0x140271998], ebx
je 0x1400d20d5
mov eax, dword [0x140271980]
mov ecx, 0xfffffff6
and eax, 0xfffffffb
mov dword [0x140271984], eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [0x140271984]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
or edi, 0xffffffff
mov dword [0x1402719a0], 2
cmp dword [0x140271998], ebx
mov byte [rsp + 0x50], bl
lea r13d, [rdi + 0xb]
je 0x1400d2245
xor r8d, r8d
lea rcx, str.OPENSSL_WIN32_UTF8
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, 0xfffffff6
test eax, eax
je 0x1400d21de
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r9, [rbp + 0x590]
mov qword [rsp + 0x20], rbx
mov rcx, rax
lea rdx, [rbp + 0x150]
mov r8d, 0x1ff
call qword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x1400d22f3
mov edx, dword [rbp + 0x590]
cmp edx, 2
jb 0x1400d2180
lea eax, [rdx - 2]
lea r8, [rbp + 0x150]
cmp word [r8 + rax*2], 0xd
lea r8, [r8 + rax*2]
jne 0x1400d2180
lea ecx, [rdx - 1]
cmp word [rbp + rcx*2 + 0x150], r13w
jne 0x1400d2180
mov word [r8], r13w
mov edx, ecx
mov dword [rbp + 0x590], ecx
mov eax, edx
lea r8, [rbp + 0x150]
mov qword [rsp + 0x38], rbx
mov r9d, edi
mov qword [rsp + 0x30], rbx
xor edx, edx
mov dword [rsp + 0x28], 0x200
mov ecx, 0xfde9
mov word [rbp + rax*2 + 0x150], bx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rdi, [rsp + 0x50]
mov edx, 0x400
test eax, eax
lea rcx, [rbp + 0x150]
cmovle rdi, rbx
call fcn.14006bdc0
jmp 0x1400d225e
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r9, [rbp + 0x590]
mov qword [rsp + 0x20], rbx
mov rcx, rax
lea rdx, [rsp + 0x50]
mov r8d, 0x1ff
call qword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x1400d22f3
mov edx, dword [rbp + 0x590]
cmp edx, 2
jb 0x1400d223d
lea ecx, [rdx - 2]
lea r8, [rsp + 0x50]
add r8, rcx
cmp byte [r8], 0xd
jne 0x1400d223d
lea ecx, [rdx - 1]
cmp byte [rsp + rcx + 0x50], r13b
jne 0x1400d223d
mov byte [r8], r13b
mov edx, ecx
mov dword [rbp + 0x590], ecx
mov eax, edx
mov byte [rsp + rax + 0x50], bl
jmp 0x1400d2267
mov r8, qword [0x140271988]
lea rcx, [rsp + 0x50]
mov edx, 0x1ff
call fcn.140182568
mov rdi, rax
test rdi, rdi
je 0x1400d22f3
mov rcx, qword [0x140271988]
call fcn.140181ac8
test eax, eax
jne 0x1400d22f3
mov rcx, qword [0x140271988]
call fcn.140181af4
test eax, eax
jne 0x1400d22f3
mov edx, r13d
lea rcx, [rsp + 0x50]
call fcn.1401753cc
test rax, rax
je 0x1400d22a2
test r14d, r14d
je 0x1400d22d9
mov byte [rax], bl
jmp 0x1400d22d9
mov rdi, qword [0x140271988]
nop dword [rax]
mov r8, rdi
lea rcx, [rsp + 0x40]
mov edx, 4
call fcn.140182568
test rax, rax
je 0x1400d22f3
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1401753cc
test rax, rax
je 0x1400d22b0
lea r8, [rsp + 0x50]
mov rdx, r15
mov rcx, r12
call fcn.140076550
test eax, eax
mov eax, 1
cmovns ebx, eax
mov eax, dword [0x14027199c]
cmp eax, 2
mov eax, 0xffffffff
cmove ebx, eax
test esi, esi
jne 0x1400d231b
mov rcx, qword [0x140271990]
lea rdx, [0x14019ae74]
call fcn.14001c780
mov eax, dword [0x1402719a0]
cmp eax, 2
jl 0x1400d235e
test esi, esi
jne 0x1400d235e
cmp dword [0x140271998], esi
je 0x1400d235e
mov eax, dword [0x140271980]
mov ecx, 0xfffffff6
mov dword [0x140271984], eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [0x140271984]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x1402719a0]
cmp eax, 1
jl 0x1400d23c9
mov rdx, qword [0x140271930]
mov ecx, reloc.WS2_32.dll_shutdown
call fcn.140183bbc
mov rdx, qword [0x1402718c0]
mov ecx, 8
call fcn.140183bbc
mov rdx, qword [0x1402718a0]
mov ecx, 4
call fcn.140183bbc
mov rdx, qword [0x140271890]
mov ecx, 2
call fcn.140183bbc
mov rdx, qword [0x1402718d8]
mov ecx, listen
call fcn.140183bbc
mov rdx, qword [0x1402718f8]
mov ecx, recv
call fcn.140183bbc
mov edx, 0x200
lea rcx, [rsp + 0x50]
call fcn.14006bdc0
lea r11, [rsp + 0x650]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret