Function at 0x402910
Capabilities:
Get socket status
Print debug messages
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2fc
mov eax, dword [0x4a3300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x63
lea eax, [ebp - 0x6f]
mov byte [ebp - 0x70], 0
push 0
push eax
mov esi, ecx
call fcn.00453200
movzx eax, word [esi + 0x102]
add esp, 0xc
push eax
movzx eax, byte [esi + 0x6f]
push eax
movzx eax, byte [esi + 0x6e]
push eax
movzx eax, byte [esi + 0x6d]
push eax
movzx eax, byte [esi + 0x6c]
push eax
movzx eax, word [esi + 0x62]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
movzx eax, byte [esi + 0x67]
push eax
movzx eax, byte [esi + 0x66]
push eax
movzx eax, byte [esi + 0x65]
push eax
movzx eax, byte [esi + 0x64]
push eax
push dword [esi]
lea eax, [ebp - 0x70]
push 0x481730
push eax
call fcn.004582cf
add esp, 0x34
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dx, word [esi + 0x102]
xor eax, eax
mov ecx, dword [esi + 0x6c]
mov word [esi + 0x5e], ax
call fcn.004017a0
mov dword [esi + 4], eax
test eax, eax
je 0x402afa
call fcn.00409e10
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x2f4], eax
mov dword [ebp - 0x2f8], edx
push 2
push 4
push dword [esi + 0x198]
push dword [esi]
call ebx
test eax, eax
je 0x402ae5
cmp eax, 0xffffffff
jne 0x4029fd
call edi
cmp eax, 0x2733
jne 0x402ae5
call fcn.00409e10
sub eax, dword [ebp - 0x2f4]
sbb edx, dword [ebp - 0x2f8]
test edx, edx
jg 0x402ae5
jl 0x402a23
cmp eax, 0x1f4
ja 0x402ae5
push 0x100
lea eax, [ebp - 0x1e4]
push 0
push eax
call fcn.00453200
add esp, 0xc
lea eax, [ebp - 0x2ec]
push 0x100
push 0
push eax
call fcn.00453200
mov eax, dword [esi + 4]
add esp, 0xc
mov dword [ebp - 0x1e4], eax
mov dword [ebp - 0x2ec], eax
lea eax, [ebp - 0xe0]
mov dword [ebp - 0xdc], 0
push eax
lea eax, [ebp - 0x2f0]
mov dword [ebp - 0xe0], 0
push eax
push 0
lea eax, [ebp - 0x1e8]
mov dword [ebp - 0xdc], 0x64
push eax
push 0
mov dword [ebp - 0x1e8], 1
mov dword [ebp - 0x2f0], 1
call dword [sym.imp.WS2_32.dll_select]
push 0
push 0
push 0
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x402b0b
cmp eax, 0xffffffff
jne 0x4029d5
call edi
cmp eax, 0x2733
je 0x4029d5
call edi
cmp eax, 0x2749
je 0x4029d5
mov eax, dword [esi + 4]
test eax, eax
je 0x402afa
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004524fc
mov esp, ebp
pop ebp
ret
push 0x63
lea eax, [ebp - 0xd7]
mov byte [ebp - 0xd8], 0
push 0
push eax
call fcn.00453200
movzx eax, word [esi + 0x102]
add esp, 0xc
push eax
movzx eax, byte [esi + 0x6f]
push eax
movzx eax, byte [esi + 0x6e]
push eax
movzx eax, byte [esi + 0x6d]
push eax
movzx eax, byte [esi + 0x6c]
push eax
movzx eax, word [esi + 0x62]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
movzx eax, byte [esi + 0x67]
push eax
movzx eax, byte [esi + 0x66]
push eax
movzx eax, byte [esi + 0x65]
push eax
movzx eax, byte [esi + 0x64]
push eax
call fcn.00409e10
sub eax, dword [ebp - 0x2f4]
sbb edx, dword [ebp - 0x2f8]
push edx
push eax
push dword [esi]
lea eax, [ebp - 0xd8]
push 0x481770
push eax
call fcn.004582cf
add esp, 0x3c
lea eax, [ebp - 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, esi
call fcn.00402840
mov eax, 1
mov word [esi + 0x5e], ax
call fcn.00409e10
mov dword [esi + 0x1c8], eax
mov dword [esi + 0x1cc], edx
call fcn.00409e10
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi + 0x1d0], eax
xor ecx, ebp
mov dword [esi + 0x1d4], edx
pop esi
pop ebx
call fcn.004524fc
mov esp, ebp
pop ebp
ret