Function at 0x180001220
Capabilities:
Connect socket
Convert ip address from string
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rbx
push rdi
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0x88
mov rax, qword [0x18001c008]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14, rcx
mov qword [rsp + 0x80], r15
nop dword [rax + rax]
xor eax, eax
lea rdi, [rbp - 9]
mov dword [rbp - 1], eax
mov ebx, 3
mov word [rbp + 3], ax
mov byte [rbp + 5], al
mov word [rbp - 9], ax
mov byte [rbp - 7], al
nop dword [rax]
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x180001296
cmp eax, 0xffffffff
je 0x180001292
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001270
movzx eax, byte [rbp - 9]
cmp al, 5
je 0x180001341
cmp al, 0x12
je 0x18000132d
cmp al, 0x31
jne 0x180001303
cmp byte [rbp - 8], 0x41
jne 0x180001303
cmp byte [rbp - 7], 0x59
jne 0x180001303
lea rdi, [rbp - 1]
mov ebx, 7
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1800012ea
cmp eax, 0xffffffff
je 0x1800012e6
sub ebx, eax
movsxd rcx, eax
add rdi, rcx
test ebx, ebx
jg 0x1800012c3
lea rdx, [0x180019de0]
lea rcx, [rbp - 1]
call fcn.1800025c0
test rax, rax
jne 0x180001250
mov r15d, 1
mov eax, r15d
mov r15, qword [rsp + 0x80]
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1800017c0
add rsp, 0x88
pop r14
pop rdi
pop rbx
pop rbp
ret
cmp byte [rbp - 8], 0x34
jne 0x180001303
cmp byte [rbp - 7], 0x56
jne 0x180001303
mov r15d, 0xffffffff
jmp 0x180001309
cmp byte [rbp - 8], 1
jne 0x180001303
cmp byte [rbp - 7], 0
jne 0x180001303
mov qword [rsp + 0xc8], r13
lea rdx, [rbp - 9]
mov r13d, 2
mov word [rbp - 9], 5
mov r8d, r13d
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
lea rdi, [rbp - 9]
mov ebx, 4
nop dword [rax]
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1800013a6
cmp eax, 0xffffffff
je 0x1800013a2
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001380
cmp byte [rbp - 9], 5
jne 0x1800015ce
cmp byte [rbp - 8], 1
jne 0x1800015ce
cmp byte [rbp - 7], 0
jne 0x1800015ce
movsx eax, byte [rbp - 6]
cmp eax, 1
jne 0x18000156e
mov qword [rsp + 0xb8], rsi
lea ecx, [rax + 3]
mov qword [rsp + 0xc0], r12
call fcn.180004d48
mov r12, rax
mov rdi, rax
mov ebx, 4
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x18000141a
cmp eax, 0xffffffff
je 0x180001416
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x1800013f4
lea rdi, [rbp - 9]
mov ebx, r13d
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x180001447
cmp eax, 0xffffffff
je 0x180001443
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001421
movzx esi, word [rbp - 9]
movzx ecx, si
call qword [sym.imp.WS2_32.dll_ntohs]
mov r15d, 1
mov r8d, 6
mov edx, r15d
mov ecx, r13d
movzx edi, ax
call qword [sym.imp.WS2_32.dll_socket]
movsx ecx, byte [r12 + 3]
mov rbx, rax
movsx edx, byte [r12 + 2]
xor eax, eax
movsx r8d, byte [r12 + 1]
movsx r9d, byte [r12]
mov dword [rsp + 0x30], ecx
lea rcx, [rbp + 0xf]
mov dword [rsp + 0x28], edx
lea edx, [rax + 0x10]
mov dword [rsp + 0x20], r8d
lea r8, str._hhu._hhu._hhu._hhu
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
call fcn.180001010
xor eax, eax
lea r8, [rbp + 3]
mov qword [rbp - 1], rax
lea rdx, [rbp + 0xf]
mov ecx, r13d
mov word [rbp - 1], r13w
mov qword [rbp + 7], rax
call qword [sym.imp.WS2_32.dll_inet_pton]
movzx ecx, di
call qword [sym.imp.WS2_32.dll_htons]
lea r8d, [r15 + 0xf]
mov rcx, rbx
lea rdx, [rbp - 1]
mov word [rbp + 1], ax
call qword [sym.imp.WS2_32.dll_connect]
xor r9d, r9d
mov word [rbp - 9], si
lea r8d, [r15 + 3]
mov dword [rbp - 1], 0x1000005
lea rdx, [rbp - 1]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea r8d, [r15 + 3]
mov rdx, r12
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp - 9]
mov r8d, r13d
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
mov rcx, r12
call fcn.180004e28
mov rdx, r14
call fcn.180001070
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_closesocket]
mov r12, qword [rsp + 0xc0]
xor eax, eax
mov rsi, qword [rsp + 0xb8]
mov r13, qword [rsp + 0xc8]
jmp 0x18000130c
cmp eax, 4
jne 0x1800015ce
lea rdi, [rbp + 0xf]
mov ebx, reloc.WS2_32.dll_select
nop dword [rax]
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1800015a6
cmp eax, 0xffffffff
je 0x1800015a2
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001580
xor r9d, r9d
mov dword [rbp - 1], 0x1000805
lea rdx, [rbp - 1]
mov dword [rbp + 3], 0x11111111
mov rcx, r14
mov word [rbp + 7], 0x2222
lea r8d, [r9 + 0xa]
call qword [sym.imp.WS2_32.dll_send]
mov r13, qword [rsp + 0xc8]
xor eax, eax
jmp 0x18000130c