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

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x230
lea rdi, [rsp + 0x30]
mov ecx, 0x80
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x240]
mov rax, qword [0x140241cc0]
xor rax, rsp
mov qword [rsp + 0x228], rax
mov dword [rsp + 0x7c], 0
mov dword [rsp + 0xa4], 0
mov eax, reloc.WS2_32.dll_recv
imul rax, rax, 0
lea rax, [rsp + rax + 0xc0]
mov qword [rsp + 0x168], rax
mov byte [rsp + 0x170], 0
xor eax, eax
test eax, eax
jne 0x1400664eb
cmp qword [rsp + 0x240], 0
je 0x14006650c
mov rax, qword [rsp + 0x240]
cmp dword [rax], 0xbab1e
je 0x140066516
mov eax, 1
jmp 0x14006703c
mov rax, qword [rsp + 0x240]
movzx eax, byte [rax + 0x182]
test eax, eax
je 0x140066533
mov eax, 8
jmp 0x14006703c
cmp dword [rsp + 0x258], 0
jge 0x140066547
mov eax, 0xa
jmp 0x14006703c
mov rax, qword [rsp + 0x240]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140066668
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
call fcn.140066340
mov dword [rsp + 0x74], eax
mov dword [rsp + 0x78], 0
jmp 0x14006658b
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 5
jae 0x140066655
mov qword [rsp + 0x1c8], 0xffffffffffffffff
mov eax, dword [rsp + 0x78]
mov ecx, 1
mov dword [rsp + 0x210], ecx
movzx ecx, al
mov eax, dword [rsp + 0x210]
shl eax, cl
mov ecx, dword [rsp + 0x74]
and ecx, eax
mov eax, ecx
test eax, eax
je 0x1400665f1
mov eax, dword [rsp + 0x78]
cmp qword [rsp + rax*8 + 0x48], 0xffffffffffffffff
jae 0x1400665f1
mov eax, dword [rsp + 0x7c]
inc eax
mov dword [rsp + 0x7c], eax
mov eax, dword [rsp + 0x78]
mov rax, qword [rsp + rax*8 + 0x48]
mov qword [rsp + 0x1c8], rax
mov eax, dword [rsp + 0x78]
add eax, 0x10
mov ecx, 1
mov dword [rsp + 0x214], ecx
movzx ecx, al
mov eax, dword [rsp + 0x214]
shl eax, cl
mov ecx, dword [rsp + 0x74]
and ecx, eax
mov eax, ecx
test eax, eax
je 0x140066643
mov eax, dword [rsp + 0x78]
cmp qword [rsp + rax*8 + 0x48], 0xffffffffffffffff
jae 0x140066643
mov eax, dword [rsp + 0x7c]
inc eax
mov dword [rsp + 0x7c], eax
mov eax, dword [rsp + 0x78]
mov rax, qword [rsp + rax*8 + 0x48]
mov qword [rsp + 0x1c8], rax
cmp qword [rsp + 0x1c8], 0xffffffffffffffff
jne 0x140066650
jmp 0x140066655
jmp 0x140066581
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
jmp 0x140066558
lea rdx, [rsp + 0x94]
mov rcx, qword [rsp + 0x240]
call fcn.140065200
cmp dword [rsp + 0x94], 0
jl 0x1400666a5
mov eax, dword [rsp + 0x258]
cmp dword [rsp + 0x94], eax
jge 0x1400666a5
mov eax, dword [rsp + 0x94]
mov dword [rsp + 0x258], eax
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x80], eax
mov eax, dword [rsp + 0x250]
mov ecx, dword [rsp + 0x7c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x7c], eax
movzx eax, byte [rsp + 0x270]
test eax, eax
je 0x1400666d9
mov eax, dword [rsp + 0x7c]
inc eax
mov dword [rsp + 0x7c], eax
cmp dword [rsp + 0x7c], 0xa
jbe 0x140066716
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov rcx, rax
call qword [section..data]
mov qword [rsp + 0x168], rax
cmp qword [rsp + 0x168], 0
jne 0x14006670e
mov eax, 3
jmp 0x14006703c
mov byte [rsp + 0x170], 1
mov dword [rsp + 0x7c], 0
cmp dword [rsp + 0x80], 0
je 0x14006694d
mov rax, qword [rsp + 0x240]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x14006694d
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
call fcn.140066340
mov dword [rsp + 0x74], eax
mov dword [rsp + 0x78], 0
jmp 0x140066770
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 5
jae 0x14006693a
mov qword [rsp + 0x1d0], 0xffffffffffffffff
mov dword [rsp + 0x1d8], 0
mov eax, dword [rsp + 0x78]
mov ecx, 1
mov dword [rsp + 0x218], ecx
movzx ecx, al
mov eax, dword [rsp + 0x218]
shl eax, cl
mov ecx, dword [rsp + 0x74]
and ecx, eax
mov eax, ecx
test eax, eax
je 0x140066828
mov eax, dword [rsp + 0x78]
cmp qword [rsp + rax*8 + 0x48], 0xffffffffffffffff
jae 0x140066828
mov eax, dword [rsp + 0x78]
mov rax, qword [rsp + rax*8 + 0x48]
mov qword [rsp + 0x1d0], rax
mov eax, dword [rsp + 0x1d8]
or eax, 0x29
mov dword [rsp + 0x1d8], eax
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x168]
mov rdx, qword [rsp + 0x1d0]
mov qword [rcx + rax], rdx
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov ecx, 0x300
mov rdx, qword [rsp + 0x168]
mov word [rdx + rax + 8], cx
mov eax, dword [rsp + 0x7c]
inc eax
mov dword [rsp + 0x7c], eax
mov eax, dword [rsp + 0x78]
add eax, 0x10
mov ecx, 1
mov dword [rsp + 0x21c], ecx
movzx ecx, al
mov eax, dword [rsp + 0x21c]
shl eax, cl
mov ecx, dword [rsp + 0x74]
and ecx, eax
mov eax, ecx
test eax, eax
je 0x1400668db
mov eax, dword [rsp + 0x78]
cmp qword [rsp + rax*8 + 0x48], 0xffffffffffffffff
jae 0x1400668db
mov eax, dword [rsp + 0x78]
mov rax, qword [rsp + rax*8 + 0x48]
mov qword [rsp + 0x1d0], rax
mov eax, dword [rsp + 0x1d8]
or eax, 0x32
mov dword [rsp + 0x1d8], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x1d0]
call qword [sym.imp.WS2_32.dll_send]
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x168]
mov rdx, qword [rsp + 0x1d0]
mov qword [rcx + rax], rdx
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov ecx, reloc.WS2_32.dll_recv
mov rdx, qword [rsp + 0x168]
mov word [rdx + rax + 8], cx
mov eax, dword [rsp + 0x7c]
inc eax
mov dword [rsp + 0x7c], eax
cmp qword [rsp + 0x1d0], 0xffffffffffffffff
jne 0x1400668e8
jmp 0x14006693a
mov r8d, dword [rsp + 0x1d8]
mov rax, qword [rsp + 0x240]
mov rdx, qword [rax + 0x178]
mov rcx, qword [rsp + 0x1d0]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x140066935
movzx eax, byte [rsp + 0x170]
test eax, eax
je 0x14006692b
mov rcx, qword [rsp + 0x168]
call qword [fcn.1401020f8]
mov eax, 4
jmp 0x14006703c
jmp 0x140066766
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
jmp 0x14006673d
mov dword [rsp + 0x78], 0
jmp 0x140066961
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x250]
cmp dword [rsp + 0x78], eax
jae 0x140066bab
mov dword [rsp + 0x1dc], 0
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movsx eax, word [rcx + rax + 8]
and eax, 1
test eax, eax
je 0x1400669aa
mov eax, dword [rsp + 0x1dc]
or eax, 0x29
mov dword [rsp + 0x1dc], eax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movsx eax, word [rcx + rax + 8]
and eax, 2
test eax, eax
je 0x1400669d7
mov eax, dword [rsp + 0x1dc]
or eax, 4
mov dword [rsp + 0x1dc], eax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movsx eax, word [rcx + rax + 8]
and eax, 4
test eax, eax
je 0x140066a26
mov eax, dword [rsp + 0x1dc]
or eax, 0x32
mov dword [rsp + 0x1dc], eax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x248]
mov rcx, qword [rcx + rax]
call qword [sym.imp.WS2_32.dll_send]
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov r8d, dword [rsp + 0x1dc]
mov rcx, qword [rsp + 0x240]
mov rdx, qword [rcx + 0x178]
mov rcx, qword [rsp + 0x248]
mov rcx, qword [rcx + rax]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x140066a7f
movzx eax, byte [rsp + 0x170]
test eax, eax
je 0x140066a75
mov rcx, qword [rsp + 0x168]
call qword [fcn.1401020f8]
mov eax, 4
jmp 0x14006703c
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov ecx, dword [rsp + 0x7c]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x168]
mov r8, qword [rsp + 0x248]
mov rax, qword [r8 + rax]
mov qword [rdx + rcx], rax
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
xor ecx, ecx
mov rdx, qword [rsp + 0x168]
mov word [rdx + rax + 8], cx
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movsx eax, word [rcx + rax + 8]
and eax, 1
test eax, eax
je 0x140066b09
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x168]
movsx eax, word [rcx + rax + 8]
or eax, 0x300
mov ecx, dword [rsp + 0x7c]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x168]
mov word [rdx + rcx + 8], ax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movsx eax, word [rcx + rax + 8]
and eax, 2
test eax, eax
je 0x140066b53
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x168]
movsx eax, word [rcx + rax + 8]
bts eax, 0xa
mov ecx, dword [rsp + 0x7c]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x168]
mov word [rdx + rcx + 8], ax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movsx eax, word [rcx + rax + 8]
and eax, 4
test eax, eax
je 0x140066b9c
mov eax, dword [rsp + 0x7c]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x168]
movsx eax, word [rcx + rax + 8]
or eax, 0x10
mov ecx, dword [rsp + 0x7c]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x168]
mov word [rdx + rcx + 8], ax
mov eax, dword [rsp + 0x7c]
inc eax
mov dword [rsp + 0x7c], eax
jmp 0x140066957
cmp dword [rsp + 0x7c], 0
jne 0x140066bc2
movzx eax, byte [rsp + 0x270]
test eax, eax
je 0x140066f67
cmp dword [rsp + 0x7c], 0
je 0x140066be6
xor r8d, r8d
mov edx, dword [rsp + 0x7c]
mov rcx, qword [rsp + 0x168]
call fcn.14009ee30
mov dword [rsp + 0x1e0], eax
jmp 0x140066bf1
mov dword [rsp + 0x1e0], 0
cmp dword [rsp + 0x1e0], 0
jg 0x140066c2a
mov rax, qword [rsp + 0x240]
add rax, 0x178
mov dword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x258]
xor r8d, r8d
mov rdx, rax
mov ecx, 1
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp dword [rsp + 0x1e0], 0
jle 0x140066c42
mov eax, dword [rsp + 0x1e0]
mov dword [rsp + 0xa4], eax
mov dword [rsp + 0x78], 0
jmp 0x140066c56
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x250]
cmp dword [rsp + 0x78], eax
jae 0x140066e27
mov eax, dword [rsp + 0x78]
mov ecx, dword [rsp + 0x80]
add ecx, eax
mov eax, ecx
mov eax, eax
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x168]
movsx eax, word [rcx + rax + 0xa]
mov dword [rsp + 0x1e4], eax
xor eax, eax
mov word [rsp + 0x1e8], ax
mov dword [rsp + 0x188], 0
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
lea r8, [rsp + 0x188]
xor edx, edx
mov rcx, qword [rsp + 0x248]
mov rcx, qword [rcx + rax]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x140066d63
mov eax, dword [rsp + 0x188]
and eax, 0x29
test eax, eax
je 0x140066cf2
movzx eax, word [rsp + 0x1e8]
or eax, 1
mov word [rsp + 0x1e8], ax
mov eax, dword [rsp + 0x188]
and eax, 0x32
test eax, eax
je 0x140066d13
movzx eax, word [rsp + 0x1e8]
or eax, 4
mov word [rsp + 0x1e8], ax
mov eax, dword [rsp + 0x188]
and eax, 4
test eax, eax
je 0x140066d34
movzx eax, word [rsp + 0x1e8]
or eax, 2
mov word [rsp + 0x1e8], ax
cmp qword [rsp + 0x260], 0
je 0x140066d63
cmp dword [rsp + 0x1e0], 0
jg 0x140066d63
cmp dword [rsp + 0x188], 0
je 0x140066d63
mov eax, dword [rsp + 0xa4]
inc eax
mov dword [rsp + 0xa4], eax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
xor r8d, r8d
mov rcx, qword [rsp + 0x240]
mov rdx, qword [rcx + 0x178]
mov rcx, qword [rsp + 0x248]
mov rcx, qword [rcx + rax]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp dword [rsp + 0x1e0], 0
jg 0x140066d9e
jmp 0x140066c4c
mov eax, dword [rsp + 0x1e4]
and eax, 0x300
test eax, eax
je 0x140066dc1
movzx eax, word [rsp + 0x1e8]
or eax, 1
mov word [rsp + 0x1e8], ax
mov eax, dword [rsp + 0x1e4]
and eax, 0x10
test eax, eax
je 0x140066de2
movzx eax, word [rsp + 0x1e8]
or eax, 4
mov word [rsp + 0x1e8], ax
mov eax, dword [rsp + 0x1e4]
and eax, 0x400
test eax, eax
je 0x140066e05
movzx eax, word [rsp + 0x1e8]
or eax, 2
mov word [rsp + 0x1e8], ax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x248]
movzx edx, word [rsp + 0x1e8]
mov word [rcx + rax + 0xa], dx
jmp 0x140066c4c
cmp dword [rsp + 0x80], 0
je 0x140066f52
mov rax, qword [rsp + 0x240]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140066f52
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
call fcn.140066340
mov dword [rsp + 0x74], eax
mov dword [rsp + 0x78], 0
jmp 0x140066e79
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 5
jae 0x140066f3f
mov eax, dword [rsp + 0x78]
mov ecx, 1
mov dword [rsp + 0x220], ecx
movzx ecx, al
mov eax, dword [rsp + 0x220]
shl eax, cl
mov ecx, dword [rsp + 0x78]
add ecx, 0x10
mov edx, 1
shl edx, cl
mov ecx, edx
or eax, ecx
mov ecx, dword [rsp + 0x74]
and ecx, eax
mov eax, ecx
test eax, eax
je 0x140066f38
mov dword [rsp + 0x188], 0
mov eax, dword [rsp + 0x78]
lea r8, [rsp + 0x188]
xor edx, edx
mov rcx, qword [rsp + rax*8 + 0x48]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x140066f15
cmp qword [rsp + 0x260], 0
je 0x140066f15
cmp dword [rsp + 0x1e0], 0
jg 0x140066f15
cmp dword [rsp + 0x188], 0
je 0x140066f15
mov eax, dword [rsp + 0xa4]
inc eax
mov dword [rsp + 0xa4], eax
mov eax, dword [rsp + 0x78]
xor r8d, r8d
mov rcx, qword [rsp + 0x240]
mov rdx, qword [rcx + 0x178]
mov rcx, qword [rsp + rax*8 + 0x48]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x140066f3a
jmp 0x140066f3f
jmp 0x140066e6f
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
jmp 0x140066e46
mov rax, qword [rsp + 0x240]
mov rcx, qword [rax + 0x178]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
movzx eax, byte [rsp + 0x170]
test eax, eax
je 0x140066f81
mov rcx, qword [rsp + 0x168]
call qword [fcn.1401020f8]
cmp qword [rsp + 0x260], 0
je 0x140066f9d
mov rax, qword [rsp + 0x260]
mov ecx, dword [rsp + 0xa4]
mov dword [rax], ecx
movzx eax, byte [rsp + 0x268]
test eax, eax
je 0x14006703a
cmp dword [rsp + 0x7c], 0
jne 0x14006703a
movzx eax, byte [rsp + 0x270]
test eax, eax
jne 0x14006703a
mov dword [rsp + 0x1f4], 0
lea rdx, [rsp + 0x1f4]
mov rcx, qword [rsp + 0x240]
call fcn.140063610
test eax, eax
jne 0x14006703a
cmp dword [rsp + 0x1f4], 0
je 0x14006703a
mov eax, dword [rsp + 0x258]
cmp dword [rsp + 0x1f4], eax
jle 0x140067012
mov eax, dword [rsp + 0x258]
mov dword [rsp + 0x1f4], eax
jmp 0x14006702a
cmp dword [rsp + 0x1f4], 0
jge 0x14006702a
mov eax, dword [rsp + 0x258]
mov dword [rsp + 0x1f4], eax
movsxd rax, dword [rsp + 0x1f4]
mov rcx, rax
call fcn.14009f640
xor eax, eax
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_getpeername
call fcn.1400f66ec
mov rax, rdi
mov rcx, qword [rsp + 0x228]
xor rcx, rsp
call fcn.1400f5cb0
add rsp, 0x230
pop rdi
ret