Function at 0x405f20
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x528
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor ebx, ebx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x135]
mov byte [esp + 0x134], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x53c]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov dx, word [ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x53c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 4]
push edx
push eax
push ecx
call fcn.0040df60
mov edx, 1
add esp, 0x10
cmp eax, edx
jge 0x405fd3
cmp dword [0x41679c], edx
jbe 0x405fc4
mov edx, dword [ebp + 8]
lea eax, [esp + 0x134]
push edx
push eax
push str._s__d_Closed__n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x528
ret 4
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x235]
mov byte [esp + 0x234], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x335]
mov byte [esp + 0x334], bl
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x434], edx
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 4]
push ebx
lea edx, [esp + 0x14]
push 0x13
push edx
push eax
mov byte [esp + 0x20], 3
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], 0x13
mov byte [esp + 0x24], 0xe
mov byte [esp + 0x25], 0xe0
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], bl
mov byte [esp + 0x28], bl
mov byte [esp + 0x29], bl
mov byte [esp + 0x2a], bl
mov byte [esp + 0x2b], 1
mov byte [esp + 0x2c], bl
mov byte [esp + 0x2d], 8
mov byte [esp + 0x2e], bl
mov byte [esp + 0x2f], 3
mov byte [esp + 0x30], bl
mov byte [esp + 0x31], bl
mov byte [esp + 0x32], bl
mov dword [esp + 0x448], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ebx
lea esi, [eax + 1]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x40626c
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x434]
push eax
push ebx
push ebx
push ecx
push esi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x4060dc
push str.time_out_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x528
ret 4
mov eax, dword [ebp + 4]
lea edx, [esp + 0x434]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x406223
mov edx, dword [ebp + 4]
push ebx
lea ecx, [esp + 0x38]
push 0x100
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x28], edi
je 0x40626c
cmp edi, ebx
je 0x40626c
cmp byte [esp + 0x34], 3
jne 0x406281
cmp byte [esp + 0x35], bl
jne 0x406281
cmp byte [esp + 0x36], bl
jne 0x406281
push str.Data:
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
xor esi, esi
cmp edi, ebx
jle 0x40616e
xor eax, eax
mov al, byte [esp + esi + 0x34]
push eax
push str._02x_
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
inc esi
cmp esi, edi
jl 0x406154
push 0x413574
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
mov dword [esp + 0x24], ebx
mov eax, 0x4139c4
mov ecx, dword [eax - 4]
lea edi, [esp + 0x34]
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4061ee
mov esi, dword [esp + 0x24]
add eax, 0x64
inc esi
cmp eax, 0x413d48
mov dword [esp + 0x24], esi
jl 0x406185
mov esi, dword [sym.imp.MSVCRT.dll_printf]
push str.Data:
call esi
mov edi, dword [esp + 0x2c]
add esp, 4
cmp edi, ebx
jle 0x4061d5
xor ecx, ecx
mov cl, byte [esp + ebx + 0x34]
push ecx
push str._02x_
call esi
add esp, 8
inc ebx
cmp ebx, edi
jl 0x4061bf
push 0x413574
call esi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x528
ret 4
mov eax, dword [esp + 0x24]
or ecx, 0xffffffff
lea edx, [esp + 0x234]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edi, [eax*4 + str.Win2000_XP]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 8]
lea edx, [esp + 0x234]
push edx
lea ecx, [esp + 0x138]
push eax
push ecx
lea edx, [esp + 0x340]
push str._s:_d___s_n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x348]
push eax
call fcn.0040ebf0
add esp, 0x18
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x528
ret 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Recv_Error:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x528
ret 4