Function at 0x18014d040
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 - 0x90]
sub rsp, 0x190
mov rax, qword [0x18046cd80]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rax, qword [rbp + 0xf0]
xor r13d, r13d
mov qword [rsp + 0x70], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
mov r14d, r9d
mov dword [rsp + 0x50], r9d
mov esi, r8d
mov dword [rsp + 0x3c], r8d
mov rdi, rdx
mov qword [rsp + 0x60], rdx
mov r12, rcx
mov qword [rsp + 0x68], rcx
mov r15d, r13d
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x38], r13d
mov byte [rsp + 0x30], r13b
test rcx, rcx
je 0x18014d80f
cmp dword [rcx], 0xbab1e
jne 0x18014d80f
cmp byte [rcx + 0x1b3], r13b
je 0x18014d0da
lea eax, [r13 + 8]
jmp 0x18014d1ac
test r14d, r14d
jns 0x18014d0e9
mov eax, 0xa
jmp 0x18014d1ac
mov qword [rsp + 0x188], rbx
mov rbx, qword [rcx + 8]
test rbx, rbx
je 0x18014d154
nop word [rax + rax]
lea rdx, [rbp - 0x58]
mov rcx, rbx
call fcn.18014bbb0
mov r10d, eax
lea r9, [rbp - 0x58]
mov eax, 1
mov r8d, r13d
nop dword [rax + rax]
lea ecx, [r8 + 0x10]
mov edx, eax
bts edx, ecx
test r10d, edx
je 0x18014d146
cmp qword [r9], 0xffffffffffffffff
jae 0x18014d146
inc r15d
rol eax, 1
inc r8d
add r9, 8
cmp r8d, 5
jb 0x18014d120
mov rbx, qword [rbx + 0x10]
mov dword [rsp + 0x40], r15d
test rbx, rbx
jne 0x18014d100
lea rdx, [rsp + 0x34]
mov rcx, r12
call fcn.18014cf50
mov eax, dword [rsp + 0x34]
test eax, eax
js 0x18014d175
cmp eax, r14d
cmovl r14d, eax
mov dword [rsp + 0x50], r14d
cmp byte [rbp + 0x100], r13b
lea eax, [rsi + r15]
lea ecx, [rax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x18014d1d0
shl rcx, 4
call qword [fcn.1801b66a8]
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x18014d1cb
mov eax, 3
mov rbx, qword [rsp + 0x188]
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1801a6340
add rsp, 0x190
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov byte [rsp + 0x30], 1
xor r9d, r9d
mov dword [rsp + 0x34], r9d
mov r14d, r9d
test r15d, r15d
je 0x18014d324
mov r13, qword [r12 + 8]
test r13, r13
je 0x18014d324
lea rdx, [rbp - 0x58]
mov rcx, r13
call fcn.18014bbb0
xor r9d, r9d
lea rdi, [rbp - 0x58]
mov esi, r9d
mov r12d, eax
nop dword [rax + rax]
mov ecx, esi
lea r8d, [rsi + 0x10]
mov edx, 1
shl edx, cl
mov ecx, edx
bts ecx, r8d
test r12d, ecx
je 0x18014d304
mov rax, qword [rdi]
cmp rax, 0xffffffffffffffff
jae 0x18014d304
mov r15, qword [rsp + 0x48]
mov ebx, r14d
inc r14d
shl rbx, 4
add rbx, r15
mov dword [rsp + 0x34], r14d
mov r14d, r9d
mov qword [rbx], rax
mov word [rbx + 8], r9w
test r12d, edx
je 0x18014d26f
mov eax, 0x300
mov r14d, reloc.WLDAP32.dll_Ordinal_41
mov word [rbx + 8], ax
bt r12d, r8d
jae 0x18014d2cd
mov r15, qword [rdi]
lea rax, [rsp + 0x54]
mov rcx, r15
mov dword [rsp + 0x54], 4
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1008
or r14d, 0x32
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x18014d2c3
cmp dword [rsp + 0x58], 1
jne 0x18014d2c3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.WS2_32.dll_send]
or word [rbx + 8], 0x10
mov r15, qword [rsp + 0x48]
mov rax, qword [rsp + 0x68]
mov r8d, r14d
mov rcx, qword [rdi]
mov rdx, qword [rax + 0x1a8]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x18014d438
mov r14d, dword [rsp + 0x34]
inc esi
add rdi, 8
mov r9d, eax
cmp esi, 5
jb 0x18014d210
mov r13, qword [r13 + 0x10]
test r13, r13
jne 0x18014d1f2
mov r15d, dword [rsp + 0x40]
mov rdi, qword [rsp + 0x60]
mov esi, dword [rsp + 0x3c]
mov r12, qword [rsp + 0x68]
lea r13, [r12 + 0x1a8]
mov r14d, r9d
test esi, esi
je 0x18014d46e
lea rbx, [rdi + 8]
nop dword [rax + rax]
movzx edx, word [rbx]
movzx eax, dl
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x29
mov edi, ecx
or edi, 4
test dl, 2
cmove edi, ecx
test dl, 4
je 0x18014d3b1
mov rsi, qword [rbx - 8]
lea rax, [rsp + 0x58]
mov rcx, rsi
mov dword [rsp + 0x58], 4
lea r9, [rsp + 0x54]
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 0x18014d3ad
cmp dword [rsp + 0x54], 1
jne 0x18014d3ad
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov esi, dword [rsp + 0x3c]
mov rdx, qword [r13]
mov r8d, edi
mov rcx, qword [rbx - 8]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x18014d452
mov edi, dword [rsp + 0x34]
xor r9d, r9d
mov rcx, qword [rsp + 0x48]
mov eax, edi
shl rax, 4
add rcx, rax
mov rax, qword [rbx - 8]
mov qword [rcx], rax
movzx eax, r9w
mov word [rcx + 8], r9w
test byte [rbx], 1
je 0x18014d402
mov r8d, 0x300
mov word [rcx + 8], r8w
mov eax, r8d
test byte [rbx], 2
je 0x18014d413
mov edx, 0x400
or ax, dx
mov word [rcx + 8], ax
test byte [rbx], 4
je 0x18014d420
or ax, 0x10
mov word [rcx + 8], ax
inc edi
inc r14d
add rbx, 0x10
mov dword [rsp + 0x34], edi
cmp r14d, esi
jb 0x18014d340
jmp 0x18014d472
cmp byte [rsp + 0x30], 0
je 0x18014d464
mov rcx, r15
call qword [fcn.1801b13c8]
mov eax, 4
jmp 0x18014d1a4
cmp byte [rsp + 0x30], 0
je 0x18014d464
mov rcx, qword [rsp + 0x48]
call qword [fcn.1801b13c8]
mov eax, 4
jmp 0x18014d1a4
mov edi, dword [rsp + 0x34]
test edi, edi
jne 0x18014d48f
movzx ebx, byte [rbp + 0x100]
test bl, bl
je 0x18014d78e
mov rbx, qword [rsp + 0x48]
mov r12d, r9d
jmp 0x18014d4bd
mov rbx, qword [rsp + 0x48]
xor r8d, r8d
mov rcx, rbx
mov edx, edi
call fcn.18016d950
mov r12d, eax
test eax, eax
jns 0x18014d4b2
mov eax, ntohs
jmp 0x18014d1a4
jle 0x18014d4ba
mov dword [rsp + 0x38], eax
jmp 0x18014d4d7
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], r9d
mov r9d, dword [rsp + 0x50]
mov rdx, r13
lea ecx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
xor r8d, r8d
mov edi, r8d
test esi, esi
je 0x18014d5e8
nop word [rax + rax]
mov rsi, qword [rsp + 0x60]
lea ecx, [r15 + rdi]
add rcx, rcx
xor edx, edx
mov rsi, qword [rsi]
movsx r14d, word [rbx + rcx*8 + 0xa]
movzx ebx, r8w
mov dword [rsp + 0x78], r8d
mov rcx, rsi
lea r8, [rsp + 0x78]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x18014d579
mov r8d, dword [rsp + 0x78]
mov ecx, eax
test r8b, 0x29
setne cl
movzx edx, cx
or dx, 4
test r8b, 0x32
cmove dx, cx
movzx ecx, dx
or cx, 2
test r8b, 4
cmove cx, dx
cmp qword [rsp + 0x70], 0
movzx ebx, cx
je 0x18014d579
test r12d, r12d
jne 0x18014d579
test r8d, r8d
je 0x18014d579
inc dword [rsp + 0x38]
xor r8d, r8d
mov rdx, qword [r13]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x18014d5bf
mov rdx, qword [r13]
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test r12d, r12d
je 0x18014d5bf
movzx ecx, bx
or cx, 1
test r14d, 0x300
cmove cx, bx
movzx edx, cx
or dx, 4
test r14b, 0x10
cmove dx, cx
movzx ebx, dx
or bx, 2
bt r14d, 0xa
cmovae bx, dx
mov rax, qword [rsp + 0x60]
inc edi
mov r8d, 0
mov word [rax + 0xa], bx
add rax, 0x10
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x60], rax
cmp edi, dword [rsp + 0x3c]
jb 0x18014d4f0
test r15d, r15d
je 0x18014d774
mov rax, qword [rsp + 0x68]
mov r15, qword [rax + 8]
mov qword [rsp + 0x60], r15
test r15, r15
je 0x18014d774
lea r9, [0x180000000]
nop
mov rdx, qword [r15 + 0x20]
test rdx, rdx
je case.default.0x18014d63a
mov eax, dword [r15 + 0x58]
add eax, 0xfffffffd
cmp eax, 9
ja case.default.0x18014d63a
cdqe
mov ecx, dword [r9 + rax*4 + 0x14d81c]
add rcx, r9
jmp rcx
lea rdx, [rbp - 0x58]
mov rcx, r15
call fcn.180165730
mov r14d, eax
xor r8d, r8d
jmp 0x18014d6e0
mov rax, qword [rdx + 0x2e8]
lea r8, [rbp - 0x58]
mov rcx, r15
mov r9, qword [rax + 0x40]
test r9, r9
je 0x18014d675
call r9
mov r14d, eax
xor r8d, r8d
jmp 0x18014d6e0
xor edx, edx
call fcn.18015c640
mov r14d, eax
xor r8d, r8d
jmp 0x18014d6e0
mov rax, qword [rdx + 0x2e8]
mov r9, qword [rax + 0x48]
test r9, r9
je case.default.0x18014d63a
lea r8, [rbp - 0x58]
mov rcx, r15
call r9
mov r14d, eax
xor r8d, r8d
jmp 0x18014d6e0
lea r8, [rbp - 0x58]
xor edx, edx
mov rcx, r15
call fcn.18015c640
mov r14d, eax
xor r8d, r8d
jmp 0x18014d6e0
mov rax, qword [rdx + 0x2e8]
mov r9, qword [rax + 0x50]
jmp 0x18014d68f
lea r8, [rbp - 0x58]
mov rcx, r15
call fcn.180163190
mov r14d, eax
xor r8d, r8d
jmp 0x18014d6e0
mov r14d, r8d
mov r15d, dword [rsp + 0x38]
lea rsi, [rbp - 0x58]
mov edi, r8d
mov ebx, 1
lea eax, [rdi + 0x10]
mov ecx, ebx
bts ecx, eax
test r14d, ecx
je 0x18014d751
mov rcx, qword [rsi]
xor edx, edx
mov dword [rsp + 0x78], r8d
lea r8, [rsp + 0x78]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x18014d72e
cmp qword [rsp + 0x70], 0
je 0x18014d72e
test r12d, r12d
jne 0x18014d72e
cmp dword [rsp + 0x78], r12d
je 0x18014d72e
inc r15d
mov rdx, qword [r13]
xor r8d, r8d
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
inc edi
rol ebx, 1
add rsi, 8
mov r8d, 0
cmp edi, 5
jb 0x18014d6f1
mov dword [rsp + 0x38], r15d
lea r9, [0x180000000]
mov r15, qword [rsp + 0x60]
mov r15, qword [r15 + 0x10]
mov qword [rsp + 0x60], r15
test r15, r15
jne 0x18014d610
mov rcx, qword [r13]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
mov edi, dword [rsp + 0x34]
mov r12, qword [rsp + 0x68]
movzx ebx, byte [rbp + 0x100]
cmp byte [rsp + 0x30], 0
je 0x18014d7a0
mov rcx, qword [rsp + 0x48]
call qword [fcn.1801b13c8]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x18014d7b0
mov eax, dword [rsp + 0x38]
mov dword [rcx], eax
cmp byte [rbp + 0xf8], 0
je 0x18014d808
test edi, edi
jne 0x18014d808
test bl, bl
jne 0x18014d808
cmp dword [r12], 0xbab1e
mov dword [rsp + 0x40], edi
jne 0x18014d808
cmp byte [r12 + 0x1b3], bl
jne 0x18014d808
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.18014cf50
test eax, eax
jne 0x18014d808
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x18014d808
mov ecx, dword [rsp + 0x50]
cmp eax, ecx
jg 0x18014d7fe
test eax, eax
jns 0x18014d800
mov eax, ecx
movsxd rcx, eax
call fcn.18016deb0
xor eax, eax
jmp 0x18014d1a4
mov eax, 1
jmp 0x18014d1ac