Function at 0x1800b5590
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x128
cmp dword [0x18022f398], 0
mov dword [rsp + 0x130], 1
je 0x1800b55b8
mov eax, 1
add rsp, 0x128
ret
mov qword [rsp + 0x138], rbx
lea rdx, [rsp + 0x30]
lea rcx, str.HLS_IPADDR
mov qword [rsp + 0x140], rsi
xor esi, esi
xor r8d, r8d
mov dword [reloc.WSOCK32.dll_accept], esi
mov dword [0x18022f394], esi
mov dword [0x18022f398], 1
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
mov ebx, eax
je 0x1800b5743
inc ebx
xor ecx, ecx
movsxd rdx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov qword [rsp + 0x30], rax
je 0x1800b5743
lea rcx, str.HLS_IPADDR
mov r8d, ebx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x1800b5743
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1800b5743
mov rdx, rcx
movzx eax, byte [rdx]
inc rdx
test al, al
jne 0x1800b5646
sub edx, ecx
dec edx
cmp edx, 0x63
jbe 0x1800b565d
mov byte [rcx + 0x63], sil
lea rdx, [rsp + 0xb0]
sub rdx, rcx
nop
nop
movzx eax, byte [rcx]
inc rcx
test al, al
mov byte [rdx + rcx - 1], al
jne 0x1800b5670
lea rcx, [rsp + 0xb0]
movzx eax, byte [rcx]
inc rcx
test al, al
jne 0x1800b5686
lea rax, [rsp + 0xb0]
sub ecx, eax
dec ecx
je 0x1800b5743
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0x148], rdi
mov byte [rsp + 0x40], sil
mov edi, esi
call fcn.1800b4fa0
test eax, eax
je 0x1800b5731
lea rbx, [rsp + 0xb0]
nop
nop
movzx edx, byte [rbx]
test dl, dl
mov al, dl
je 0x1800b570c
cmp al, 0x20
je 0x1800b571b
cmp al, 0x2c
je 0x1800b570c
lea rcx, [rsp + 0x40]
movzx eax, byte [rcx]
inc rcx
test al, al
jne 0x1800b56e6
lea rax, [rsp + 0x40]
sub ecx, eax
dec ecx
cmp ecx, 0x63
jae 0x1800b571b
lea eax, [rcx + 1]
mov byte [rsp + rcx + 0x40], dl
mov byte [rsp + rax + 0x40], sil
jmp 0x1800b571b
lea rcx, [rsp + 0x40]
call fcn.1800b53c0
mov byte [rsp + 0x40], sil
lea rcx, [rsp + 0xb0]
inc edi
inc rbx
call fcn.1800b4fa0
cmp edi, eax
jb 0x1800b56d0
lea rcx, [rsp + 0x40]
call fcn.1800b53c0
mov rdi, qword [rsp + 0x148]
mov edx, 2
xor r8d, r8d
mov qword [0x18022e878], rsi
mov ecx, edx
call qword [0x18022ea98]
cmp rax, 0xffffffffffffffff
mov qword [0x18022e878], rax
jne 0x1800b576e
xor eax, eax
jmp 0x1800b58e2
lea rdx, [0x18022e860]
mov r8d, setsockopt
mov rcx, rax
mov word [0x18022e860], 2
mov dword [0x18022e864], esi
mov word [0x18022e862], si
call qword [0x18022eab8]
cmp eax, 0xffffffff
je 0x1800b5767
mov rcx, qword [0x18022e878]
lea r9, [rsp + 0x130]
mov edx, 0xffff
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call qword [0x18022eab0]
cmp dword [0x18022f394], esi
lea rbx, [0x18022eb60]
jne 0x1800b5899
lea rcx, str.HLSERVER
call qword [0x18022e448]
test rax, rax
je 0x1800b5863
mov rax, qword [rax + 0x18]
mov dword [0x18022f394], 1
mov rdx, qword [rax]
mov rcx, rdx
mov eax, dword [rdx]
sub rcx, rdx
mov dword [rsp + rcx + 0x30], eax
mov ecx, dword [rsp + 0x30]
call qword [0x18022e888]
mov rdx, rbx
nop
nop
nop
movzx ecx, byte [rax]
inc rdx
inc rax
test cl, cl
mov byte [rdx - 1], cl
jne 0x1800b5820
lea rdx, [0x180118d00]
lea rcx, str.hlserver
mov word [0x18022e952], 0xbe7
call qword [0x18022eac8]
test rax, rax
je 0x1800b5863
movzx ecx, word [rax + 0x18]
call qword [0x18022e890]
mov word [0x18022e952], ax
cmp dword [0x18022f394], esi
jne 0x1800b5899
mov dword [0x18022f394], 1
mov rdx, rsi
lea r8, [0x180118ce0]
nop
movzx eax, byte [rdx + r8]
inc rdx
test al, al
mov byte [rdx + rbx - 1], al
jne 0x1800b5880
mov word [0x18022e952], 0xbe7
movzx ecx, word [0x18022e952]
mov qword [0x18022ea88], rsi
mov qword [0x18022ea90], rsi
mov word [0x18022ea88], 2
call qword [0x18022eaa8]
mov rcx, rbx
mov word [0x18022ea8a], ax
call qword [0x18022e450]
mov dword [reloc.WSOCK32.dll_accept], 1
mov dword [0x18022ea8c], eax
mov eax, 1
mov rbx, qword [rsp + 0x138]
mov rsi, qword [rsp + 0x140]
add rsp, 0x128
ret