Function at 0x140041d40
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x1402b7920]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov esi, r8d
mov rbx, rdx
mov r14, rcx
mov qword [rbp - 0x38], rcx
xor r12d, r12d
mov dword [rbp - 0x70], r12d
mov ecx, 0x101
lea rdx, [rbp]
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edx, [r12 + 1]
lea r8d, [r12 + 6]
mov r15d, 2
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
mov qword [rbp - 8], r12
mov word [rbp - 0x10], r15w
movzx ecx, word [0x1402c62e4]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0xe], ax
lea rcx, [0x1402b8b10]
cmp qword [0x1402b8b28], 0x10
cmovae rcx, qword [0x1402b8b10]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp - 0xc], eax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], r12
lea ecx, [r12 + 4]
call fcn.14004737c
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
add rax, 4
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x48], rax
mov rax, qword [rsp + 0x30]
lea rcx, [rax + 4]
xor edx, edx
mov dword [rax], edx
mov qword [rsp + 0x38], rcx
mov qword [rbp - 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r12
lea ecx, [rdx + 4]
call fcn.14004737c
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
add rax, 4
mov qword [rbp - 0x78], rax
lea rax, [rsp + 0x78]
mov qword [rbp - 0x68], rax
mov rax, qword [rsp + 0x78]
lea rcx, [rax + 4]
xor edx, edx
mov dword [rax], edx
mov qword [rbp - 0x80], rcx
mov qword [rbp - 0x68], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r12
mov rax, qword [rsp + 0x30]
mov byte [rax], sil
mov ecx, esi
sar ecx, 8
mov rax, qword [rsp + 0x30]
mov byte [rax + 1], cl
mov ecx, esi
sar ecx, 0x10
mov rax, qword [rsp + 0x30]
mov byte [rax + 2], cl
mov ecx, esi
sar ecx, 0x18
mov rax, qword [rsp + 0x30]
mov byte [rax + 3], cl
lea rax, [rbp - 0x30]
mov qword [rbp - 0x40], rax
lea rdx, [0x1402b8a30]
lea rcx, [rbp - 0x30]
call fcn.140046b60
nop
mov r9, rax
mov r8d, esi
mov rdx, rbx
lea rcx, [rbp - 0x60]
call fcn.140041a00
nop
mov rdx, qword [rsp + 0x30]
add rdx, 4
mov r9, qword [rbp - 0x58]
mov r8, qword [rbp - 0x60]
lea rcx, [rsp + 0x30]
call fcn.140046f40
lea r8d, [r12 + 0x10]
lea rdx, [rbp - 0x10]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140042087
lea r8d, [rsi + 4]
xor r9d, r9d
mov rdx, qword [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x140042087
xor r9d, r9d
lea r8d, [r12 + 4]
mov rdx, qword [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
mov rcx, qword [rsp + 0x78]
movsx edx, byte [rcx + 3]
shl edx, 8
movsx eax, byte [rcx + 2]
or edx, eax
shl edx, 8
movsx eax, byte [rcx + 1]
or edx, eax
shl edx, 8
movsx eax, byte [rcx]
or edx, eax
movsxd rsi, edx
mov rax, qword [rsp + 0x68]
sub rax, qword [rsp + 0x60]
cmp rax, rsi
jae 0x140042087
nop
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r12
mov ecx, 0x10026
call fcn.14004737c
mov rcx, rax
test rax, rax
je 0x140042270
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
add rax, 0xffff
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x48]
mov qword [rbp - 0x68], rax
mov rcx, qword [rsp + 0x48]
lea rbx, [rcx + 0xffff]
xor edx, edx
mov r8d, 0xffff
call fcn.1401e7150
mov qword [rsp + 0x50], rbx
mov qword [rbp - 0x68], r12
xor r9d, r9d
mov r8d, 0xffff
mov rdx, qword [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140042215
movsxd r9, eax
mov r8, qword [rsp + 0x48]
add r9, r8
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x60]
call fcn.140046f40
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140042074
mov rdx, qword [rsp + 0x58]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140042061
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140042270
call fcn.14002e730
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r12
mov rax, qword [rsp + 0x68]
sub rax, qword [rsp + 0x60]
cmp rax, rsi
jb 0x140041f80
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rax, [rbp - 0x30]
mov qword [rbp - 0x40], rax
lea rdx, [0x1402b8a30]
lea rcx, [rbp - 0x30]
call fcn.140046b60
mov r9, rax
mov r8, qword [rsp + 0x68]
sub r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x60]
mov rcx, r14
call fcn.140041a00
mov dword [rbp - 0x70], 1
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x140042115
mov rdx, qword [rbp - 0x50]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140042104
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004226a
call fcn.14002e730
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x50], r12
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14004215f
mov rdx, qword [rsp + 0x70]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004214c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140042276
call fcn.14002e730
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r12
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1400421a7
mov rdx, qword [rbp - 0x78]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140042195
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004227c
call fcn.14002e730
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r12
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400421f1
mov rdx, qword [rsp + 0x40]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400421de
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140042264
call fcn.14002e730
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], r12
mov rax, r14
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.1401e49e0
add rsp, 0x2b0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140042087
mov rdx, qword [rsp + 0x58]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004224c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140042270
call fcn.14002e730
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r12
jmp 0x140042087
call fcn.1401e9de0
nop
call fcn.1401e9de0
nop
call fcn.1401e9de0
nop
call fcn.1401e9de0
nop
call fcn.1401e9de0
int3