Function at 0x1801d43e0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov rax, qword [0x180428208]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov eax, r8d
mov rsi, rcx
neg eax
mov ecx, 2
mov eax, dword [rdx + 8]
mov r14, rdx
sbb ebx, ebx
mov r12d, r8d
add ebx, 2
mov dword [rbp - 0x45], ebx
lea edx, [rcx + 0x15]
lea r13d, [rcx + 0xe]
cmp eax, ecx
je 0x1801d4482
cmp eax, edx
je 0x1801d443b
lea eax, [rcx + 7]
jmp 0x1801d4667
xor r15d, r15d
mov dword [rbp - 0x49], 0x1c
mov dword [rbp - 0x15], r15d
xorps xmm0, xmm0
mov word [rbp - 0x29], dx
movdqu xmmword [rbp - 0x25], xmm0
test r12d, r12d
je 0x1801d4461
movzx ecx, word [r14 + 0x1e]
jmp 0x1801d4466
movzx ecx, word [r14 + 0x1c]
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [r14 + 0xc]
mov word [rbp - 0x27], ax
mov eax, dword [r14 + 0x60]
movups xmmword [rbp - 0x21], xmm0
mov dword [rbp - 0x11], eax
jmp 0x1801d44b3
xor r15d, r15d
mov dword [rbp - 0x49], r13d
mov qword [rbp - 0x21], r15
mov word [rbp - 0x29], cx
test r12d, r12d
je 0x1801d449d
movzx ecx, word [r14 + 0x1e]
jmp 0x1801d44a2
movzx ecx, word [r14 + 0x1c]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x27], ax
mov eax, dword [r14 + 0xc]
mov dword [rbp - 0x25], eax
mov rax, qword [rsi + 0x110]
mov ecx, dword [r14 + 8]
test rax, rax
je 0x1801d44dc
mov r10, qword [rax]
test r10, r10
je 0x1801d44dc
mov r9, qword [rsi + 0x118]
xor r8d, r8d
mov edx, ebx
call r10
jmp 0x1801d44e7
xor r8d, r8d
mov edx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0xf8], rdi
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1801d465a
mov rdi, qword [r14 + 0x90]
mov rax, qword [rdi + 0x110]
test rax, rax
je 0x1801d4519
cmp qword [rax], 0
jne 0x1801d46ba
lea r8, [rbp - 0x41]
mov dword [rbp - 0x41], 1
mov edx, 0x8004667e
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [rdi + 0x30], 0
lea r9, [rdi + 0x30]
jle 0x1801d4561
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1801d4638
cmp dword [rdi + 0x34], 0
lea r9, [rdi + 0x34]
jle 0x1801d4590
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1002
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1801d4638
mov eax, dword [r14 + 8]
cmp eax, 2
jne 0x1801d45c2
cmp dword [rdi + 0x90], 0
je 0x1801d4691
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov word [rbp - 9], ax
mov ecx, dword [rdi + 0x90]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 5], eax
jmp 0x1801d4624
cmp eax, 0x17
jne 0x1801d4691
cmp dword [r14 + 0x60], 0
jne 0x1801d4691
mov rax, qword [rdi + 0x94]
cmp rax, qword [0x180376718]
jne 0x1801d45fa
mov rax, qword [rdi + 0x9c]
cmp rax, qword [0x180376720]
je 0x1801d4691
xor eax, eax
xorps xmm0, xmm0
mov qword [rbp + 7], rax
mov r13d, 0x1c
movups xmmword [rbp - 9], xmm0
mov dword [rbp + 0xf], eax
mov eax, reloc.WS2_32.dll_socket
mov word [rbp - 9], ax
movups xmm0, xmmword [rdi + 0x94]
movups xmmword [rbp - 1], xmm0
mov r8d, r13d
lea rdx, [rbp - 9]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1801d4691
mov rax, qword [rsi + 0x110]
test rax, rax
je 0x1801d4686
mov r8, qword [rax + 8]
test r8, r8
je 0x1801d4686
mov rdx, qword [rsi + 0x118]
mov rcx, rbx
call r8
mov eax, ntohs
mov rdi, qword [rsp + 0xf8]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1800a5910
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x1801d465a
cmp dword [r14 + 8], 0x17
jne 0x1801d46ba
mov edx, 0x29
mov dword [rbp - 0x39], r15d
lea r9, [rbp - 0x39]
mov dword [rsp + 0x20], 4
mov rcx, rbx
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test r12d, r12d
je 0x1801d46ff
mov rax, qword [rsi + 0x110]
mov dword [rbp - 0x31], 1
test rax, rax
je 0x1801d46d8
cmp qword [rax], 0
jne 0x1801d46ff
mov edx, 6
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x31]
mov rcx, rbx
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1801d4790
mov rax, qword [rsi + 0x100]
mov edi, dword [rbp - 0x45]
test rax, rax
je 0x1801d4720
mov r8, qword [rsi + 0x108]
mov edx, edi
mov rcx, rbx
call rax
test eax, eax
js 0x1801d4790
mov rax, qword [rsi + 0x110]
test rax, rax
je 0x1801d474c
mov r10, qword [rax + 0x10]
test r10, r10
je 0x1801d474c
mov r9, qword [rsi + 0x118]
lea rdx, [rbp - 0x29]
mov r8d, dword [rbp - 0x49]
mov rcx, rbx
call r10
jmp 0x1801d475d
mov r8d, dword [rbp - 0x49]
lea rdx, [rbp - 0x29]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1801d4772
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd8cd
cmp eax, 1
ja 0x1801d4790
mov rax, qword [rsi + 0xf0]
test rax, rax
je 0x1801d47a0
mov r8, qword [rsi + 0xf8]
mov edx, edi
mov rcx, rbx
call rax
test eax, eax
jns 0x1801d47a0
mov rdx, rbx
mov rcx, rsi
call fcn.1801d4ab0
jmp 0x1801d465a
mov ecx, 0x28
call qword [0x180428630]
mov rdi, rax
test rax, rax
jne 0x1801d47c6
mov rdx, rbx
mov rcx, rsi
call fcn.1801d4ab0
lea eax, [rdi + 0xf]
jmp 0x1801d465f
mov qword [rax + 0x10], r15
xor ecx, ecx
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
mov qword [rax + 8], rbx
mov qword [rax], r14
call fcn.1801c89a0
mov qword [rdi + 0x20], rax
mov dword [rdi + 0x10], r12d
test rax, rax
jne 0x1801d480b
mov rdx, rbx
mov rcx, rsi
call fcn.1801d4ab0
mov rcx, rdi
call qword [fcn.1800a58b0]
mov eax, reloc.WS2_32.dll_ntohs
jmp 0x1801d465f
mov rcx, qword [r14 + 0x70]
mov rdx, rdi
test r12d, r12d
je 0x1801d481e
call fcn.1801c8a60
jmp 0x1801d4823
call fcn.1801c89e0
mov r15, rax
mov rdx, rbx
test rax, rax
jne 0x1801d4851
mov rcx, rsi
call fcn.1801d4ab0
mov rcx, qword [rdi + 0x20]
call fcn.1801c8cb0
mov rcx, rdi
call qword [fcn.1800a58b0]
lea eax, [r15 + 0xf]
jmp 0x1801d465f
mov rcx, qword [rsi + 0xd8]
mov r8, r15
call fcn.1801c9660
test eax, eax
jne 0x1801d4893
mov rdx, rbx
mov rcx, rsi
call fcn.1801d4ab0
mov rcx, qword [rdi + 0x20]
call fcn.1801c8cb0
mov rcx, r15
call fcn.1801c8b60
mov rcx, rdi
call qword [fcn.1800a58b0]
mov eax, reloc.WS2_32.dll_ntohs
jmp 0x1801d465f
mov rax, qword [rsi + 0xe0]
test rax, rax
je 0x1801d48b2
mov rcx, qword [rsi + 0xe8]
xor r9d, r9d
mov rdx, rbx
lea r8d, [r9 + 1]
call rax
test r12d, r12d
je 0x1801d48bb
mov qword [r14 + 0x78], rdi
xor eax, eax
jmp 0x1801d465f