Function at 0x18002855c
Capabilities:
Connect socket
Receive data
Receive data on socket
Resolve dns
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf8
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov rax, qword [0x18009c600]
xor rax, rsp
mov qword [rsp + 0xe0], rax
mov r13d, r9d
movzx esi, r8w
mov rdi, rdx
mov r12, rcx
mov r15, qword [rsp + 0x160]
mov r14, qword [rsp + 0x168]
mov qword [rsp + 0x68], r14
and dword [rsp + 0x40], 0
xor r8d, r8d
lea ebp, [r8 + 1]
mov edx, ebp
lea ecx, [rbp + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [r12], rax
cmp rax, 0xffffffffffffffff
je 0x180028bbe
xor ebx, ebx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x18002861d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x18002860c
lea edi, [rbp + 1]
cmp word [rax + 0x10], di
je 0x180028603
cmp word [rax + 0x10], 0x17
jne 0x180028611
mov rax, qword [rax + 0x18]
mov rbx, qword [rax]
jmp 0x180028611
mov edi, 2
mov eax, dword [rbx + 4]
mov dword [rsp + 0x9c], eax
jmp 0x180028632
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x9c], eax
mov edi, 2
movzx ecx, si
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x9a], ax
mov word [rsp + 0x98], di
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
xor r9d, r9d
lea r8d, [r9 + 0x10]
lea rdx, [rsp + 0x98]
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_WSAConnect]
test eax, eax
jne 0x180028be8
mov dword [rsp + 0x58], 0x1388
lea ebx, [rax + 4]
mov dword [rsp + 0x20], ebx
lea r9, [rsp + 0x58]
mov edi, 0xffff
mov r8d, 0x1006
mov edx, edi
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x20], ebx
lea r9, [rsp + 0x58]
mov r8d, 0x1005
mov edx, edi
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, 0x21
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0xb8]
call fcn.180054ba0
mov dword [rsp + 0xa8], ebp
mov esi, 0x3e8
mov dword [rsp + 0xac], esi
mov dword [rsp + 0xb4], r13d
test r15, r15
je 0x18002872a
xor eax, eax
or r13, 0xffffffffffffffff
mov rcx, r13
mov rdi, r15
repne scasb al, byte [rdi]
not rcx
sub rcx, rbp
cmp rcx, 0x20
jne 0x18002872e
mov r8, r15
mov rdx, rbx
lea rcx, [rsp + 0xb8]
call fcn.180054018
jmp 0x180028740
or r13, 0xffffffffffffffff
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0xb8]
call fcn.180054ba0
mov r8d, reloc.WS2_32.dll_gethostbyname
lea rdx, [rsp + 0xa8]
mov rcx, r12
call fcn.1800290e8
test eax, eax
jle 0x180028be2
xor r9d, r9d
lea r8d, [r9 + 0x14]
lea rdx, [rsp + 0x78]
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x180028bdc
cmp dword [rsp + 0x78], ebp
jne 0x180028bd0
cmp dword [rsp + 0x7c], esi
jne 0x180028bca
cmp dword [rsp + 0x84], ebp
jne 0x180028bd6
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
test r14, r14
jne 0x1800287c0
xor ecx, ecx
jmp 0x1800287d1
xor eax, eax
mov rcx, r13
mov rdi, r14
repne scasw ax, word [rdi]
not rcx
sub rcx, rbp
mov r8d, ecx
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.1800029d0
xor eax, eax
mov rcx, r13
lea rdx, [0x18007fc00]
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
sub rcx, rbp
mov r8d, ecx
lea rcx, [rsp + 0x50]
call fcn.1800017d8
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.18002a968
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
mov eax, 2
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rbx
call fcn.18002a228
mov rdi, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x180028b96
cmp rax, r13
je 0x180028b96
mov ecx, 0x7d014
call fcn.180052a04
mov rsi, rax
test rax, rax
je 0x180028a34
xor eax, eax
mov dword [rsi], eax
mov dword [rsi + 4], eax
mov dword [rsi + 8], eax
mov dword [rsi + 0xc], eax
mov dword [rsi + 0x10], eax
xor edx, edx
mov r8d, 0x7d000
lea rcx, [rsi + 0x14]
call fcn.180054ba0
mov rdx, qword [r12 + 0x10]
test rdx, rdx
je 0x1800288c7
cmp dword [r12 + 0x18], 0
jbe 0x1800288c7
mov r8d, dword [r12 + 0x18]
mov rcx, rsi
call fcn.18005a1e0
mov r13d, dword [r12 + 0x18]
mov rcx, qword [r12 + 0x10]
call fcn.1800520c4
and qword [r12 + 0x10], 0
and dword [r12 + 0x18], 0
jmp 0x1800288e8
xor r9d, r9d
mov r8d, 0x7d014
mov rdx, rsi
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_recv]
mov r13d, eax
test eax, eax
jle 0x1800289fd
cmp dword [rsi], ebp
jne 0x1800289fd
cmp dword [rsi + 4], 0x3e9
jne 0x1800289fd
mov r14d, dword [rsi + 0x10]
cmp r14d, 0x7d000
ja 0x1800289fd
add r14d, 0x14
cmp r14d, r13d
jb 0x180028953
mov edi, r14d
sub edi, r13d
je 0x18002898e
mov r8d, r14d
sub r8d, r13d
mov edx, r13d
add rdx, rsi
xor r9d, r9d
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x1800289f8
sub edi, eax
add r13d, eax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
jne 0x18002891f
jmp 0x18002898e
sub r13d, r14d
mov rcx, qword [r12 + 0x10]
test rcx, rcx
je 0x18002896b
call fcn.1800520c4
and qword [r12 + 0x10], 0
mov ecx, r13d
call fcn.18004a00c
mov qword [r12 + 0x10], rax
mov edx, r14d
add rdx, rsi
mov r8d, r13d
mov rcx, rax
call fcn.18005a1e0
mov dword [r12 + 0x18], r13d
cmp dword [rsi + 0x10], 0x7d000
ja 0x1800289e0
cmp dword [rsi + 0x10], 0
jbe 0x1800289d9
mov eax, dword [rsi + 0xc]
mov qword [rsp + 0x60], rax
xor r9d, r9d
lea r8, [rsp + 0x64]
mov edx, eax
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call fcn.18002a35c
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov r8d, dword [rsi + 0x10]
lea rdx, [rsi + 0x14]
mov rcx, rdi
call fcn.18002a450
jmp 0x1800289e5
mov rdi, qword [rsp + 0x48]
jmp 0x1800289e5
mov rdi, qword [rsp + 0x48]
cmp dword [rsi + 0x10], 0
je 0x1800289fd
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x18002886a
mov rdi, qword [rsp + 0x48]
xor eax, eax
mov dword [rsi], eax
mov dword [rsi + 4], eax
mov dword [rsi + 8], eax
mov dword [rsi + 0xc], eax
mov dword [rsi + 0x10], eax
xor edx, edx
mov r8d, 0x7d000
lea rcx, [rsi + 0x14]
call fcn.180054ba0
mov rcx, rsi
call fcn.1800520c4
mov rbx, qword [rsp + 0x50]
mov r14, qword [rsp + 0x68]
or r13, 0xffffffffffffffff
mov rcx, rdi
call fcn.18002a780
test r15, r15
je 0x180028b63
xor eax, eax
mov rcx, r13
mov rdi, r15
repne scasb al, byte [rdi]
not rcx
sub rcx, rbp
cmp rcx, 0x20
jne 0x180028b63
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x48], rdi
sub ebp, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
mov esi, gethostbyname
sub eax, esi
or eax, ebp
jge 0x180028a9b
mov edx, esi
lea rcx, [rsp + 0x48]
call fcn.180002918
mov rdi, qword [rsp + 0x48]
mov r8d, esi
mov rdx, rdi
mov rcx, rbx
call fcn.18002ad3c
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
call fcn.1800536cc
test eax, eax
js 0x180028b58
cmp eax, dword [rdi - 0xc]
jg 0x180028b58
mov dword [rdi - 0x10], eax
cdqe
mov byte [rax + rdi], 0
mov rdx, r15
mov rcx, rdi
call fcn.180052958
test eax, eax
jne 0x180028b08
lea rdx, [rdi - 0x18]
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x180028b01
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x50]
jmp 0x180028b63
mov rbx, qword [rsp + 0x50]
jmp 0x180028b63
mov rcx, rbx
call fcn.18002a968
nop
lea rdx, [rdi - 0x18]
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x180028b2e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x180028bb8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov ecx, 0x80070057
call fcn.180001af4
nop
mov rcx, r14
call fcn.18002a968
mov rdx, r14
mov rcx, rbx
call fcn.18002ab90
mov edi, eax
lea rdx, [rbx - 0x18]
mov ecx, r13d
lock xadd dword [rdx + 0x10], ecx
add ecx, r13d
test ecx, ecx
jg 0x180028bec
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x180028bec
lea rdx, [rbx - 0x18]
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x180028bc4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
jmp 0x180028bec
mov edi, dword [rsp + 0x40]
mov eax, edi
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.1800520e0
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret