Function at 0x18002b740
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x1f]
sub rsp, 0x90
mov qword [rbp - 0x11], 0xfffffffffffffffe
mov rax, qword [0x18005d0e0]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov r12d, r9d
mov r13d, r8d
mov rsi, rdx
mov r14, rcx
mov qword [rbp - 9], rdx
mov dword [rbp - 0x2d], r8d
mov rax, qword [rdx]
cmp dword [rax - 0x10], 0
jne 0x18002b79a
lea rdx, [rbp - 0x2d]
mov rcx, rsi
call fcn.180015bc0
mov r13d, dword [rbp - 0x2d]
mov rdx, qword [rsi]
lea rcx, [rbp - 0x29]
call fcn.180022200
nop
mov rax, qword [rbp - 0x29]
cmp dword [rax - 0x10], 0
jne 0x18002b7f1
lea rdx, [rax - 0x18]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18002b7cf
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], ebx
dec ebx
test ebx, ebx
jg 0x18002b7ea
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x18002b9c6
mov ecx, dword [rbp + 0x7f]
cmp ecx, 2
jne 0x18002b829
or edx, 0xffffffff
mov rcx, qword [0x18005ff50]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [0x18005ff58]
mov rcx, qword [0x18005ff50]
call qword [sym.imp.KERNEL32.dll_SetEvent]
test ebx, ebx
jne 0x18002b831
mov rax, qword [rbp - 0x29]
jmp 0x18002b8f5
test ecx, ecx
je 0x18002b8f5
mov dword [r14], 1
mov edx, 1
mov ebx, 2
lea r8d, [rdx + 5]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18002b986
mov dword [rbp - 0x31], 0x186a0
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x31]
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
imul r12d, r12d, 0x3e8
mov dword [rbp - 0x31], r12d
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x31]
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp + 3], eax
mov word [rbp - 1], bx
movzx ecx, r13w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 1], ax
lea r8d, [rbx + 0xe]
lea rdx, [rbp - 1]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x18002b986
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor edi, edi
jmp 0x18002b986
xor edi, edi
mov dword [r14], edi
lea rcx, [rax - 0x18]
call fcn.180001790
add rax, 0x18
mov qword [rbp - 0x19], rax
mov edx, r13d
lea rcx, [rbp - 0x19]
call fcn.180004620
mov edi, eax
test eax, eax
je 0x18002b986
imul r12d, r12d, 0x3e8
mov dword [rbp - 0x39], edi
lea rcx, [rbp - 0x39]
call fcn.180004290
test rax, rax
je 0x18002b95e
mov dword [rax + 0x5c], r12d
mov dword [rbp - 0x21], r12d
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x21]
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, qword [rax + 0x40]
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rcx, [rbp - 0x39]
call fcn.180004330
mov dword [rbp - 0x41], edi
lea rcx, [rbp - 0x41]
call fcn.180004290
lea rcx, [rbp - 0x41]
test rax, rax
je 0x18002b980
mov dword [rax + 0x58], r12d
call fcn.180004330
nop
mov rdx, qword [rbp - 0x29]
add rdx, 0xffffffffffffffe8
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18002b9a8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], ebx
dec ebx
test ebx, ebx
jg 0x18002b9c3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, rdi
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.18002f950
add rsp, 0x90
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret