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

Disassembly:
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x188
mov rax, qword [0x1800d5100]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov rax, qword [rsp + 0x1e0]
xor ebp, ebp
mov r13, rcx
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0x48], r9d
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x40], rcx
mov esi, r9d
mov dword [rsp + 0x3c], r8d
mov r14d, r8d
mov qword [rsp + 0x58], rdx
mov rdi, rdx
mov qword [rsp + 0x60], rax
mov r15d, ebp
mov dword [rsp + 0x34], ebp
mov byte [rsp + 0x30], bpl
test r13, r13
je 0x18002182b
cmp dword [r13], 0xbab1e
jne 0x18002182b
cmp byte [r13 + 0x182], bpl
je 0x1800211c3
lea eax, [rbp + 8]
jmp 0x18002152c
test esi, esi
jns 0x1800211d1
mov eax, 0xa
jmp 0x18002152c
mov qword [rsp + 0x180], rbx
mov rbx, qword [r13 + 8]
test rbx, rbx
je 0x180021260
nop dword [rax]
nop word [rax + rax]
lea rdx, [rsp + 0x98]
mov rcx, rbx
call fcn.18001f970
mov r10d, eax
lea rdx, [rsp + 0x98]
mov eax, 1
mov r9d, ebp
mov r8, 0xffffffffffffffff
test r10d, eax
je 0x18002122d
mov rcx, qword [rdx]
cmp rcx, r8
jae 0x18002122d
inc r15d
mov r8, rcx
mov ecx, eax
rol ecx, 0x10
test r10d, ecx
je 0x180021242
cmp qword [rdx], 0xffffffffffffffff
jae 0x180021242
inc r15d
jmp 0x180021248
cmp r8, 0xffffffffffffffff
je 0x180021257
inc r9d
rol eax, 1
add rdx, 8
cmp r9d, 5
jb 0x180021213
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1800211f0
lea rdx, [rsp + 0x38]
mov rcx, r13
call fcn.180021030
mov eax, dword [rsp + 0x38]
test eax, eax
js 0x18002127e
cmp eax, esi
cmovl esi, eax
mov dword [rsp + 0x48], esi
cmp byte [rsp + 0x1f0], bpl
lea eax, [r14 + r15]
lea ecx, [rax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x1800212bb
shl rcx, 4
call qword [section.el___6]
mov qword [rsp + 0x40], rax
mov rbx, rax
test rax, rax
jne 0x1800212b4
lea eax, [rbx + 3]
jmp 0x180021524
mov byte [rsp + 0x30], 1
jmp 0x1800212c3
lea rbx, [rsp + 0xc0]
xor r8d, r8d
mov qword [rsp + 0x178], r12
mov dword [rsp + 0x38], r8d
test r15d, r15d
je 0x180021415
mov r13, qword [r13 + 8]
test r13, r13
je 0x180021410
nop dword [rax]
lea rdx, [rsp + 0x98]
mov rcx, r13
call fcn.18001f970
xor r8d, r8d
lea r14, [rsp + 0x98]
mov esi, r8d
mov r12d, eax
jmp 0x180021325
mov rbx, qword [rsp + 0x40]
bt r12d, esi
mov rdx, 0xffffffffffffffff
mov edi, r8d
jae 0x18002135a
mov rcx, qword [r14]
cmp rcx, rdx
jae 0x18002135a
mov eax, ebp
mov rdx, rcx
add rax, rax
mov edi, reloc.WLDAP32.dll_Ordinal_41
inc ebp
mov qword [rbx + rax*8], rcx
mov ecx, 0x300
mov word [rbx + rax*8 + 8], cx
lea ecx, [rsi + 0x10]
movzx eax, cl
bt r12d, eax
jae 0x1800213a3
mov rbx, qword [r14]
cmp rbx, 0xffffffffffffffff
jae 0x1800213a3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
or edi, 0x32
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x40]
mov edx, reloc.WS2_32.dll_recv
mov eax, ebp
add rax, rax
inc ebp
mov dword [rsp + 0x38], ebp
mov qword [rcx + rax*8], rbx
mov word [rcx + rax*8 + 8], dx
jmp 0x1800213b0
mov dword [rsp + 0x38], ebp
mov rbx, rdx
cmp rdx, 0xffffffffffffffff
je 0x1800213de
mov rax, qword [rsp + 0x50]
mov r8d, edi
mov rcx, rbx
mov rdx, qword [rax + 0x178]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x1800213f1
inc esi
add r14, 8
mov r8d, eax
cmp esi, 5
jb 0x180021320
mov r13, qword [r13 + 8]
test r13, r13
je 0x180021406
mov rbx, qword [rsp + 0x40]
jmp 0x1800212f0
cmp byte [rsp + 0x30], 0
je 0x180021517
mov rcx, qword [rsp + 0x40]
jmp 0x180021511
mov r14d, dword [rsp + 0x3c]
mov rdi, qword [rsp + 0x58]
mov r13, qword [rsp + 0x50]
mov r12, qword [rsp + 0x40]
mov esi, r8d
test r14d, r14d
je 0x1800214ed
lea rbx, [rdi + 8]
nop word [rax + rax]
movzx edx, word [rbx]
movzx eax, dl
and al, 1
neg al
movzx eax, dl
sbb ecx, ecx
and ecx, 0x29
mov edi, ecx
or edi, 4
and al, 2
cmove edi, ecx
test dl, 4
je 0x180021466
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 + 0x178]
mov r8d, edi
mov rcx, qword [rbx - 8]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x180021507
mov rax, qword [rbx - 8]
xor r8d, r8d
mov edx, ebp
shl rdx, 4
add rdx, r12
mov qword [rdx], rax
movzx eax, r8w
mov word [rdx + 8], r8w
movzx ecx, word [rbx]
test cl, 1
je 0x1800214b7
mov r9d, 0x300
mov word [rdx + 8], r9w
mov eax, r9d
movzx ecx, word [rbx]
test cl, 2
je 0x1800214cb
mov ecx, 0x400
or ax, cx
mov word [rdx + 8], ax
movzx ecx, word [rbx]
test cl, 4
je 0x1800214d8
or ax, 0x10
mov word [rdx + 8], ax
inc ebp
inc esi
add rbx, 0x10
mov dword [rsp + 0x38], ebp
cmp esi, r14d
jb 0x180021430
test ebp, ebp
jne 0x18002154d
movzx edi, byte [rsp + 0x1f0]
test dil, dil
je 0x1800217a9
mov r14d, r8d
jmp 0x180021575
cmp byte [rsp + 0x30], 0
je 0x180021517
mov rcx, r12
call qword [fcn.180079934]
mov eax, 4
mov r12, qword [rsp + 0x178]
mov rbx, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.180071b80
add rsp, 0x188
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
xor r8d, r8d
mov edx, ebp
mov rcx, r12
call fcn.180040480
mov r14d, eax
test eax, eax
jns 0x180021568
mov eax, ntohs
jmp 0x18002151c
jle 0x180021572
mov ebx, eax
mov dword [rsp + 0x34], eax
jmp 0x180021597
xor r8d, r8d
mov r9d, dword [rsp + 0x48]
lea rdx, [r13 + 0x178]
mov dword [rsp + 0x20], r8d
xor r8d, r8d
lea ecx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov ebx, dword [rsp + 0x34]
xor edx, edx
mov esi, edx
cmp dword [rsp + 0x3c], edx
jbe 0x1800216b8
mov rbp, qword [rsp + 0x50]
mov edi, edx
jmp 0x1800215b2
xor edx, edx
movzx ebx, dx
lea ecx, [r15 + rsi]
add rcx, rcx
lea r8, [rsp + 0x68]
movsx r13d, word [r12 + rcx*8 + 0xa]
mov r12, qword [rsp + 0x58]
mov dword [rsp + 0x68], edx
xor edx, edx
mov r12, qword [rdi + r12]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x18002163f
mov r8d, dword [rsp + 0x68]
mov ecx, eax
test r8b, 0x29
mov eax, r8d
setne cl
movzx edx, cx
or dx, 4
and al, 0x32
mov eax, r8d
cmove dx, cx
movzx ecx, dx
or cx, 2
and al, 4
cmove cx, dx
cmp qword [rsp + 0x60], 0
movzx ebx, cx
je 0x18002163f
test r14d, r14d
jne 0x18002163f
test r8d, r8d
je 0x18002163f
inc dword [rsp + 0x34]
xor r8d, r8d
mov rdx, qword [rbp + 0x178]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x180021691
mov rdx, qword [rbp + 0x178]
xor r8d, r8d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test r14d, r14d
je 0x180021691
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
mov eax, 0x400
cmove dx, cx
movzx ebx, dx
or bx, 2
and r13d, eax
cmove bx, dx
mov rax, qword [rsp + 0x58]
inc esi
mov r12, qword [rsp + 0x40]
mov word [rax + rdi + 0xa], bx
add rdi, 0x10
cmp esi, dword [rsp + 0x3c]
jb 0x1800215b0
mov ebp, dword [rsp + 0x38]
mov ebx, dword [rsp + 0x34]
mov r13, qword [rsp + 0x50]
test r15d, r15d
je 0x180021792
mov r15, qword [r13 + 8]
mov qword [rsp + 0x58], r15
test r15, r15
je 0x180021792
mov rbp, qword [rsp + 0x60]
nop dword [rax]
lea rdx, [rsp + 0x98]
mov rcx, r15
call fcn.18001f970
mov r15d, dword [rsp + 0x34]
lea rsi, [rsp + 0x98]
mov r12d, eax
mov ebx, 1
xor eax, eax
mov edi, eax
nop dword [rax]
lea ecx, [rdi + 0x10]
mov edx, ebx
bts edx, ecx
test r12d, edx
je 0x18002176e
mov rcx, qword [rsi]
lea r8, [rsp + 0x68]
xor edx, edx
mov dword [rsp + 0x68], eax
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x180021749
test rbp, rbp
je 0x180021749
test r14d, r14d
jne 0x180021749
cmp dword [rsp + 0x68], r14d
je 0x180021749
inc r15d
mov rdx, qword [r13 + 0x178]
xor r8d, r8d
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
inc edi
rol ebx, 1
add rsi, 8
mov eax, 0
cmp edi, 5
jb 0x180021710
mov dword [rsp + 0x34], r15d
mov r15, qword [rsp + 0x58]
mov r15, qword [r15 + 8]
mov qword [rsp + 0x58], r15
test r15, r15
jne 0x1800216e0
mov ebp, dword [rsp + 0x38]
mov ebx, dword [rsp + 0x34]
mov rcx, qword [r13 + 0x178]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
movzx edi, byte [rsp + 0x1f0]
jmp 0x1800217ad
mov ebx, dword [rsp + 0x34]
cmp byte [rsp + 0x30], 0
je 0x1800217bf
mov rcx, qword [rsp + 0x40]
call qword [fcn.180079934]
mov rax, qword [rsp + 0x60]
test rax, rax
je 0x1800217cb
mov dword [rax], ebx
cmp byte [rsp + 0x1e8], 0
je 0x180021824
test ebp, ebp
jne 0x180021824
test dil, dil
jne 0x180021824
cmp dword [r13], 0xbab1e
mov dword [rsp + 0x3c], ebp
jne 0x180021824
cmp byte [r13 + 0x182], dil
jne 0x180021824
lea rdx, [rsp + 0x3c]
mov rcx, r13
call fcn.180021030
test eax, eax
jne 0x180021824
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x180021824
mov ecx, dword [rsp + 0x48]
cmp eax, ecx
jg 0x18002181a
test eax, eax
jns 0x18002181c
mov eax, ecx
movsxd rcx, eax
call fcn.1800409e0
xor eax, eax
jmp 0x18002151c
mov eax, 1
jmp 0x18002152c