Function at 0x1e6b74232c8
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push rbp
push rbx
sub rsp, 0xa8
lea rbp, [rsp + 0xa0]
mov qword [rbp + 0x20], rcx
mov rax, qword [0x1e6b7447058]
test rax, rax
je 0x1e6b742330e
mov rdx, qword [0x1e6b7447058]
lea rax, [rbp - 0x40]
mov rcx, rax
call sub.msvcrt.dll_strcpy
mov dword [0x1e6b7447060], 0xffffffff
lea rax, [rbp - 0x40]
mov qword [rbp + 0x20], rax
mov dword [rbp - 4], 0
mov r8d, 0
mov edx, 1
mov ecx, 2
call sub.WS2_32.dll_socket
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x1e6b742333f
mov eax, 1
jmp 0x1e6b7423b33
mov dword [rbp - 0x54], 1
lea rdx, [rbp - 0x54]
mov rax, qword [rbp - 0x10]
mov dword [rsp + 0x20], 4
mov r9, rdx
mov r8d, 1
mov edx, 6
mov rcx, rax
call sub.WS2_32.dll_setsockopt
mov word [rbp - 0x50], 2
mov ecx, 0x1bb
call sub.WS2_32.dll_htons
mov word [rbp - 0x4e], ax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call sub.WS2_32.dll_inet_addr
mov dword [rbp - 0x4c], eax
lea rdx, [rbp - 0x50]
mov rax, qword [rbp - 0x10]
mov r8d, 0x10
mov rcx, rax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x1e6b74233cf
cmp qword [rbp - 0x10], 0xffffffffffffffff
je 0x1e6b74233c5
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.WS2_32.dll_closesocket
mov qword [rbp - 0x10], 0xffffffffffffffff
mov eax, 1
jmp 0x1e6b7423b33
mov rax, qword [rbp - 0x10]
mov rcx, rax
call fcn.1e6b742237e
mov rax, qword [rbp - 0x10]
mov rcx, rax
call fcn.1e6b7422a4f
xor eax, 1
test al, al
je 0x1e6b7423413
cmp qword [rbp - 0x10], 0xffffffffffffffff
je 0x1e6b7423409
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.WS2_32.dll_closesocket
mov qword [rbp - 0x10], 0xffffffffffffffff
mov eax, 1
jmp 0x1e6b7423b33
mov rax, qword [0x1e6b7447058]
test rax, rax
je 0x1e6b7423439
mov rax, qword [0x1e6b7447058]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [0x1e6b7447058], 0
mov qword [rbp - 0x18], 0
lea rdx, [rbp - 0x60]
mov rax, qword [rbp - 0x10]
mov r9d, 0
mov r8d, 0xc
mov rcx, rax
call fcn.1e6b7423f10
mov dword [rbp - 0x1c], eax
cmp dword [rbp - 0x1c], 0
je 0x1e6b7423ae7
cmp dword [rbp - 0x1c], 0
js 0x1e6b7423aea
cmp dword [rbp - 0x1c], 0xc
jne 0x1e6b7423aea
lea rax, [rbp - 0x60]
mov rcx, rax
call fcn.1e6b7424371
movzx eax, word [rbp - 0x5e]
mov word [rbp - 0x1e], ax
mov eax, dword [rbp - 0x5c]
mov eax, eax
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp - 0x18], rax
mov eax, dword [rbp - 0x5c]
mov ecx, eax
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x10]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
call fcn.1e6b7423f10
mov dword [rbp - 0x1c], eax
cmp dword [rbp - 0x1c], 0
jne 0x1e6b74234ee
cmp qword [rbp - 0x18], 0
je 0x1e6b7423aed
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423aed
cmp dword [rbp - 0x1c], 0
js 0x1e6b74234fe
mov edx, dword [rbp - 0x5c]
mov eax, dword [rbp - 0x1c]
cmp edx, eax
je 0x1e6b7423522
cmp qword [rbp - 0x18], 0
je 0x1e6b7423af0
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423af0
mov ecx, dword [rbp - 0x58]
mov edx, dword [rbp - 0x5c]
mov rax, qword [rbp - 0x18]
mov r8d, ecx
mov rcx, rax
call fcn.1e6b74242f6
movzx eax, byte [rbp - 0x60]
movzx eax, al
cmp eax, 7
ja case.default.0x1e6b7423567
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x1e6b7426100]
mov eax, dword [rdx + rax]
cdqe
lea rdx, [0x1e6b7426100]
add rax, rdx
jmp rax
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7422098
xor eax, 1
test al, al
je 0x1e6b742364d
movzx eax, word [rbp - 0x1e]
mov edx, eax
mov rcx, 0xffffffffffffffff
call fcn.1e6b7421cf0
mov rax, qword [rbp - 0x18]
movzx eax, byte [rax]
cmp al, 5
jne 0x1e6b74235b9
mov rax, qword [rbp - 0x18]
add rax, 1
movzx eax, byte [rax]
movzx edx, al
mov eax, dword [rbp - 0x5c]
sub eax, 2
cmp edx, eax
je 0x1e6b74235ed
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b7423abd
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423abd
mov word [rbp - 0x62], 5
movzx edx, word [rbp - 0x1e]
lea rax, [rbp - 0x62]
mov r9d, edx
mov r8d, 0
mov edx, 2
mov rcx, rax
call fcn.1e6b7422488
test eax, eax
jg 0x1e6b7423a8c
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b7423ac3
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423ac3
movzx eax, word [rbp - 0x1e]
mov ecx, eax
call fcn.1e6b7421ffe
xor eax, 1
test al, al
je 0x1e6b7423770
mov rax, qword [rbp - 0x18]
add rax, 1
movzx eax, byte [rax]
cmp al, 1
je 0x1e6b74236a6
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b7423ac9
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423ac9
mov ecx, 0x10
call sub.msvcrt.dll_malloc
mov qword [rbp - 0x28], rax
mov edx, dword [rbp - 0x5c]
mov rax, qword [rbp - 0x28]
mov dword [rax + 8], edx
mov rax, qword [rbp - 0x28]
movzx edx, word [rbp - 0x1e]
mov word [rax + 0xc], dx
mov eax, dword [rbp - 0x5c]
mov eax, eax
mov rcx, rax
call sub.msvcrt.dll_malloc
mov rdx, rax
mov rax, qword [rbp - 0x28]
mov qword [rax], rdx
mov eax, dword [rbp - 0x5c]
mov ecx, eax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x18]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp - 0x28]
mov r8, rax
mov edx, 0
lea rax, [0x1e6b7422ef2]
mov rcx, rax
call sub.msvcrt.dll__beginthread
cmp rax, 0xffffffffffffffff
jne 0x1e6b7423a8c
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b742374c
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
cmp qword [rbp - 0x28], 0
je 0x1e6b7423acf
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x28], 0
jmp 0x1e6b7423acf
mov eax, dword [rbp - 0x5c]
mov ebx, eax
movzx eax, word [rbp - 0x1e]
mov ecx, eax
call fcn.1e6b7422154
mov rcx, rax
mov rax, qword [rbp - 0x18]
mov r9d, 0
mov r8d, ebx
mov rdx, rax
call fcn.1e6b74240aa
test eax, eax
jg 0x1e6b7423a8c
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
jmp 0x1e6b7423a8c
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7422098
xor eax, 1
test al, al
je 0x1e6b74238db
movzx eax, word [rbp - 0x1e]
mov edx, eax
mov rcx, 0xffffffffffffffff
call fcn.1e6b7421cf0
call fcn.1e6b742221a
xor eax, 1
test al, al
je 0x1e6b7423822
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b7423ad5
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423ad5
movzx eax, word [rbp - 0x1e]
mov ecx, eax
call fcn.1e6b74221ab
xor eax, 1
test al, al
je 0x1e6b742386d
call fcn.1e6b7422286
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b7423adb
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423adb
movzx eax, word [rbp - 0x1e]
mov r8, rax
mov edx, 0
lea rax, [0x1e6b742321b]
mov rcx, rax
call sub.msvcrt.dll__beginthread
cmp rax, 0xffffffffffffffff
jne 0x1e6b74238c2
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
cmp qword [rbp - 0x18], 0
je 0x1e6b7423ae1
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423ae1
mov eax, dword [rbp - 0x5c]
test eax, eax
je 0x1e6b74238db
mov rax, qword [rbp - 0x18]
movzx eax, byte [rax]
cmp al, 0xa
jne 0x1e6b74238db
mov rax, qword [rbp - 0x18]
mov byte [rax], 0xa
mov ebx, dword [rbp - 0x5c]
call fcn.1e6b742220d
mov rcx, rax
mov rax, qword [rbp - 0x18]
mov r8d, ebx
mov rdx, rax
call fcn.1e6b7421640
test eax, eax
jne 0x1e6b7423a8f
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7421dd8
jmp 0x1e6b7423a8f
mov eax, dword [rbp - 0x5c]
cmp eax, 4
jne 0x1e6b7423a92
mov rax, qword [rbp - 0x18]
mov eax, dword [rax]
cmp eax, 0x6661696c
jne 0x1e6b7423a92
movzx eax, word [rbp - 0x1e]
mov edx, 1
mov ecx, eax
call fcn.1e6b7422098
xor eax, 1
test al, al
jne 0x1e6b7423a92
movzx eax, word [rbp - 0x1e]
mov edx, 0
mov ecx, eax
call fcn.1e6b7421dd8
jmp 0x1e6b7423a92
cmp qword [rbp - 0x10], 0xffffffffffffffff
je 0x1e6b742397a
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.WS2_32.dll_closesocket
mov qword [rbp - 0x10], 0xffffffffffffffff
call fcn.1e6b74217f4
mov ecx, 0
call sub.msvcrt.dll_exit
mov eax, dword [rbp - 0x5c]
cmp eax, 5
jne 0x1e6b7423a95
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 1]
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
je 0x1e6b7423a95
cmp qword [rbp - 0x18], 0
je 0x1e6b7423af3
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423af3
mov eax, dword [rbp - 0x5c]
shr eax, 2
mov edx, eax
mov rax, qword [rbp - 0x18]
mov r8d, 3
mov rcx, rax
call fcn.1e6b74218f6
jmp 0x1e6b7423a99
mov eax, dword [rbp - 0x5c]
cmp eax, 4
jbe 0x1e6b7423a98
mov rax, qword [0x1e6b7447058]
test rax, rax
je 0x1e6b7423a1e
mov rax, qword [0x1e6b7447058]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [0x1e6b7447058], 0
mov ecx, 0x10
call sub.msvcrt.dll_malloc
mov qword [0x1e6b7447058], rax
mov rax, qword [rbp - 0x18]
add rax, 4
movzx eax, byte [rax]
movzx ecx, al
mov rax, qword [rbp - 0x18]
add rax, 3
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp - 0x18]
add rax, 2
movzx eax, byte [rax]
movzx r9d, al
mov rax, qword [rbp - 0x18]
add rax, 1
movzx eax, byte [rax]
movzx r8d, al
mov rax, qword [0x1e6b7447058]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], edx
lea rdx, str._d._d._d._d
mov rcx, rax
call sub.msvcrt.dll_sprintf
jmp 0x1e6b7423af4
nop
jmp 0x1e6b7423a99
nop
jmp 0x1e6b7423a99
nop
jmp 0x1e6b7423a99
nop
jmp 0x1e6b7423a99
nop
jmp 0x1e6b7423a99
nop
cmp qword [rbp - 0x18], 0
je 0x1e6b7423441
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [rbp - 0x18], 0
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423441
nop
jmp 0x1e6b7423af4
nop
jmp 0x1e6b7423af4
nop
jmp 0x1e6b7423af4
nop
jmp 0x1e6b7423af4
nop
cmp qword [rbp - 0x10], 0xffffffffffffffff
je 0x1e6b7423b0f
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.WS2_32.dll_closesocket
mov qword [rbp - 0x10], 0xffffffffffffffff
mov ecx, 0x7d0
call sub.KERNEL32.dll_Sleep
call fcn.1e6b74223d8
cmp dword [rbp - 4], 0
je 0x1e6b7423b2e
mov eax, dword [rbp - 4]
mov ecx, eax
call sub.KERNEL32.dll_Sleep
mov eax, 0
add rsp, 0xa8
pop rbx
pop rbp
ret