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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x641558
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push esi
push edi
mov edi, 7
xor ebx, ebx
xor eax, eax
mov esi, ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], ax
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], ebx
mov ecx, esi
call fcn.00404180
test eax, eax
jne 0x409aaf
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x24], edi
pop edi
xor edx, edx
pop esi
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
cmp byte [esi + 0x2d10], bl
je 0x409abe
mov ecx, esi
call fcn.00407d60
mov ecx, dword [esi + 0x48]
mov edi, dword [ebp + 8]
push ebx
push 0xa
lea eax, [ebp - 0x18]
push eax
push ecx
mov dword [ebp - 0x12], ebx
mov word [ebp - 0x18], 0x124
mov dword [ebp - 0x16], edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x409b0f
mov dword [ebp - 4], 0xffffffff
pop edi
xor edx, edx
pop esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], dx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x48]
push ebx
push 0xff
lea eax, [ebp - 0x138]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x409ae3
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x134]
mov dx, word [ebp - 0x130]
mov dword [ebp - 0x18], eax
mov eax, dword [0x700724]
mov dword [ebp - 0x14], ecx
mov word [ebp - 0x10], dx
mov edx, dword [eax + 0xc]
mov ecx, 0x700724
call edx
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x12]
mov ecx, dword [ebp - 0x16]
movzx edx, byte [ebp - 0x18]
push eax
push ecx
push edx
push edi
lea eax, [ebp - 0x1c]
push str.Request:__Xh._Receive_START:__2.2Xh__TYPE:__Xh__Length:__u_
push eax
call fcn.00405ab0
add esp, 0x18
cmp byte [ebp - 0x18], 0x24
jne 0x409bc6
cmp dword [ebp - 0x16], edi
je 0x409bf5
mov edx, dword [0x700724]
mov eax, dword [edx + 0xc]
mov ecx, 0x700724
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x16]
push ecx
lea edx, [ebp + 0xc]
push str.Bad_data_type._Received_type__04Xh
push edx
call fcn.00405ab0
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp + 0xc]
call fcn.004014a0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1c]
call fcn.004014a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.00405700
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x12], 4
jne 0x409bc6
mov eax, dword [ebp - 0x12e]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov edx, dword [esi + 0x48]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
mov dword [esi + 0x48], edi
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1c]
call fcn.004014a0
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x38]
call fcn.00405700
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 2]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8