Function at 0x14013ea20
Capabilities:
Send data
Send data on socket

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xa0]
sub rsp, 0x1a0
mov rax, qword [0x140229948]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x100]
lea r14, [rbp - 0x20]
mov qword [rsp + 0x68], rax
mov esi, r9d
xor eax, eax
mov dword [rsp + 0x40], r9d
mov r12d, r8d
mov r15, rdx
mov qword [rsp + 0x60], rdx
mov r13, rcx
mov qword [rsp + 0x58], rcx
mov edi, eax
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x50], r14
mov byte [rsp + 0x30], al
test rcx, rcx
je 0x14013f0f5
cmp dword [rcx], 0xbab1e
jne 0x14013f0f5
cmp byte [rcx + 0x1ab], al
je 0x14013eab3
mov eax, 8
jmp 0x14013ed9e
test esi, esi
jns 0x14013eac1
mov eax, 0xa
jmp 0x14013ed9e
mov qword [rsp + 0x198], rbx
mov rbx, qword [rcx + 8]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
test rbx, rbx
je 0x14013eb0d
lea rdx, [rsp + 0x70]
mov rcx, rbx
call fcn.14013d650
add edi, dword [rbp - 0x68]
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14013eaf0
mov dword [rsp + 0x3c], edi
lea rdx, [rsp + 0x34]
mov rcx, r13
call fcn.14013e910
mov eax, dword [rsp + 0x34]
test eax, eax
js 0x14013eb2b
cmp eax, esi
cmovl esi, eax
mov dword [rsp + 0x40], esi
cmp byte [rbp + 0x110], 0
lea eax, [r12 + rdi]
lea ecx, [rax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x14013eb66
shl rcx, 4
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x50], rax
mov r14, rax
test rax, rax
jne 0x14013eb61
lea eax, [r14 + 3]
jmp 0x14013ed96
mov byte [rsp + 0x30], 1
xor ecx, ecx
mov dword [rsp + 0x34], ecx
mov esi, ecx
lea edx, [rcx + 0x29]
test edi, edi
je 0x14013ec8d
mov r15, qword [r13 + 8]
test r15, r15
je 0x14013ec88
nop word [rax + rax]
lea rdx, [rsp + 0x70]
mov rcx, r15
call fcn.14013d650
xor ecx, ecx
mov edi, ecx
cmp dword [rbp - 0x68], ecx
jbe 0x14013ec77
nop word [rax + rax]
mov rax, qword [rsp + rdi*8 + 0x70]
mov ebx, esi
inc esi
shl rbx, 4
add rbx, r14
mov dword [rsp + 0x34], esi
mov esi, ecx
mov qword [rbx], rax
mov word [rbx + 8], cx
test byte [rbp + rdi - 0x64], 1
je 0x14013ebe2
mov eax, 0x300
mov esi, reloc.WLDAP32.dll_Ordinal_41
mov word [rbx + 8], ax
test byte [rbp + rdi - 0x64], 2
je 0x14013ec42
mov r14, qword [rsp + rdi*8 + 0x70]
lea rax, [rsp + 0x44]
mov rcx, r14
mov dword [rsp + 0x44], 4
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1008
or esi, 0x32
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14013ec38
cmp dword [rsp + 0x48], 1
jne 0x14013ec38
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
or word [rbx + 8], 0x10
mov r14, qword [rsp + 0x50]
mov rdx, qword [r13 + 0x198]
mov r8d, esi
mov rcx, qword [rsp + rdi*8 + 0x70]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x14013ed81
mov eax, dword [rbp - 0x68]
inc rdi
mov esi, dword [rsp + 0x34]
mov ecx, 0
cmp rdi, rax
jb 0x14013ebb0
mov r15, qword [r15 + 0x10]
test r15, r15
jne 0x14013eb90
lea edx, [r15 + 0x29]
mov r15, qword [rsp + 0x60]
mov r14, rcx
test r12, r12
je 0x14013edcc
lea rbx, [r15 + 8]
mov r15, qword [rsp + 0x50]
movzx eax, word [rbx]
mov edi, ecx
test al, 1
cmovne edi, edx
test al, 2
je 0x14013ecb3
or edi, 4
test al, 4
je 0x14013ed05
mov rsi, qword [rbx - 8]
lea rax, [rsp + 0x48]
mov rcx, rsi
mov dword [rsp + 0x48], 4
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1008
or edi, 0x32
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14013ed05
cmp dword [rsp + 0x44], 1
jne 0x14013ed05
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov rdx, qword [r13 + 0x198]
mov r8d, edi
mov rcx, qword [rbx - 8]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x14013edc0
mov rax, qword [rbx - 8]
mov esi, dword [rsp + 0x34]
mov ecx, esi
shl rcx, 4
add rcx, r15
mov qword [rcx], rax
xor eax, eax
mov word [rcx + 8], ax
test byte [rbx], 1
je 0x14013ed49
mov eax, 0x300
mov word [rcx + 8], ax
test byte [rbx], 2
je 0x14013ed57
mov eax, 0x400
or word [rcx + 8], ax
test byte [rbx], 4
je 0x14013ed61
or word [rcx + 8], 0x10
inc esi
mov ecx, 0
inc r14
mov dword [rsp + 0x34], esi
add rbx, 0x10
lea edx, [rcx + 0x29]
cmp r14, r12
jb 0x14013eca2
jmp 0x14013edd1
cmp byte [rsp + 0x30], 0
je 0x14013ed91
mov rcx, r14
call qword [fcn.140195925]
mov eax, 4
mov rbx, qword [rsp + 0x198]
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140194380
add rsp, 0x1a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp byte [rsp + 0x30], 0
je 0x14013ed91
mov rcx, r15
jmp 0x14013ed8b
mov r15, qword [rsp + 0x50]
test esi, esi
jne 0x14013ede8
movzx ebx, byte [rbp + 0x110]
test bl, bl
je 0x14013f072
mov ebx, ecx
jmp 0x14013ee0c
xor r8d, r8d
mov edx, esi
mov rcx, r15
call fcn.140160940
mov ebx, eax
test eax, eax
jns 0x14013ee02
mov eax, recv
jmp 0x14013ed96
jle 0x14013ee0a
mov dword [rsp + 0x38], eax
jmp 0x14013ee29
xor ecx, ecx
mov r9d, dword [rsp + 0x40]
lea rdx, [r13 + 0x198]
xor r8d, r8d
mov dword [rsp + 0x20], ecx
lea ecx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
movsxd r15, ebx
test r12, r12
je 0x14013ef32
mov rcx, qword [rsp + 0x60]
mov r13d, dword [rsp + 0x3c]
shl r13, 4
sub r13, rcx
add r13, qword [rsp + 0x50]
lea rdi, [rcx + 0xa]
nop
mov rsi, qword [rdi - 0xa]
lea r8, [rbp - 0x58]
movsx r14d, word [rdi + r13]
xor eax, eax
mov rcx, rsi
mov dword [rbp - 0x58], eax
xor edx, edx
movzx ebx, ax
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x14013eec1
mov r9d, dword [rbp - 0x58]
mov ecx, 0
test r9b, 0x29
mov eax, r9d
setne cl
movzx edx, cx
or dx, 4
and al, 0x32
mov eax, r9d
cmove dx, cx
movzx r8d, dx
or r8w, 2
and al, 4
cmove r8w, dx
cmp qword [rsp + 0x68], 0
movzx ebx, r8w
je 0x14013eec1
test r15, r15
jne 0x14013eec1
test r9d, r9d
je 0x14013eec1
inc dword [rsp + 0x38]
mov rax, qword [rsp + 0x58]
xor r8d, r8d
mov rcx, rsi
mov rdx, qword [rax + 0x198]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test r15, r15
jne 0x14013eee3
mov word [rdi], bx
jmp 0x14013ef1b
mov eax, r14d
movzx ecx, bx
or cx, 1
and eax, 0x300
mov eax, r14d
cmove cx, bx
movzx edx, cx
or dx, 4
and al, 0x10
cmove dx, cx
movzx eax, dx
or ax, 2
and r14d, 0x400
cmove ax, dx
mov word [rdi], ax
add rdi, 0x10
sub r12, 1
jne 0x14013ee50
mov r13, qword [rsp + 0x58]
mov esi, dword [rsp + 0x34]
cmp dword [rsp + 0x3c], 0
je 0x14013f05e
mov rdi, qword [r13 + 8]
mov qword [rsp + 0x58], rdi
test rdi, rdi
je 0x14013f05e
mov rsi, qword [rsp + 0x68]
lea r14, [0x140000000]
nop dword [rax + rax]
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.14014e390
cmp qword [rdi + 0x20], 0
je case.0x14013ef8c.13
mov eax, dword [rdi + 0x58]
add eax, 0xfffffffd
cmp eax, 0xa
ja case.0x14013ef8c.4
cdqe
mov ecx, dword [r14 + rax*4 + 0x13f100]
add rcx, r14
jmp rcx
lea r8, [0x140158820]
mov rcx, rdi
lea rdx, [rsp + 0x70]
call fcn.14014e260
jmp case.0x14013ef8c.13
lea r8, [0x14013f1d0]
jmp 0x14013efc6
lea r8, [0x14013d1c0]
jmp 0x14013efc6
lea r8, [0x14013d1e0]
jmp 0x14013efc6
lea r8, [0x1401550b0]
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.14014e200
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.14014d4e0
xor eax, eax
mov ebx, eax
cmp dword [rbp - 0x68], eax
jbe 0x14013f048
mov edi, dword [rsp + 0x38]
nop dword [rax]
mov rcx, qword [rsp + rbx*8 + 0x70]
lea r8, [rbp - 0x58]
xor edx, edx
mov dword [rbp - 0x58], eax
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x14013f01a
test rsi, rsi
je 0x14013f01a
test r15, r15
jne 0x14013f01a
cmp dword [rbp - 0x58], r15d
je 0x14013f01a
inc edi
mov rdx, qword [r13 + 0x198]
xor r8d, r8d
mov rcx, qword [rsp + rbx*8 + 0x70]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [rbp - 0x68]
inc rbx
cmp rbx, rax
mov eax, 0
jb 0x14013eff0
mov dword [rsp + 0x38], edi
mov rdi, qword [rsp + 0x58]
mov rdi, qword [rdi + 0x10]
mov qword [rsp + 0x58], rdi
test rdi, rdi
jne 0x14013ef60
mov esi, dword [rsp + 0x34]
mov rcx, qword [r13 + 0x198]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
movzx ebx, byte [rbp + 0x110]
cmp byte [rsp + 0x30], 0
je 0x14013f084
mov rcx, qword [rsp + 0x50]
call qword [fcn.140195925]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14013f094
mov eax, dword [rsp + 0x38]
mov dword [rcx], eax
cmp byte [rbp + 0x108], 0
je 0x14013f0ee
test esi, esi
jne 0x14013f0ee
test bl, bl
jne 0x14013f0ee
xor eax, eax
cmp dword [r13], 0xbab1e
mov dword [rsp + 0x3c], eax
jne 0x14013f0ee
cmp byte [r13 + 0x1ab], al
jne 0x14013f0ee
lea rdx, [rsp + 0x3c]
mov rcx, r13
call fcn.14013e910
test eax, eax
jne 0x14013f0ee
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x14013f0ee
mov ecx, dword [rsp + 0x40]
cmp eax, ecx
jg 0x14013f0e6
test eax, eax
cmovs eax, ecx
mov ecx, eax
movsxd rcx, ecx
call fcn.140160e80
xor eax, eax
jmp 0x14013ed96
mov eax, 1
jmp 0x14013ed9e