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

Disassembly:
sub esp, 0xcc
mov eax, dword [0x4a237c]
xor eax, esp
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xd4]
push ebp
push esi
xor ebp, ebp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xe8]
lea esi, [esp + 0x80]
push edi
mov edi, dword [esp + 0xdc]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x20], esi
mov byte [esp + 0xf], 0
test edi, edi
je 0x40d5f3
cmp dword [edi], 0xbab1e
jne 0x40d5f3
cmp byte [edi + 0xeb], 0
je 0x40cf9a
pop edi
pop esi
lea eax, [ebp + 8]
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0045a753
add esp, 0xcc
ret
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x34], eax
test eax, eax
jns 0x40cfc6
pop edi
pop esi
mov eax, 0xa
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0045a753
add esp, 0xcc
ret
push ebx
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x40d032
nop
lea eax, [esp + 0x74]
push eax
push ebx
call fcn.0040b7c0
add esp, 8
mov edi, eax
xor edx, edx
mov eax, 1
or esi, 0xffffffff
test edi, eax
je 0x40cffa
mov ecx, dword [esp + edx*4 + 0x74]
cmp ecx, 0xffffffff
jae 0x40cffa
inc ebp
mov esi, ecx
mov ecx, eax
rol ecx, 0x10
test edi, ecx
je 0x40d00f
mov ecx, dword [esp + edx*4 + 0x74]
cmp ecx, 0xffffffff
jae 0x40d00f
inc ebp
mov esi, ecx
cmp esi, 0xffffffff
je 0x40d01c
inc edx
rol eax, 1
cmp edx, 5
jb 0x40cfe7
mov ebx, dword [ebx + 4]
mov dword [esp + 0x40], ebp
test ebx, ebx
jne 0x40cfd0
mov edi, dword [esp + 0x20]
lea esi, [esp + 0x88]
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0040ce00
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
js 0x40d055
mov ecx, dword [esp + 0x38]
cmp eax, ecx
cmovl ecx, eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0xe8]
add eax, ebp
cmp byte [esp + 0xf8], 0
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x40d0ad
lea eax, [ecx*8]
push eax
call dword [section..data]
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
jne 0x40d0a8
lea eax, [esi + 3]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0045a753
add esp, 0xcc
ret
mov byte [esp + 0x13], 1
mov eax, dword [sym.imp.WS2_32.dll_WSAEventSelect]
xor edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x34], eax
test ebp, ebp
je 0x40d1d9
mov eax, dword [edi + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40d1d9
lea ecx, [esp + 0x74]
push ecx
push eax
call fcn.0040b7c0
add esp, 8
mov dword [esp + 0x28], eax
xor edi, edi
mov edx, 1
mov ecx, edi
shl edx, cl
or esi, 0xffffffff
xor ebx, ebx
test eax, edx
mov edx, dword [esp + 0x1c]
je 0x40d123
mov eax, dword [esp + edi*4 + 0x74]
cmp eax, 0xffffffff
jae 0x40d123
mov esi, eax
mov ecx, 0x300
mov eax, dword [esp + 0x24]
mov ebx, 0x29
mov dword [eax + edx*8], esi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [esp + 0x1c], edx
lea ecx, [edi + 0x10]
mov eax, 1
shl eax, cl
test dword [esp + 0x28], eax
je 0x40d193
mov eax, dword [esp + edi*4 + 0x74]
cmp eax, 0xffffffff
jae 0x40d193
mov esi, eax
mov dword [esp + 0x18], 4
lea eax, [esp + 0x18]
or ebx, 0x32
push eax
lea eax, [esp + 0x30]
push eax
push 0x1008
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40d179
cmp dword [esp + 0x2c], 1
jne 0x40d179
push eax
push eax
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [esp + 0x1c]
mov ecx, 0x10
mov eax, dword [esp + 0x24]
mov dword [eax + edx*8], esi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [esp + 0x1c], edx
cmp esi, 0xffffffff
je 0x40d1c2
mov eax, dword [esp + 0x20]
push ebx
push dword [eax + 0xe4]
push esi
call dword [esp + 0x40]
test eax, eax
jne 0x40d3ec
mov eax, dword [esp + 0x28]
inc edi
cmp edi, 5
jb 0x40d0e7
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40d0d3
mov esi, dword [esp + 0x24]
cmp dword [esp + 0xe8], 0
mov dword [esp + 0x14], 0
jbe 0x40d2ef
lea edi, [esi + 4]
mov esi, dword [esp + 0x3c]
lea edi, [edi + edx*8]
add esi, 4
nop dword [eax]
movzx edx, word [esi]
mov al, dl
and al, 1
movzx ecx, al
mov al, dl
neg ecx
sbb ecx, ecx
and ecx, 0x29
mov ebx, ecx
or ebx, 4
and al, 2
cmove ebx, ecx
test dl, 4
je 0x40d267
mov eax, dword [esi - 4]
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], eax
push ecx
push 0x1008
push 0xffff
push eax
or ebx, 0x32
mov dword [esp + 0x40], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40d267
cmp dword [esp + 0x18], 1
jne 0x40d267
push eax
push eax
push eax
push dword [esp + 0x34]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [esp + 0x20]
push ebx
push dword [eax + 0xe4]
push dword [esi - 4]
call dword [esp + 0x40]
test eax, eax
jne 0x40d3ec
mov eax, dword [esi - 4]
xor ecx, ecx
mov dword [edi - 4], eax
xor eax, eax
mov word [edi], ax
movzx eax, word [esi]
mov edx, eax
test al, 1
je 0x40d2a4
mov eax, 0x300
mov word [edi], ax
mov ecx, eax
movzx edx, word [esi]
movzx eax, dx
movzx edx, cx
mov ebx, eax
test al, 2
je 0x40d2bf
or ecx, 0x400
mov word [edi], cx
movzx ebx, word [esi]
movzx edx, cx
test bl, 4
je 0x40d2ca
or edx, 0x10
mov word [edi], dx
mov eax, dword [esp + 0x14]
add edi, 8
mov edx, dword [esp + 0x1c]
inc eax
inc edx
mov dword [esp + 0x14], eax
add esi, 8
mov dword [esp + 0x1c], edx
cmp eax, dword [esp + 0xe8]
jb 0x40d200
test edx, edx
jne 0x40d40a
cmp byte [esp + 0xf8], dl
je 0x40d55f
mov esi, dword [esp + 0x24]
xor ebx, ebx
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x20]
push 0
push dword [esp + 0x3c]
add eax, 0xe4
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov ecx, dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
xor edi, edi
mov dword [esp + 0x18], ecx
cmp dword [esp + 0xe8], edi
jbe 0x40d4af
lea eax, [ebp*8 + 6]
add eax, esi
mov dword [esp + 0x2c], eax
mov ebp, eax
movsx eax, word [ebp]
lea edx, [esp + 0x48]
mov dword [esp + 0x14], eax
xor esi, esi
mov eax, dword [esp + 0x3c]
push edx
push esi
mov dword [esp + 0x50], esi
mov eax, dword [eax + edi*8]
push eax
mov dword [esp + 0x38], eax
call ecx
test eax, eax
jne 0x40d3cc
mov ecx, dword [esp + 0x48]
mov eax, esi
test cl, 0x29
mov ebx, ecx
setne al
movzx edx, ax
mov eax, edx
or eax, 4
and bl, 0x32
mov ebx, dword [esp + 0x48]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and bl, 4
mov ebx, dword [esp + 0x28]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [esp + 0x44], 0
movzx eax, cx
mov esi, eax
je 0x40d3cc
test ebx, ebx
jne 0x40d3cc
cmp dword [esp + 0x48], ebx
je 0x40d3cc
inc dword [esp + 0x30]
mov eax, dword [esp + 0x20]
push 0
push dword [eax + 0xe4]
push dword [esp + 0x34]
call dword [esp + 0x40]
test ebx, ebx
jne 0x40d43f
movzx eax, si
jmp 0x40d48d
cmp byte [esp + 0x13], 0
je 0x40d400
push dword [esp + 0x24]
call dword [0x4a2004]
add esp, 4
mov eax, 4
jmp 0x40d08f
mov esi, dword [esp + 0x24]
push 0
push 0
push edx
push esi
call fcn.00429d90
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x28], ebx
test ebx, ebx
jns 0x40d430
mov eax, 0xc
jmp 0x40d08f
jle 0x40d30e
mov dword [esp + 0x30], ebx
jmp 0x40d328
mov edx, dword [esp + 0x14]
mov eax, esi
or eax, 1
and edx, 0x300
movzx ecx, ax
movzx eax, si
mov esi, dword [esp + 0x14]
cmove ecx, eax
movzx edx, cx
mov ebx, esi
mov eax, edx
or eax, 4
and bl, 0x10
mov ebx, dword [esp + 0x28]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and esi, 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx eax, cx
mov ecx, dword [esp + 0x3c]
add ebp, 8
mov word [ecx + edi*8 + 6], ax
inc edi
mov ecx, dword [esp + 0x18]
cmp edi, dword [esp + 0xe8]
jb 0x40d350
mov ebp, dword [esp + 0x40]
test ebp, ebp
je 0x40d54d
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40d54d
nop word [eax + eax]
lea ecx, [esp + 0x74]
push ecx
push eax
call fcn.0040b7c0
add esp, 8
mov ebp, eax
xor esi, esi
mov edi, 1
lea ecx, [esi + 0x10]
mov edx, edi
bts edx, ecx
test ebp, edx
je 0x40d53e
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0
push eax
push 0
push dword [esp + esi*4 + 0x7c]
call dword [esp + 0x24]
test eax, eax
jne 0x40d522
cmp dword [esp + 0x44], eax
je 0x40d522
test ebx, ebx
jne 0x40d522
cmp dword [esp + 0x48], ebx
je 0x40d522
inc dword [esp + 0x30]
mov eax, dword [esp + 0x20]
push 0
push dword [eax + 0xe4]
push dword [esp + esi*4 + 0x7c]
call dword [esp + 0x40]
inc esi
rol edi, 1
cmp esi, 5
jb 0x40d4e7
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40d4d0
mov ebx, dword [esp + 0x20]
push dword [ebx + 0xe4]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
jmp 0x40d563
mov ebx, dword [esp + 0x20]
cmp byte [esp + 0x13], 0
je 0x40d577
push dword [esp + 0x24]
call dword [0x4a2004]
add esp, 4
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x40d585
mov eax, dword [esp + 0x30]
mov dword [ecx], eax
cmp byte [esp + 0xf4], 0
je 0x40d5ec
cmp dword [esp + 0x1c], 0
jne 0x40d5ec
cmp byte [esp + 0xf8], 0
jne 0x40d5ec
cmp dword [ebx], 0xbab1e
mov dword [esp + 0x18], 0
jne 0x40d5ec
cmp byte [ebx + 0xeb], 0
jne 0x40d5ec
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040ce00
add esp, 8
test eax, eax
jne 0x40d5ec
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d5ec
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jg 0x40d5df
test eax, eax
jns 0x40d5e1
mov eax, ecx
cdq
push edx
push eax
call fcn.0042a2b0
add esp, 8
xor eax, eax
jmp 0x40d08f
mov ecx, dword [esp + 0xd4]
mov eax, 1
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0045a753
add esp, 0xcc
ret