Function at 0x40e640
Capabilities:
Get local ipv4 addresses
Get socket information
Print debug messages
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3d4
mov eax, dword [0x4a4300]
xor eax, esp
mov dword [esp + 0x3d0], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0xc], edx
push 0xff
lea eax, [esp + 0xdd]
mov dword [esp + 0x14], edi
push edi
push eax
mov esi, ecx
mov byte [esp + 0xe4], 0
call fcn.00452270
xor eax, eax
mov dword [esp + 0x20], 0x10
add esp, 0xc
mov word [esp + 0x18], ax
mov dword [esp + 0x22], eax
xorps xmm0, xmm0
mov word [esp + 0x26], ax
mov word [esp + 0x28], ax
mov dword [esp + 0x32], eax
mov word [esp + 0x36], ax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
movq qword [esp + 0x1e], xmm0
push eax
push esi
movq qword [esp + 0x36], xmm0
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40eaa8
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x10
push eax
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x40eaa8
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ebx, eax
test ebx, ebx
je 0x40eaa8
push 0x20
push ebx
push esi
mov esi, dword [sym.imp.WS2_32.dll_WSAEventSelect]
call esi
cmp eax, 0xffffffff
je 0x40ea98
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov edi, eax
test edi, edi
je 0x40ea98
push 0x21
push edi
push dword [esp + 0x14]
call esi
cmp eax, 0xffffffff
je 0x40ea98
push 0x90
lea eax, [esp + 0x3e]
push 0
push eax
call fcn.00452270
xor eax, eax
mov edx, dword [ebp + 8]
mov word [esp + 0x4c], ax
add esp, 0xc
mov ax, word [esp + 0x1a]
mov ecx, dword [esp + 0x1c]
mov word [esp + 0x46], ax
mov word [esp + 0x80], ax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x74], eax
mov eax, dword [0x6b0440]
mov dword [esp + 0x4c], eax
mov eax, dword [0x6b0444]
mov dword [esp + 0x50], eax
mov eax, dword [0x6b0438]
mov dword [esp + 0x54], eax
mov eax, dword [0x6b043c]
mov dword [esp + 0x58], eax
mov eax, dword [0x6b0448]
mov dword [esp + 0x68], eax
mov eax, dword [0x6b044c]
mov dword [esp + 0x6c], eax
mov eax, dword [0x6b0450]
mov dword [esp + 0x60], eax
mov eax, dword [0x6b0454]
mov dword [esp + 0x64], eax
movzx eax, word [esp + 0x2a]
mov dword [esp + 0x38], 0x10092
mov dword [esp + 0x42], edx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x5c], 1
mov dword [esp + 0x70], edx
mov word [esp + 0x7a], ax
call fcn.0040fa20
movdqu xmm0, xmmword [0x6b04c8]
mov dword [esp + 0xc6], edx
xor edx, edx
mov dword [esp + 0xc2], eax
xor esi, esi
movdqu xmmword [esp + 0x82], xmm0
mov dword [esp + 0x3c], 0
movdqu xmm0, xmmword [0x6b04d8]
movdqu xmmword [esp + 0x92], xmm0
movdqu xmm0, xmmword [0x6b052c]
movdqu xmmword [esp + 0xa2], xmm0
movdqu xmm0, xmmword [0x6b053c]
movdqu xmmword [esp + 0xb2], xmm0
lea ecx, [ecx]
movzx ecx, byte [esp + esi + 0x38]
mov eax, edx
shl eax, 5
sub eax, edx
add ecx, eax
movzx eax, byte [esp + esi + 0x39]
mov edx, ecx
add esi, 2
shl edx, 5
sub edx, ecx
add edx, eax
cmp esi, 0x92
jb 0x40e850
push dword [ebp + 0x14]
mov dword [esp + 0x40], edx
lea ecx, [esp + 0x3c]
push dword [ebp + 0x10]
mov edx, 0x92
call fcn.0040ff30
add esp, 8
test eax, eax
je 0x40ea98
push 0
push 0x92
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0x92
jne 0x40ea98
push 0
push 0x1770
push 0
lea eax, [esp + 0xdc]
mov dword [esp + 0xdc], ebx
push eax
push 2
mov dword [esp + 0xe8], edi
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
je 0x40ea98
push dword [esp + 0xd0]
mov esi, dword [sym.imp.WS2_32.dll_WSAResetEvent]
call esi
push dword [esp + 0xd4]
call esi
push 0
push 0x94
lea eax, [esp + 0xe0]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0x94
jne 0x40ea98
push dword [ebp + 0x14]
mov esi, eax
lea ecx, [esp + 0xdc]
push dword [ebp + 0x10]
mov edx, esi
call fcn.004100e0
add esp, 8
test eax, eax
je 0x40ea98
cmp word [esp + 0xd8], si
jne 0x40ea98
mov eax, dword [esp + 0xdc]
xor ecx, ecx
mov dword [esp + 0x14], eax
xor esi, esi
mov dword [esp + 0xdc], 0
movzx edx, byte [esp + esi + 0xd8]
mov eax, ecx
shl eax, 5
sub eax, ecx
add edx, eax
movzx eax, byte [esp + esi + 0xd9]
mov ecx, edx
shl ecx, 5
sub ecx, edx
add ecx, eax
movzx eax, byte [esp + esi + 0xda]
mov edx, ecx
shl edx, 5
sub edx, ecx
add edx, eax
movzx eax, byte [esp + esi + 0xdb]
mov ecx, edx
add esi, 4
shl ecx, 5
sub ecx, edx
add ecx, eax
cmp esi, 0x94
jb 0x40e970
cmp dword [esp + 0x14], ecx
jne 0x40ea98
mov eax, dword [esp + 0xe0]
cmp eax, 0xc8
push 0x1ff
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1dd]
push 0
mov byte [esp + 0x1e0], 0
push eax
jne 0x40ea2f
call fcn.00452270
add esp, 0xc
lea eax, [esp + 0x124]
push eax
push dword [esp + 0x1e]
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
movzx eax, byte [esp + 0x27]
push eax
movzx eax, byte [esp + 0x2a]
push eax
movzx eax, byte [esp + 0x2d]
push eax
movzx eax, byte [esp + 0x30]
push eax
push 0x483664
jmp 0x40ea6a
call fcn.00452270
add esp, 0xc
lea eax, [esp + 0x124]
push eax
push dword [esp + 0x1e]
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
movzx eax, byte [esp + 0x27]
push eax
movzx eax, byte [esp + 0x2a]
push eax
movzx eax, byte [esp + 0x2d]
push eax
movzx eax, byte [esp + 0x30]
push eax
push str._DEBUG__l
lea eax, [esp + 0x1f4]
push eax
call fcn.004573bf
add esp, 0x20
lea eax, [esp + 0x1d8]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x1d8]
push eax
call fcn.004580ba
add esp, 4
mov esi, dword [sym.imp.WS2_32.dll_WSACloseEvent]
push ebx
call esi
test edi, edi
je 0x40eaa8
push edi
call esi
mov ecx, dword [esp + 0x3dc]
xor eax, eax
cmp dword [esp + 0x10], 0xc8
pop edi
pop esi
sete al
pop ebx
xor ecx, esp
call fcn.00451570
mov esp, ebp
pop ebp
ret