Function at 0x40e5e0
Capabilities:
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84c
mov eax, dword [0x4a4300]
xor eax, esp
mov dword [esp + 0x848], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [esp + 0x10], ecx
push 0x3ff
lea eax, [esp + 0x55]
mov dword [esp + 0x18], ebx
mov esi, edx
mov dword [esp + 0x1c], ebx
push ebx
push eax
mov dword [esp + 0x18], esi
xor edi, edi
mov byte [esp + 0x5c], bl
call fcn.004523e0
add esp, 0xc
mov byte [esp + 0x450], bl
lea eax, [esp + 0x451]
push 0x3ff
push ebx
push eax
call fcn.004523e0
xor eax, eax
mov dword [esp + 0x30], 0x10
add esp, 0xc
mov word [esp + 0x28], ax
mov dword [esp + 0x32], eax
xorps xmm0, xmm0
mov word [esp + 0x36], ax
mov word [esp + 0x38], ax
mov dword [esp + 0x42], eax
mov word [esp + 0x46], ax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x2c]
movq qword [esp + 0x2e], xmm0
push eax
push dword [esp + 0x18]
movq qword [esp + 0x46], xmm0
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40e775
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x10
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x40e775
cmp dword [esp + 0x10], ebx
je 0x40e775
test esi, esi
je 0x40e775
mov esi, dword [sym.imp.WS2_32.dll_WSACreateEvent]
call esi
mov dword [esp + 0x20], eax
test eax, eax
je 0x40e775
call esi
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40e75e
mov esi, dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0x23
push dword [esp + 0x24]
push dword [esp + 0x18]
call esi
cmp eax, 0xffffffff
je 0x40e75e
push 0x23
push dword [esp + 0x20]
push dword [esp + 0x14]
call esi
cmp eax, 0xffffffff
je 0x40e75e
mov eax, dword [esp + 0x20]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x4c], eax
mov esi, dword [esp + 0xc]
mov ecx, dword [sym.imp.WS2_32.dll_recv]
mov edi, edi
test edi, edi
jne 0x40e81d
push 2
push 2
lea eax, [esp + 0x58]
push eax
push esi
call ecx
test eax, eax
je 0x40e75e
cmp eax, 0xffffffff
jne 0x40e78a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40e817
push dword [esp + 0x20]
mov esi, dword [sym.imp.WS2_32.dll_WSACloseEvent]
call esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40e775
push eax
call esi
mov ecx, dword [esp + 0x854]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004516e1
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40e817
mov eax, dword [esp + 0x50]
mov ecx, 0x3fb
add eax, 0xfffffffb
cmp ax, cx
ja 0x40e75e
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0x4004667f
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x40e75e
movzx eax, word [esp + 0x50]
cmp dword [esp + 0x24], eax
jb 0x40e817
push 0
push eax
lea eax, [esp + 0x58]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
movzx ecx, word [esp + 0x50]
cmp eax, ecx
jne 0x40e75e
push 0x6b7eac
mov dword [esp + 0x18], 4
lea edi, [eax - 4]
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push edi
push 0x6b20b0
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, edi
cdq
push edx
push eax
call fcn.0040e570
add esp, 8
mov ecx, dword [sym.imp.WS2_32.dll_recv]
test ebx, ebx
jne 0x40e8bb
push ebx
push 0x3fc
lea eax, [esp + 0x45c]
push eax
push dword [esp + 0x1c]
call ecx
mov esi, eax
test esi, esi
je 0x40e75e
cmp esi, 0xffffffff
jne 0x40e85d
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
jne 0x40e75e
jmp 0x40e8c1
lea eax, [esi + 4]
mov dword [esp + 0x18], 0
mov ecx, 4
mov word [esp + 0x450], ax
push 0x6b7ea0
mov word [esp + 0x456], cx
movzx ebx, ax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push esi
push 0x6b20b4
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0x6b20b8
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push esi
push 0x6b20b0
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, esi
cdq
push edx
push eax
call fcn.0040e570
add esp, 8
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
jne 0x40e8f4
test ebx, ebx
jne 0x40e93a
push ebx
push 0x1388
push ebx
lea eax, [esp + 0x54]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
push dword [esp + 0x48]
mov esi, dword [sym.imp.WS2_32.dll_WSAResetEvent]
call esi
push dword [esp + 0x4c]
call esi
jmp 0x40e724
jle 0x40e938
mov eax, dword [esp + 0x14]
push 0
push edi
lea eax, [esp + eax + 0x58]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x40e92a
call esi
cmp eax, 0x2733
jne 0x40e75e
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e724
cmp eax, edi
jg 0x40e75e
sub edi, eax
add dword [esp + 0x14], eax
test ebx, ebx
mov esi, dword [esp + 0xc]
mov ecx, dword [sym.imp.WS2_32.dll_recv]
jle 0x40e730
mov eax, dword [esp + 0x18]
lea esi, [esp + 0x450]
push 0
push ebx
add eax, esi
mov esi, dword [esp + 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x40e988
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40e75e
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e728
cmp eax, ebx
jg 0x40e75e
sub ebx, eax
add dword [esp + 0x18], eax
jmp 0x40e728