Function at 0x40e350
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, dword [esp + 0x44]
push edi
xor ebp, ebp
mov edi, dword [esi + 0xa0]
mov dword [esp + 0x1c], ebp
cmp edi, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
jne 0x40e38d
mov edi, dword [esi + 0x10]
sub edi, 6
neg edi
sbb edi, edi
and edi, 0xffffd000
add edi, 0x4000
cmp dword [esi + 0x10], 6
jne 0x40e39c
lea eax, [edi - 1]
mov dword [esp + 0x20], eax
jmp 0x40e3a0
mov dword [esp + 0x20], ebp
mov eax, dword [esi + 0xd4]
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
cmp eax, ebp
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edx
jne 0x40e3ea
cmp dword [esi + 0x84], ebp
jne 0x40e3ea
push edi
call fcn.00415de0
add esp, 4
cmp eax, ebp
mov dword [esi + 0x84], eax
je 0x40e3dd
cmp edi, ebp
mov dword [esi + 0x9c], edi
jne 0x40e3ea
pop edi
pop esi
pop ebp
mov eax, 0x15
pop ebx
add esp, 0x34
ret
cmp dword [esi + 0xd8], ebp
jne 0x40e424
cmp dword [esi + 0x80], ebp
jne 0x40e424
push edi
call fcn.00415de0
add esp, 4
cmp eax, ebp
mov dword [esi + 0x80], eax
je 0x40e417
cmp edi, ebp
mov dword [esi + 0x98], edi
jne 0x40e424
pop edi
pop esi
pop ebp
mov eax, 0x15
pop ebx
add esp, 0x34
ret
mov eax, dword [esi + 0x14c]
mov dword [esp + 0x48], 0x10
cmp eax, ebp
je 0x40e442
cmp dword [esi + 0xcc], eax
jae 0x40e949
mov eax, dword [esi + 0x8c]
mov ecx, dword [esi + 0x94]
cmp eax, ecx
mov word [esp + 0x30], bp
mov word [esp + 0x28], bp
jbe 0x40e46b
cmp dword [esi + 0xd4], ebp
jne 0x40e46b
mov word [esp + 0x28], 2
mov edx, dword [esi + 0x9c]
mov ecx, dword [esp + 0x20]
sub edx, eax
cmp edx, ecx
jbe 0x40e48a
cmp dword [esi + 0xd4], ebp
jne 0x40e48a
mov word [esp + 0x30], 1
mov eax, dword [esi + 0x88]
mov edx, dword [esi + 0x90]
cmp eax, edx
jbe 0x40e4a7
cmp dword [esi + 0xd8], ebp
jne 0x40e4a7
or byte [esp + 0x30], 2
mov edx, dword [esi + 0x98]
sub edx, eax
cmp edx, ecx
jbe 0x40e4ce
cmp dword [esi + 0xd8], ebp
jne 0x40e4ce
cmp dword [esi + 0xd0], ebp
je 0x40e4c9
cmp dword [esi + 0x10], 6
je 0x40e4ce
or byte [esp + 0x28], 1
mov eax, dword [esp + 0x4c]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ebx, [eax + eax*4]
lea eax, [esp + 0x24]
shl ebx, 3
push ebx
push 2
push eax
call fcn.0040ef30
mov edi, eax
add esp, 0xc
cmp edi, ebp
jge 0x40e516
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40e807
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40e807
cmp edi, 1
jl 0x40e956
mov al, byte [esp + 0x2a]
test al, 0x38
jne 0x40e9c2
test byte [esp + 0x32], 0x38
jne 0x40e9c2
test al, 2
je 0x40e60e
mov eax, dword [esi + 0x20]
cmp eax, ebp
je 0x40e55f
mov ecx, dword [esi + 0x8c]
mov edx, dword [esi + 0x94]
sub ecx, edx
push ebp
push ecx
push esi
call eax
add esp, 0xc
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esi + 0x94]
push edx
mov edx, dword [esi + 0x8c]
lea ecx, [esi + 0xa4]
sub edx, eax
push ecx
mov ecx, dword [esi + 0x84]
push ebp
push edx
mov edx, dword [esi + 0x30]
add ecx, eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, ebp
jge 0x40e5a8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40e967
jmp 0x40e807
mov ecx, dword [esi + 0x94]
mov edi, dword [esi + 0xcc]
mov edx, dword [esp + 0x18]
add ecx, eax
add edi, eax
add edx, eax
mov eax, dword [esi + 0x8c]
mov dword [esi + 0x94], ecx
cmp ecx, eax
mov dword [esi + 0xcc], edi
mov dword [esp + 0x18], edx
jne 0x40e5e4
mov dword [esi + 0x8c], ebp
mov dword [esi + 0x94], ebp
mov eax, dword [esi + 0xd8]
cmp eax, ebp
je 0x40e5f8
cmp eax, dword [esp + 0x18]
jle 0x40e974
cmp dword [esi + 0x10], 6
jne 0x40e60e
cmp dword [esi + 0xd0], ebp
je 0x40e60e
mov dword [esp + 0x14], 1
test byte [esp + 0x32], 2
je 0x40e6db
mov eax, dword [esi + 0x20]
cmp eax, ebp
je 0x40e642
mov ecx, dword [esi + 0x88]
mov edi, dword [esi + 0x90]
sub ecx, edi
push ecx
push ebp
push esi
call eax
mov ecx, dword [esp + 0x1c]
add esp, 0xc
cmp eax, ecx
jle 0x40e642
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esi + 0x90]
push edx
mov edx, dword [esi + 0x88]
lea ecx, [esi + 0xb4]
sub edx, eax
push ecx
mov ecx, dword [esi + 0x80]
push ebp
push edx
mov edx, dword [esi + 0x34]
add ecx, eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, ebp
jge 0x40e68b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40e981
jmp 0x40e807
mov ecx, dword [esi + 0x90]
mov edi, dword [esp + 0x1c]
mov edx, dword [esi + 0xc8]
add ecx, eax
add edi, eax
add edx, eax
mov eax, dword [esi + 0x88]
mov dword [esi + 0x90], ecx
cmp ecx, eax
mov dword [esp + 0x1c], edi
mov dword [esi + 0xc8], edx
jne 0x40e6c7
mov dword [esi + 0x88], ebp
mov dword [esi + 0x90], ebp
mov eax, dword [esi + 0xd4]
cmp eax, ebp
je 0x40e6db
cmp eax, dword [esp + 0x1c]
jle 0x40e98e
test byte [esp + 0x2a], 1
je 0x40e75d
mov eax, dword [esi + 0x88]
lea ecx, [esp + 0x48]
lea edx, [esi + 0xa4]
push ecx
mov ecx, dword [esi + 0x98]
push edx
mov edx, dword [esi + 0x80]
sub ecx, eax
push ebp
add edx, eax
mov eax, dword [esi + 0x30]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
cmp edi, ebp
jne 0x40e744
mov ecx, dword [esi + 0x30]
push 2
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi + 0x30]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esp + 0x14], 1
mov dword [esi + 0x30], eax
mov dword [esp + 0x24], eax
jmp 0x40e7ec
jge 0x40e757
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40e99b
add dword [esi + 0x88], edi
cmp dword [esp + 0x14], ebp
jne 0x40e7ec
test byte [esp + 0x32], 1
je 0x40e7ec
mov eax, dword [esi + 0x8c]
lea ecx, [esp + 0x48]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esi + 0x9c]
push edx
mov edx, dword [esi + 0x84]
sub ecx, eax
push ebp
add edx, eax
mov eax, dword [esi + 0x34]
push ecx
push edx
push eax
mov dword [esp + 0x60], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
cmp edi, ebp
jne 0x40e7d3
mov ecx, dword [esi + 0x34]
push 2
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi + 0x34]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esp + 0x14], 2
mov dword [esi + 0x34], eax
mov dword [esp + 0x2c], eax
jmp 0x40e7ec
jge 0x40e7e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40e9a8
add dword [esi + 0x8c], edi
mov eax, dword [esp + 0x10]
cmp eax, ebp
jle 0x40e807
cmp eax, ebx
jg 0x40e9b5
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x10], ebp
cmp dword [esp + 0x14], ebp
je 0x40e424
cmp dword [esi + 0xd4], ebp
jne 0x40e8a8
mov eax, dword [esi + 0x8c]
mov edx, dword [esi + 0x94]
cmp eax, edx
jbe 0x40e8a8
mov edi, dword [esi + 0x30]
cmp edi, 0xffffffff
je 0x40e8a8
mov ecx, dword [0x426a60]
sub eax, edx
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
shl ecx, 3
push ecx
push eax
mov eax, dword [esi + 0x84]
lea ecx, [esi + 0xa4]
add eax, edx
push eax
push ecx
push edi
call fcn.0040eaa0
add esp, 0x14
cmp eax, ebp
jle 0x40e8a8
mov edi, dword [esi + 0x94]
mov edx, dword [esi + 0xcc]
add edi, eax
add edx, eax
mov eax, dword [esi + 0x8c]
mov ecx, edi
cmp ecx, eax
mov dword [esi + 0x94], edi
mov dword [esi + 0xcc], edx
jne 0x40e89c
mov dword [esi + 0x8c], ebp
mov dword [esi + 0x94], ebp
cmp dword [esi + 0xd4], ebp
je 0x40e81d
cmp dword [esi + 0xd8], ebp
jne 0x40e93f
mov eax, dword [esi + 0x88]
mov edx, dword [esi + 0x90]
cmp eax, edx
jbe 0x40e93f
mov edi, dword [esi + 0x34]
cmp edi, 0xffffffff
je 0x40e93f
mov ecx, dword [0x426a60]
sub eax, edx
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
shl ecx, 3
push ecx
push eax
mov eax, dword [esi + 0x80]
lea ecx, [esi + 0xb4]
add eax, edx
push eax
push ecx
push edi
call fcn.0040eaa0
add esp, 0x14
cmp eax, ebp
jle 0x40e93f
mov edi, dword [esi + 0x90]
mov edx, dword [esi + 0xc8]
add edi, eax
add edx, eax
mov eax, dword [esi + 0x88]
mov ecx, edi
cmp eax, ecx
mov dword [esi + 0x90], edi
mov dword [esi + 0xc8], edx
jne 0x40e933
mov dword [esi + 0x90], ebp
mov dword [esi + 0x88], ebp
cmp dword [esi + 0xd8], ebp
je 0x40e8b4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x34
ret
mov eax, edi
pop edi
neg eax
sbb eax, eax
pop esi
pop ebp
add eax, 0x5c
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x60
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x62
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x61
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x63
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x5e
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x5d
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x5f
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x5a
pop ebx
add esp, 0x34
ret