Function at 0x140003820
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov rsi, rcx
mov r15d, r8d
mov rcx, qword [rcx + 8]
mov r14, rdx
call qword [sym.imp.KERNEL32.dll_ResetEvent]
xor r12d, r12d
mov eax, r12d
xchg dword [rsi + 0x20], eax
call qword [sym.imp.WINMM.dll_timeGetTime]
mov dword [rsi + 0x1c], eax
mov ebp, 1
mov word [rsi + 0x38], 0xca
mov r13d, 2
mov rax, qword [rsi + 0x1c]
mov r8d, 6
mov edx, ebp
mov qword [rsi + 0x30], rax
mov ecx, r13d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi + 0xb0], rax
cmp rax, 0xffffffffffffffff
je 0x140003ae4
mov rcx, r14
mov qword [rsp + 0xc8], rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x38], r12
mov r8, r14
mov qword [rsp + 0x30], r12
mov r9d, eax
mov dword [rsp + 0x28], r12d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, eax
lea rcx, [rbx + 1]
call fcn.14001df34
mov rcx, r14
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x38], r12
mov r8, r14
mov qword [rsp + 0x30], r12
mov r9d, eax
mov dword [rsp + 0x28], ebx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, rdi
mov byte [rbx + rdi], r12b
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov edx, ebp
mov rcx, rdi
mov rbx, rax
call fcn.14001dec4
mov rdi, qword [rsp + 0xc8]
test rbx, rbx
je 0x140003ae4
movzx ecx, r15w
mov word [rsp + 0x70], r13w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x72], ax
mov r8d, reloc.WS2_32.dll_recv
mov rax, qword [rbx + 0x18]
lea rdx, [rsp + 0x70]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov rcx, qword [rsi + 0xb0]
mov dword [rsp + 0x74], eax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140003ae4
mov rcx, qword [rsi + 0xb0]
lea r9, [rsp + 0xc0]
mov edx, 0xffff
mov dword [rsp + 0xc0], 0x40000
mov r8d, 0x1001
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rsi + 0xb0]
lea r9, [rsp + 0xc0]
mov edx, 0xffff
mov dword [rsp + 0xc0], 0x40000
mov r8d, 0x1002
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rsi + 0xb0]
lea r9, [rsp + 0xd8]
mov edx, 0xffff
mov dword [rsp + 0xd8], 0x7530
mov r8d, 0x1006
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rsi + 0xb0]
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov dword [rsp + 0x50], ebp
mov r8d, 8
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x140003a86
mov rcx, qword [rsi + 0xb0]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], r12
lea r8, [rsp + 0x60]
mov qword [rsp + 0x38], r12
mov r9d, reloc.WS2_32.dll_inet_ntoa
mov qword [rsp + 0x30], rax
mov edx, 0x98000004
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
mov dword [rsp + 0x60], ebp
mov dword [rsp + 0x64], 0x2bf20
mov dword [rsp + 0x68], 0x1388
call qword [sym.imp.WS2_32.dll_WSAIoctl]
xchg dword [rsi + 0x20], ebp
lea rax, [rsp + 0x54]
mov dword [rsp + 0x54], r12d
mov qword [rsp + 0x28], rax
lea r8, [0x140003b00]
mov r9, rsi
mov dword [rsp + 0x20], r12d
xor edx, edx
xor ecx, ecx
call fcn.140028b20
mov qword [rsi + 0xa0], rax
lea r8, [0x140003da0]
lea rax, [rsp + 0x5c]
mov r9, rsi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], r12d
call fcn.140028b20
mov qword [rsi + 0xa8], rax
mov al, 1
jmp 0x140003ae6
xor al, al
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret