Function at 0x1801be210
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 [0x18049d0e0]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rax, qword [rbp + 0xf0]
xor r12d, r12d
mov qword [rsp + 0x68], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x40], rax
mov esi, r9d
mov dword [rsp + 0x48], r9d
mov edi, r8d
mov dword [rsp + 0x3c], r8d
mov r14, rdx
mov qword [rsp + 0x60], rdx
mov r13, rcx
mov qword [rsp + 0x50], rcx
mov r15d, r12d
mov dword [rsp + 0x34], r12d
mov byte [rsp + 0x30], r12b
test rcx, rcx
je 0x1801be9af
cmp dword [rcx], 0xbab1e
jne 0x1801be9af
cmp byte [rcx + 0x18b], r12b
je 0x1801be2a6
lea eax, [r12 + 8]
jmp 0x1801be5a4
test esi, esi
jns 0x1801be2b4
mov eax, 0xa
jmp 0x1801be5a4
mov qword [rsp + 0x188], rbx
mov rbx, qword [rcx + 8]
test rbx, rbx
je 0x1801be33e
nop word [rax + rax]
lea rdx, [rbp - 0x60]
mov rcx, rbx
call fcn.1801bcc70
mov r10d, eax
lea r8, [rbp - 0x60]
mov eax, 1
mov r9d, r12d
nop dword [rax + rax]
or rdx, 0xffffffffffffffff
test r10d, eax
je 0x1801be307
mov rcx, qword [r8]
cmp rcx, rdx
jae 0x1801be307
inc r15d
mov rdx, rcx
mov ecx, eax
rol ecx, 0x10
test r10d, ecx
je 0x1801be320
mov rcx, qword [r8]
cmp rcx, 0xffffffffffffffff
jae 0x1801be320
inc r15d
mov rdx, rcx
cmp rdx, 0xffffffffffffffff
je 0x1801be335
inc r9d
rol eax, 1
add r8, 8
cmp r9d, 5
jb 0x1801be2f0
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1801be2d0
lea rdx, [rsp + 0x38]
mov rcx, r13
call fcn.1801be0f0
mov eax, dword [rsp + 0x38]
test eax, eax
js 0x1801be35c
cmp eax, esi
cmovl esi, eax
mov dword [rsp + 0x48], esi
cmp byte [rbp + 0x100], r12b
lea eax, [rdi + r15]
lea ecx, [rax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x1801be395
shl rcx, 4
call qword [fcn.18020ffc8]
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1801be390
mov eax, 3
jmp 0x1801be59c
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x38], r12d
mov edx, reloc.WLDAP32.dll_Ordinal_41
test r15d, r15d
je 0x1801be4ca
mov rax, qword [r13 + 8]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1801be4ca
nop word [rax + rax]
lea rdx, [rbp - 0x60]
mov rcx, rax
call fcn.1801bcc70
mov r13d, eax
lea rsi, [rbp - 0x60]
xor eax, eax
mov edi, eax
nop word [rax + rax]
or rbx, 0xffffffffffffffff
mov r14d, eax
bt r13d, edi
jae 0x1801be41f
mov rcx, qword [rsi]
cmp rcx, rbx
jae 0x1801be41f
mov rdx, qword [rsp + 0x40]
mov rbx, rcx
mov eax, r12d
mov r14d, reloc.WLDAP32.dll_Ordinal_41
add rax, rax
inc r12d
mov dword [rsp + 0x38], r12d
mov qword [rdx + rax*8], rcx
mov ecx, 0x300
mov word [rdx + rax*8 + 8], cx
lea ecx, [rdi + 0x10]
movzx eax, cl
bt r13d, eax
jae 0x1801be46d
mov rax, qword [rsi]
cmp rax, 0xffffffffffffffff
jae 0x1801be46d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov rbx, rax
or r14d, 0x32
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x40]
mov edx, reloc.WS2_32.dll_recv
mov eax, r12d
add rax, rax
inc r12d
mov dword [rsp + 0x38], r12d
mov qword [rcx + rax*8], rbx
mov word [rcx + rax*8 + 8], dx
cmp rbx, 0xffffffffffffffff
je 0x1801be4a2
mov rax, qword [rsp + 0x50]
mov r8d, r14d
mov rcx, rbx
mov rdx, qword [rax + 0x180]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x1801be585
inc edi
add rsi, 8
cmp edi, 5
jb 0x1801be3e0
mov rax, qword [rsp + 0x58]
mov rax, qword [rax + 8]
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x1801be3c0
mov r13, qword [rsp + 0x50]
lea edx, [rax + 0x29]
mov edi, dword [rsp + 0x3c]
mov r14, qword [rsp + 0x60]
xor ecx, ecx
mov esi, ecx
test edi, edi
je 0x1801be5cf
lea rbx, [r14 + 8]
mov r14, qword [rsp + 0x40]
nop
movzx eax, word [rbx]
mov edi, ecx
test al, 1
cmovne edi, edx
test al, 2
je 0x1801be4f1
or edi, 4
test al, 4
je 0x1801be50a
mov rcx, qword [rbx - 8]
or edi, 0x32
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_send]
mov rdx, qword [r13 + 0x180]
mov r8d, edi
mov rcx, qword [rbx - 8]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x1801be5c3
mov rax, qword [rbx - 8]
mov ecx, r12d
shl rcx, 4
add rcx, r14
mov qword [rcx], rax
xor eax, eax
mov word [rcx + 8], ax
test byte [rbx], 1
je 0x1801be54b
mov eax, 0x300
mov word [rcx + 8], ax
test byte [rbx], 2
je 0x1801be559
mov eax, 0x400
or word [rcx + 8], ax
test byte [rbx], 4
je 0x1801be563
or word [rcx + 8], 0x10
inc r12d
mov ecx, 0
inc esi
mov dword [rsp + 0x38], r12d
add rbx, 0x10
lea edx, [rcx + 0x29]
cmp esi, dword [rsp + 0x3c]
jb 0x1801be4e0
jmp 0x1801be5d4
cmp byte [rsp + 0x30], 0
je 0x1801be597
mov rcx, qword [rsp + 0x40]
call qword [fcn.18020f070]
mov eax, 4
mov rbx, qword [rsp + 0x188]
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1800b7d20
add rsp, 0x190
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp byte [rsp + 0x30], 0
je 0x1801be597
mov rcx, r14
jmp 0x1801be591
mov r14, qword [rsp + 0x40]
test r12d, r12d
jne 0x1801be5ec
movzx ebx, byte [rbp + 0x100]
test bl, bl
je 0x1801be92b
mov ebx, ecx
jmp 0x1801be613
xor r8d, r8d
mov edx, r12d
mov rcx, r14
call fcn.1801dfbb0
mov ebx, eax
test eax, eax
jns 0x1801be607
mov eax, listen
jmp 0x1801be59c
jle 0x1801be611
mov edi, eax
mov dword [rsp + 0x34], eax
jmp 0x1801be634
xor ecx, ecx
mov r9d, dword [rsp + 0x48]
lea rdx, [r13 + 0x180]
xor r8d, r8d
mov dword [rsp + 0x20], ecx
lea ecx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov edi, dword [rsp + 0x34]
xor r8d, r8d
movsxd r13, ebx
mov esi, r8d
mov qword [rsp + 0x58], r13
cmp dword [rsp + 0x3c], r8d
jbe 0x1801be760
mov rdi, qword [rsp + 0x60]
mov r12, r13
add rdi, 0xa
nop dword [rax]
movzx ebx, r8w
lea ecx, [r15 + rsi]
add rcx, rcx
xor edx, edx
movsx r13d, word [r14 + rcx*8 + 0xa]
mov r14, qword [rdi - 0xa]
mov dword [rsp + 0x70], r8d
mov rcx, r14
lea r8, [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x1801be6d9
mov r9d, dword [rsp + 0x70]
mov ecx, eax
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 0x1801be6d9
test r12, r12
jne 0x1801be6d9
test r9d, r9d
je 0x1801be6d9
inc dword [rsp + 0x34]
mov rax, qword [rsp + 0x50]
xor r8d, r8d
mov rcx, r14
mov rdx, qword [rax + 0x180]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test r12, r12
jne 0x1801be6fb
mov word [rdi], bx
jmp 0x1801be737
mov eax, r13d
mov ecx, 0x300
and eax, ecx
movzx ecx, bx
or cx, 1
test eax, eax
mov eax, r13d
cmove cx, bx
movzx edx, cx
or dx, 4
and al, 0x10
cmove dx, cx
movzx eax, dx
or ax, 2
and r13d, 0x400
cmove ax, dx
mov word [rdi], ax
mov r14, qword [rsp + 0x40]
inc esi
add rdi, 0x10
mov r8d, 0
cmp esi, dword [rsp + 0x3c]
jb 0x1801be660
mov r12d, dword [rsp + 0x38]
mov r13, qword [rsp + 0x58]
mov edi, dword [rsp + 0x34]
test r15d, r15d
je 0x1801be910
mov rax, qword [rsp + 0x50]
mov r15, qword [rax + 8]
mov qword [rsp + 0x60], r15
test r15, r15
je 0x1801be910
lea r9, [0x180000000]
mov r12, rax
nop word [rax + rax]
mov rdx, qword [r15 + 0x18]
test rdx, rdx
je case.default.0x1801be7ba
mov eax, dword [r15 + 0x50]
add eax, 0xfffffffd
cmp eax, 9
ja case.default.0x1801be7ba
cdqe
mov ecx, dword [r9 + rax*4 + 0x1be9bc]
add rcx, r9
jmp rcx
lea rdx, [rbp - 0x60]
mov rcx, r15
call fcn.1801d6c30
mov r14d, eax
xor r8d, r8d
jmp 0x1801be867
mov rax, qword [rdx + 0x370]
mov r9, qword [rax + 0x40]
test r9, r9
je 0x1801be7f5
lea r8, [rbp - 0x60]
mov rcx, r15
call r9
mov r14d, eax
xor r8d, r8d
jmp 0x1801be867
mov rax, qword [rdx + 0x1b8]
mov r14d, 0x10001
mov qword [rbp - 0x60], rax
xor r8d, r8d
jmp 0x1801be867
mov rax, qword [rdx + 0x370]
mov r9, qword [rax + 0x48]
test r9, r9
je case.default.0x1801be7ba
lea r8, [rbp - 0x60]
mov rcx, r15
call r9
mov r14d, eax
xor r8d, r8d
jmp 0x1801be867
lea r8, [rbp - 0x60]
xor edx, edx
mov rcx, r15
call fcn.1801dea20
mov r14d, eax
xor r8d, r8d
jmp 0x1801be867
mov rax, qword [rdx + 0x370]
mov r9, qword [rax + 0x50]
jmp 0x1801be816
lea r8, [rbp - 0x60]
mov rcx, r15
call fcn.1801dd970
mov r14d, eax
xor r8d, r8d
jmp 0x1801be867
mov r14d, r8d
mov r15d, dword [rsp + 0x34]
lea rsi, [rbp - 0x60]
mov edi, r8d
mov ebx, 1
nop dword [rax + rax]
lea eax, [rdi + 0x10]
mov ecx, ebx
bts ecx, eax
test r14d, ecx
je 0x1801be8e4
mov rcx, qword [rsi]
xor edx, edx
mov dword [rsp + 0x70], r8d
lea r8, [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x1801be8bd
cmp qword [rsp + 0x68], 0
je 0x1801be8bd
test r13, r13
jne 0x1801be8bd
cmp dword [rsp + 0x70], r13d
je 0x1801be8bd
inc r15d
mov rdx, qword [r12 + 0x180]
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 0x1801be880
mov dword [rsp + 0x34], r15d
lea r9, [0x180000000]
mov r15, qword [rsp + 0x60]
mov r15, qword [r15 + 8]
mov qword [rsp + 0x60], r15
test r15, r15
jne 0x1801be790
mov r12d, dword [rsp + 0x38]
mov edi, dword [rsp + 0x34]
mov r13, qword [rsp + 0x50]
mov rcx, qword [r13 + 0x180]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
movzx ebx, byte [rbp + 0x100]
jmp 0x1801be92f
mov edi, dword [rsp + 0x34]
cmp byte [rsp + 0x30], 0
je 0x1801be941
mov rcx, qword [rsp + 0x40]
call qword [fcn.18020f070]
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x1801be94d
mov dword [rax], edi
cmp byte [rbp + 0xf8], 0
je 0x1801be9a8
test r12d, r12d
jne 0x1801be9a8
test bl, bl
jne 0x1801be9a8
xor eax, eax
cmp dword [r13], 0xbab1e
mov dword [rsp + 0x3c], eax
jne 0x1801be9a8
cmp byte [r13 + 0x18b], al
jne 0x1801be9a8
lea rdx, [rsp + 0x3c]
mov rcx, r13
call fcn.1801be0f0
test eax, eax
jne 0x1801be9a8
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x1801be9a8
mov ecx, dword [rsp + 0x48]
cmp eax, ecx
jg 0x1801be9a0
test eax, eax
cmovs eax, ecx
mov ecx, eax
movsxd rcx, ecx
call fcn.1801e00f0
xor eax, eax
jmp 0x1801be59c
mov eax, 1
jmp 0x1801be5a4