Function at 0x140047a70
Capabilities:
Query environment variable

Disassembly:
mov eax, Ordinal_316
call fcn.1400035e0
sub rsp, rax
mov rax, qword [0x1401ad1c0]
mov qword [rsp + 0x120], rax
cmp dword [0x1401f3e60], 0
mov dword [rsp + 0x38], 1
je 0x140047ab7
mov eax, 1
mov rcx, qword [rsp + 0x120]
call fcn.14006b6a0
add rsp, 0x138
ret
mov qword [rsp + 0x148], rbx
lea rdx, [rsp + 0x30]
lea rcx, str.HLS_IPADDR
mov qword [rsp + 0x150], rsi
xor esi, esi
xor r8d, r8d
mov dword [0x1401c5f14], esi
mov dword [0x1401f3e5c], esi
mov dword [0x1401f3e60], 1
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
mov ebx, eax
je 0x140047c43
inc ebx
xor ecx, ecx
movsxd rdx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov qword [rsp + 0x30], rax
je 0x140047c43
lea rcx, str.HLS_IPADDR
mov r8d, ebx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x140047c43
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140047c43
mov rdx, rcx
movzx eax, byte [rdx]
inc rdx
test al, al
jne 0x140047b45
sub edx, ecx
dec edx
cmp edx, 0x63
jbe 0x140047b5c
mov byte [rcx + 0x63], sil
lea rdx, [rsp + 0xb0]
sub rdx, rcx
nop
nop
nop
movzx eax, byte [rcx]
inc rcx
test al, al
mov byte [rdx + rcx - 1], al
jne 0x140047b70
lea rcx, [rsp + 0xb0]
movzx eax, byte [rcx]
inc rcx
test al, al
jne 0x140047b86
lea rax, [rsp + 0xb0]
sub ecx, eax
dec ecx
je 0x140047c43
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0x158], rdi
mov byte [rsp + 0x40], sil
mov edi, esi
call fcn.140047430
test eax, eax
je 0x140047c31
lea rbx, [rsp + 0xb0]
nop
nop
movzx edx, byte [rbx]
test dl, dl
mov al, dl
je 0x140047c0c
cmp al, 0x20
je 0x140047c1b
cmp al, 0x2c
je 0x140047c0c
lea rcx, [rsp + 0x40]
movzx eax, byte [rcx]
inc rcx
test al, al
jne 0x140047be6
lea rax, [rsp + 0x40]
sub ecx, eax
dec ecx
cmp ecx, 0x63
jae 0x140047c1b
lea eax, [rcx + 1]
mov byte [rsp + rcx + 0x40], dl
mov byte [rsp + rax + 0x40], sil
jmp 0x140047c1b
lea rcx, [rsp + 0x40]
call fcn.1400478a0
mov byte [rsp + 0x40], sil
lea rcx, [rsp + 0xb0]
inc edi
inc rbx
call fcn.140047430
cmp edi, eax
jb 0x140047bd0
lea rcx, [rsp + 0x40]
call fcn.1400478a0
mov rdi, qword [rsp + 0x158]
mov edx, 2
xor r8d, r8d
mov qword [0x1401f2f18], rsi
mov ecx, edx
call qword [0x1401f34d8]
cmp rax, 0xffffffffffffffff
mov qword [0x1401f2f18], rax
jne 0x140047c6e
xor eax, eax
jmp 0x140047de2
lea rdx, [0x1401f33d8]
mov r8d, reloc.WSOCK32.dll_recv
mov rcx, rax
mov word [0x1401f33d8], 2
mov dword [0x1401f33dc], esi
mov word [0x1401f33da], si
call qword [0x1401f34f8]
cmp eax, 0xffffffff
je 0x140047c67
mov rcx, qword [0x1401f2f18]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call qword [0x1401f34f0]
cmp dword [0x1401f3e5c], esi
lea rbx, [0x1401f3670]
jne 0x140047d99
lea rcx, str.HLSERVER
call qword [0x1401f2f08]
test rax, rax
je 0x140047d63
mov rax, qword [rax + 0x18]
mov dword [0x1401f3e5c], 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 [0x1401f34a0]
mov rdx, rbx
nop
nop
nop
nop
movzx ecx, byte [rax]
inc rdx
inc rax
test cl, cl
mov byte [rdx - 1], cl
jne 0x140047d20
lea rdx, [0x1401c5f4c]
lea rcx, str.hlserver
mov word [0x1401f35b2], 0xbe7
call qword [0x1401f3548]
test rax, rax
je 0x140047d63
movzx ecx, word [rax + 0x18]
call qword [0x1401f34a8]
mov word [0x1401f35b2], ax
cmp dword [0x1401f3e5c], esi
jne 0x140047d99
mov dword [0x1401f3e5c], 1
mov rdx, rsi
lea r8, str.255.255.255.255
nop
movzx eax, byte [rdx + r8]
inc rdx
test al, al
mov byte [rdx + rbx - 1], al
jne 0x140047d80
mov word [0x1401f35b2], 0xbe7
movzx ecx, word [0x1401f35b2]
mov qword [0x1401f3630], rsi
mov qword [0x1401f3638], rsi
mov word [0x1401f3630], 2
call qword [0x1401f34e8]
mov rcx, rbx
mov word [0x1401f3632], ax
call qword [0x1401f2f10]
mov dword [0x1401c5f14], 1
mov dword [0x1401f3634], eax
mov eax, 1
mov rbx, qword [rsp + 0x148]
mov rsi, qword [rsp + 0x150]
mov rcx, qword [rsp + 0x120]
call fcn.14006b6a0
add rsp, 0x138
ret