Function at 0x650012e0
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xf0
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x65043120]
xor rax, rsp
mov qword [rsp + 0xe8], rax
mov r13, rdx
mov rdi, rcx
mov qword [r11 - 0x90], rcx
xor r14d, r14d
mov dword [rsp + 0x30], r14d
mov qword [rcx + 0x20], 0xf
mov qword [rcx + 0x18], r14
lea rbp, [rcx + 8]
mov byte [rbp], r14b
mov dword [rsp + 0x30], 1
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rsi, rax
mov ecx, r14d
mov rax, r14
test rax, rax
jle 0x6500136c
cmp word [rsi + rax*2 - 2], 0
jne 0x6500136c
cmp word [rsi + rax*2], 0
je 0x65001375
add ecx, 1
add rax, 1
jmp 0x65001358
movsxd rbx, ecx
add rbx, rbx
mov edx, 0xf
mov qword [rsp + 0x58], rdx
mov r8, r14
mov qword [rsp + 0x50], r14
mov byte [rsp + 0x40], r8b
cmp rbx, 0xfffffffffffffffe
jbe 0x650013a7
call fcn.6501d150
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
cmp rdx, rbx
jae 0x650013c0
mov rdx, rbx
lea rcx, [rsp + 0x38]
call fcn.65002330
mov rdx, qword [rsp + 0x58]
jmp 0x650013dd
test rbx, rbx
jne 0x650013dd
mov qword [rsp + 0x50], r14
lea rax, [rsp + 0x40]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0x40]
mov byte [rax], bl
jmp 0x65001416
test rbx, rbx
je 0x65001416
lea rcx, [rsp + 0x40]
cmp rdx, 0x10
cmovae rcx, qword [rsp + 0x40]
mov r9, rbx
mov r8, rsi
call fcn.6501d7b0
mov qword [rsp + 0x50], rbx
lea rax, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rax, qword [rsp + 0x40]
mov byte [rax + rbx], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.650021e0
nop
cmp qword [rsp + 0x58], 0x10
jb 0x6500143d
mov rcx, qword [rsp + 0x40]
call fcn.6501d300
lea rcx, [0x650430a0]
mov rax, qword [0x650430a0]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x28], rax
mov r8, qword [r13]
lea rdx, [0x65037038]
lea rcx, [rsp + 0x28]
call fcn.65002560
mov rbx, qword [rsp + 0x28]
mov esi, dword [rbx - 0x10]
cmp dword [rbx - 8], 1
jle 0x6500148b
mov edx, esi
lea rcx, [rsp + 0x28]
call fcn.65002130
mov rbx, qword [rsp + 0x28]
lea eax, [rsi + 1]
movsxd rsi, eax
add rsi, rsi
mov qword [rsp + 0xe0], 0xf
mov qword [rsp + 0xd8], r14
mov byte [rsp + 0xc8], 0
cmp rsi, 0xfffffffffffffffe
jbe 0x650014bb
call fcn.6501d150
cmp qword [rsp + 0xe0], rsi
jae 0x650014df
mov r8, qword [rsp + 0xd8]
mov rdx, rsi
lea rcx, [rsp + 0xc0]
call fcn.65002330
jmp 0x6500150b
test rsi, rsi
jne 0x6500150b
mov qword [rsp + 0xd8], r14
lea rax, [rsp + 0xc8]
cmp qword [rsp + 0xe0], 0x10
cmovae rax, qword [rsp + 0xc8]
mov byte [rax], sil
jmp 0x6500155e
test rsi, rsi
je 0x6500155e
lea rcx, [rsp + 0xc8]
mov rdx, qword [rsp + 0xe0]
cmp rdx, 0x10
cmovae rcx, qword [rsp + 0xc8]
mov r9, rsi
mov r8, rbx
call fcn.6501d7b0
mov qword [rsp + 0xd8], rsi
lea rax, [rsp + 0xc8]
cmp qword [rsp + 0xe0], 0x10
cmovae rax, qword [rsp + 0xc8]
mov byte [rax + rsi], 0
or r12, 0xffffffffffffffff
mov rax, qword [rsp + 0xd8]
cmp rax, r12
cmovb r12, rax
mov rcx, qword [rdi + 0x18]
or rax, 0xffffffffffffffff
sub rax, rcx
cmp rax, r12
jbe 0x6500158a
lea rax, [rcx + r12]
cmp rax, rcx
jae 0x6500158f
call fcn.6501d150
test r12, r12
je 0x6500163e
mov rax, qword [rdi + 0x18]
lea rsi, [r12 + rax]
cmp rsi, 0xfffffffffffffffe
jbe 0x650015ab
call fcn.6501d150
mov rax, qword [rdi + 0x20]
cmp rax, rsi
jae 0x650015c5
mov r8, qword [rdi + 0x18]
mov rdx, rsi
mov rcx, rdi
call fcn.65002330
jmp 0x650015e2
test rsi, rsi
jne 0x650015e2
mov qword [rdi + 0x18], r14
cmp rax, 0x10
jb 0x650015da
mov rax, qword [rbp]
jmp 0x650015dd
mov rax, rbp
mov byte [rax], 0
jmp 0x6500163e
test rsi, rsi
je 0x6500163e
lea r8, [rsp + 0xc8]
cmp qword [rsp + 0xe0], 0x10
cmovae r8, qword [rsp + 0xc8]
mov rdx, qword [rdi + 0x20]
cmp rdx, 0x10
jb 0x65001611
mov rcx, qword [rbp]
jmp 0x65001614
mov rcx, rbp
mov rax, qword [rdi + 0x18]
sub rdx, rax
add rcx, rax
mov r9, r12
call fcn.6501d7b0
mov qword [rdi + 0x18], rsi
cmp qword [rdi + 0x20], 0x10
jb 0x65001637
mov rax, qword [rbp]
jmp 0x6500163a
mov rax, rbp
mov byte [rax + rsi], 0
cmp qword [rsp + 0xe0], 0x10
jb 0x65001656
mov rcx, qword [rsp + 0xc8]
call fcn.6501d300
mov qword [rsp + 0xe0], 0xf
mov qword [rsp + 0xd8], r14
mov byte [rsp + 0xc8], 0
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x6500168e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
lea rcx, [0x650430a0]
mov rax, qword [0x650430a0]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
mov r8, qword [r13 + 0x18]
lea rdx, str.po_d
lea rcx, [rsp + 0x20]
call fcn.65002560
mov rbx, qword [rsp + 0x20]
mov esi, dword [rbx - 0x10]
cmp dword [rbx - 8], 1
jle 0x650016dc
mov edx, esi
lea rcx, [rsp + 0x20]
call fcn.65002130
mov rbx, qword [rsp + 0x20]
lea eax, [rsi + 1]
movsxd rsi, eax
add rsi, rsi
mov qword [rsp + 0xb8], 0xf
mov qword [rsp + 0xb0], r14
mov byte [rsp + 0xa0], 0
cmp rsi, 0xfffffffffffffffe
jbe 0x6500170c
call fcn.6501d150
cmp qword [rsp + 0xb8], rsi
jae 0x65001730
mov r8, qword [rsp + 0xb0]
mov rdx, rsi
lea rcx, [rsp + 0x98]
call fcn.65002330
jmp 0x6500175c
test rsi, rsi
jne 0x6500175c
mov qword [rsp + 0xb0], r14
lea rax, [rsp + 0xa0]
cmp qword [rsp + 0xb8], 0x10
cmovae rax, qword [rsp + 0xa0]
mov byte [rax], sil
jmp 0x650017af
test rsi, rsi
je 0x650017af
lea rcx, [rsp + 0xa0]
mov rdx, qword [rsp + 0xb8]
cmp rdx, 0x10
cmovae rcx, qword [rsp + 0xa0]
mov r9, rsi
mov r8, rbx
call fcn.6501d7b0
mov qword [rsp + 0xb0], rsi
lea rax, [rsp + 0xa0]
cmp qword [rsp + 0xb8], 0x10
cmovae rax, qword [rsp + 0xa0]
mov byte [rsi + rax], 0
or r12, 0xffffffffffffffff
mov rax, qword [rsp + 0xb0]
cmp rax, r12
cmovb r12, rax
mov rcx, qword [rdi + 0x18]
or rax, 0xffffffffffffffff
sub rax, rcx
cmp rax, r12
jbe 0x650017db
lea rax, [rcx + r12]
cmp rax, rcx
jae 0x650017e0
call fcn.6501d150
test r12, r12
je 0x65001886
mov rax, qword [rdi + 0x18]
lea rsi, [r12 + rax]
cmp rsi, 0xfffffffffffffffe
jbe 0x650017fc
call fcn.6501d150
mov rax, qword [rdi + 0x20]
cmp rax, rsi
jae 0x65001816
mov r8, qword [rdi + 0x18]
mov rdx, rsi
mov rcx, rdi
call fcn.65002330
jmp 0x6500182f
test rsi, rsi
jne 0x6500182f
mov qword [rdi + 0x18], r14
cmp rax, 0x10
jb 0x65001829
mov rbp, qword [rbp]
mov byte [rbp], 0
jmp 0x65001886
test rsi, rsi
je 0x65001886
lea r8, [rsp + 0xa0]
cmp qword [rsp + 0xb8], 0x10
cmovae r8, qword [rsp + 0xa0]
mov rdx, qword [rdi + 0x20]
cmp rdx, 0x10
jb 0x6500185e
mov rcx, qword [rbp]
jmp 0x65001861
mov rcx, rbp
mov rax, qword [rdi + 0x18]
sub rdx, rax
add rcx, rax
mov r9, r12
call fcn.6501d7b0
mov qword [rdi + 0x18], rsi
cmp qword [rdi + 0x20], 0x10
jb 0x65001882
mov rbp, qword [rbp]
mov byte [rsi + rbp], 0
cmp qword [rsp + 0xb8], 0x10
jb 0x6500189e
mov rcx, qword [rsp + 0xa0]
call fcn.6501d300
mov qword [rsp + 0xb8], 0xf
mov qword [rsp + 0xb0], r14
mov byte [rsp + 0xa0], 0
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x650018d6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov qword [rsp + 0x80], 0xf
mov qword [rsp + 0x78], r14
mov byte [rsp + 0x68], 0
mov r9d, 2
lea r8, [0x65037054]
lea edx, [r9 + 0xd]
lea rcx, [rsp + 0x68]
call fcn.6501d7b0
mov qword [rsp + 0x78], 2
lea rcx, [rsp + 0x68]
cmp qword [rsp + 0x80], 0x10
cmovae rcx, qword [rsp + 0x68]
mov byte [rcx + 2], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.650021e0
nop
cmp qword [rsp + 0x80], 0x10
jb 0x65001957
mov rcx, qword [rsp + 0x68]
call fcn.6501d300
mov rax, rdi
jmp 0x6500195a
mov rax, rdi
mov rcx, qword [rsp + 0xe8]
xor rcx, rsp
call fcn.6501e650
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret