Function at 0x140002e98
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3e0]
sub rsp, 0x4e0
xor r13d, r13d
mov r15d, r9d
mov rdi, rcx
mov ebx, r13d
test rcx, rcx
je 0x140003052
mov edx, r8d
mov esi, r8d
btr edx, 0x1c
and esi, 0x10000000
mov eax, esi
cmove edx, r8d
neg eax
lea eax, [r13 + 1]
sbb ecx, ecx
and ecx, 0x15
add ecx, 2
test edx, edx
cmove edx, eax
xor r8d, r8d
mov dword [rsp + 0x38], edx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x30], rax
mov r14, rax
cmp eax, 0xffffffff
je 0x140003052
mov rcx, rdi
call fcn.140013320
mov r12, rax
lea eax, [r13 + 0x17]
test esi, esi
je 0x140002f91
cmp dword [0x140257604], r13d
je 0x14000303c
lea r8, [rbp - 0x80]
mov rdx, r12
mov ecx, eax
call fcn.140002a7c
test eax, eax
jg 0x140002f83
lea r9, [rsp + 0x78]
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [0x1402575e0]
test rax, rax
jne 0x14000303c
mov rcx, qword [rsp + 0x78]
lea r14d, [r13 + 1]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rbp - 0x80], xmm0
call qword [0x1402575e8]
jmp 0x140002f89
mov r14d, 1
mov edi, dword [rbp + 0x420]
jmp 0x140002fc2
mov rcx, r12
call qword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp eax, 0xffffffff
jne 0x140002fb8
mov rcx, r12
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140002fb8
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov edi, dword [rcx]
cmp edi, 0xffffffff
mov r14d, r13d
setne r14b
test r14d, r14d
je 0x140003037
mov r13d, dword [rbp + 0x448]
xor eax, eax
mov r14, qword [rbp + 0x440]
test r13d, r13d
jne 0x140002fef
test r14, r14
je 0x140003070
cmp word [r14], ax
je 0x140003070
xor edx, edx
lea rcx, [rbp - 0x60]
lea r8d, [rdx + 0x1c]
call fcn.140001060
xor edx, edx
lea rcx, [rbp - 0x70]
lea r8d, [rdx + 0x10]
call fcn.140001060
movsxd rdx, dword [rsp + 0x30]
lea r9, [rbp - 0x60]
xor ecx, ecx
mov dword [rsp + 0x28], r13d
test esi, esi
mov qword [rsp + 0x20], r14
lea r8, [rbp - 0x70]
setne cl
call fcn.1400134ac
xor r13d, r13d
test eax, eax
jne 0x140003073
mov r14, qword [rsp + 0x30]
mov rcx, r12
call fcn.140013400
test rbx, rbx
jne 0x140003052
movsxd rcx, r14d
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, rbx
mov rbx, qword [rsp + 0x530]
add rsp, 0x4e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor r13d, r13d
xor edx, edx
test esi, esi
je 0x1400030af
lea r8d, [rdx + 0x1c]
lea rcx, [rsp + 0x58]
call fcn.140001060
movzx ecx, word [rbp + 0x428]
mov eax, reloc.WS2_32.dll_socket
mov word [rsp + 0x58], ax
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rbp - 0x80]
mov word [rsp + 0x5a], ax
movdqu xmmword [rsp + 0x60], xmm0
jmp 0x1400030df
mov r8d, reloc.WS2_32.dll_recv
lea rcx, [rsp + 0x40]
call fcn.140001060
movzx ecx, word [rbp + 0x428]
mov eax, 2
mov word [rsp + 0x40], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x42], ax
mov dword [rsp + 0x44], edi
mov r14, qword [rsp + 0x30]
mov eax, 1
movsxd rdi, r14d
mov rcx, rdi
cmp dword [rsp + 0x38], eax
jne 0x140003244
test r15d, r15d
jle 0x1400031e6
lea r8, [rbp + 0x420]
mov dword [rbp + 0x420], eax
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x14000303c
mov rcx, rdi
test esi, esi
je 0x140003134
lea r8d, [rax + 0x1c]
lea rdx, [rsp + 0x58]
jmp 0x14000313f
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14000303c
lea esi, [rax + 2]
mov qword [rbp - 0x38], rdi
mov eax, 0x10624dd3
mov dword [rbp - 0x40], esi
mul r15d
lea ecx, [r14 + 1]
mov qword [rbp + 0x1d8], rdi
shr edx, 6
lea r9, [rbp + 0x1d0]
imul eax, edx, 0x3e8
lea r8, [rbp - 0x40]
mov dword [rsp + 0x50], edx
xor edx, edx
mov dword [rbp + 0x1d0], esi
sub r15d, eax
imul eax, r15d, 0x3e8
mov dword [rsp + 0x54], eax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jne 0x1400031bf
lea rdx, [rbp - 0x40]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
cmovne rbx, rsi
lea r8, [rbp + 0x420]
mov dword [rbp + 0x420], r13d
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test rbx, rbx
je 0x14000303c
jmp 0x140003216
test esi, esi
je 0x1400031f7
mov r8d, 0x1c
lea rdx, [rsp + 0x58]
jmp 0x140003202
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14000303c
mov esi, 1
mov rcx, qword [0x140257138]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14000303c
mov dword [rax], esi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], r13
jmp 0x14000303c
lea r8, [rbp + 0x420]
mov dword [rbp + 0x420], eax
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x14000303c
mov rcx, qword [0x140257138]
lea r8d, [rax + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14000303c
mov eax, 2
mov dword [rbx], eax
test esi, esi
je 0x1400032ab
movups xmm0, xmmword [rsp + 0x58]
movups xmmword [rbx + 4], xmm0
movsd xmm1, qword [rsp + 0x68]
movsd qword [rbx + 0x14], xmm1
mov eax, dword [rsp + 0x70]
mov dword [rbx + 0x1c], eax
jmp 0x1400032b5
movups xmm0, xmmword [rsp + 0x40]
movdqu xmmword [rbx + 4], xmm0
test esi, esi
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x28], r13
setne al
mov byte [rbx + 0x20], al
jmp 0x14000303c