Function at 0x140118450
Capabilities:
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb0
mov rdi, rcx
mov rax, qword [0x14030f948]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov ecx, 2
mov edx, 1
mov r8d, 6
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
je 0x14011851e
mov r12, rax
mov qword [rsp + 0xa0], 0
mov word [rsp + 0x98], 2
mov ecx, 0x7f000001
call qword [sym.imp.WS2_32.dll_htonl]
mov r15d, eax
mov dword [rsp + 0x9c], eax
mov cx, 0xfae
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x9a], ax
test rdi, rdi
je 0x1401187f2
mov r14d, eax
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], 0
mov rcx, rdi
call fcn.1401a6660
cmp rax, 0xfffffffffffffff0
jae 0x1401188b2
mov rsi, rax
cmp rax, 0x17
jae 0x14011852a
lea rbx, [rsp + 0x30]
mov byte [rbx + 0x17], sil
test rsi, rsi
jne 0x140118554
jmp 0x140118562
lea rdx, str.Failed_to_create_socket._n
jmp 0x14011886f
mov rbp, rsi
add rbp, 0x10
and rbp, 0xfffffffffffffff0
mov rcx, rbp
call fcn.14018360c
mov rbx, rax
mov qword [rsp + 0x30], rax
bts rbp, 0x3f
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rsi
mov rcx, rbx
mov rdx, rdi
mov r8, rsi
call fcn.140186330
mov byte [rbx + rsi], 0
mov word [rsp + 0x98], 2
xor eax, eax
mov qword [rsp + 0x90], rax
xorps xmm0, xmm0
movaps xmmword [rsp + 0x80], xmm0
mov qword [rsp + 0x70], rax
movaps xmmword [rsp + 0x60], xmm0
lea rcx, [rsp + 0x30]
mov dl, 0x3a
xor r8d, r8d
call fcn.14006585a
cmp rax, 0xffffffffffffffff
je 0x1401185f6
lea rdi, [rax + 1]
movzx ecx, byte [rsp + 0x47]
test cl, cl
jns 0x1401185b6
mov rcx, qword [rsp + 0x38]
cmp rdi, rcx
jae 0x1401185f6
lea rsi, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
lea rcx, [rsp + 0x48]
lea rdx, [rsp + 0x30]
xor r8d, r8d
mov r9, rax
call fcn.140064e56
cmp byte [rsp + 0x97], 0
js 0x140118621
xor eax, eax
mov byte [rsp + 0x80], al
mov byte [rsp + 0x97], al
jmp 0x14011865b
lea rdi, [rsp + 0x80]
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140064f16
lea rdx, [0x1401bb2c3]
lea rcx, [rsp + 0x60]
call fcn.1400655ba
jmp 0x1401186ea
mov rax, qword [rsp + 0x80]
xor ecx, ecx
mov byte [rax], cl
mov qword [rsp + 0x88], 0
cmp byte [rsp + 0x97], cl
jns 0x14011865b
mov rcx, qword [rsp + 0x80]
call fcn.140183668
mov qword [rsp + 0x90], 0
lea rcx, [rsp + 0x48]
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0x90], rax
movups xmm0, xmmword [rcx]
movaps xmmword [rsp + 0x80], xmm0
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x30]
mov r8, rdi
mov r9, 0xffffffffffffffff
call fcn.140064e56
cmp byte [rsp + 0x77], 0
js 0x1401186a3
xor eax, eax
mov byte [rsp + 0x60], al
mov byte [rsp + 0x77], al
jmp 0x1401186ce
mov rax, qword [rsp + 0x60]
xor ecx, ecx
mov byte [rax], cl
mov qword [rsp + 0x68], 0
cmp byte [rsp + 0x77], cl
jns 0x1401186ce
mov rcx, qword [rsp + 0x60]
call fcn.140183668
mov qword [rsp + 0x70], 0
lea rdi, [rsp + 0x80]
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x70], rax
movups xmm0, xmmword [rsp + 0x48]
movaps xmmword [rsp + 0x60], xmm0
movzx eax, byte [rdi + 0x17]
mov rcx, rax
test al, al
jns 0x1401186fd
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x14011876f
cmp rcx, 7
jne 0x140118738
mov qword [rsp + 0x20], 7
lea r9, str.0.0.0.0
xor r15d, r15d
lea rcx, [rsp + 0x80]
xor edx, edx
mov r8, 0xffffffffffffffff
call fcn.140065910
test eax, eax
je 0x14011876f
mov al, byte [rdi + 0x17]
test al, al
jns 0x140118746
mov rcx, qword [rsp + 0x80]
jmp 0x14011874e
lea rcx, [rsp + 0x80]
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x1401187bd
cmp word [rax + 0x10], 2
jne 0x1401187bd
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
test rax, rax
je 0x1401187bd
mov r15d, dword [rax]
movzx eax, byte [rsp + 0x77]
mov rcx, rax
test al, al
jns 0x140118780
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1401187ac
test al, al
jns 0x140118790
mov rcx, qword [rsp + 0x60]
jmp 0x140118795
lea rcx, [rsp + 0x60]
call fcn.14019ddc8
cmp eax, 0xffff
ja 0x1401187bd
mov ecx, eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov r14d, eax
mov dword [rsp + 0x9c], r15d
mov word [rsp + 0x9a], r14w
cmp byte [rsp + 0x77], 0
jns 0x1401187ce
mov rcx, qword [rsp + 0x60]
call fcn.140183668
cmp byte [rdi + 0x17], 0
jns 0x1401187e1
mov rcx, qword [rsp + 0x80]
call fcn.140183668
cmp byte [rsp + 0x47], 0
jns 0x1401187f2
mov rcx, qword [rsp + 0x30]
call fcn.140183668
lea r9, [rsp + 0x80]
mov dword [r9], 1
mov dword [rsp + 0x20], 4
mov rcx, r12
mov edx, 0xffff
mov r8d, 0xfffffffb
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140118832
lea rdx, str.Failed_to_set_SO_EXCLUSIVEADDRUSE_option._n
mov ecx, 0xfffffffe
call fcn.1400b8218
lea rdx, [rsp + 0x98]
mov rcx, r12
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140118856
lea rdx, str.Failed_to_bind_server._n
jmp 0x14011886f
mov rcx, r12
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1401188a0
lea rdx, str.Failed_to_listen._n
mov ecx, 0xfffffffd
call fcn.1400b8218
xor edi, edi
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.140183a80
mov rax, rdi
add rsp, 0xb0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov ecx, 8
call fcn.14018360c
mov rdi, rax
mov qword [rax], r12
jmp 0x14011887b
lea rcx, [rsp + 0x30]
call fcn.140064d6c
int3