Function at 0x41be70
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
mov eax, dword [0x4915c0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x238], ecx
call dword [0x49297c]
xor esi, esi
push esi
push 1
push 2
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x234], esi
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x41bfc1
movzx edx, word [ebx + 0x4b8]
xor eax, eax
mov dword [ebp - 0x224], eax
push edx
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], eax
mov word [ebp - 0x224], 2
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebx + 0x74]
cmp ebx, esi
mov word [ebp - 0x222], ax
jne 0x41bf04
xor eax, eax
jmp 0x41bf36
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x41bf19
xor eax, eax
jmp 0x41bf36
lea esi, [eax + eax]
mov eax, esi
call fcn.0045a170
mov ecx, dword [ebp - 0x230]
mov eax, esp
push ecx
push esi
push ebx
push eax
call fcn.00403150
xor esi, esi
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea edx, [ebp - 0x22c]
push edx
push 0x8004667e
push edi
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x22c], 1
call ebx
push 0x10
lea eax, [ebp - 0x224]
push eax
push edi
mov dword [ebp - 0x244], 0xa
mov dword [ebp - 0x240], esi
call dword [sym.imp.WS2_32.dll_connect]
lea ecx, [ebp - 0x244]
push ecx
push esi
lea edx, [ebp - 0x34c]
push edx
push esi
push edi
mov dword [ebp - 0x348], edi
mov dword [ebp - 0x34c], 1
call dword [sym.imp.WS2_32.dll_select]
lea eax, [ebp - 0x34c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41bfc9
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x41c122
lea ecx, [ebp - 0x22c]
push ecx
push 0x8004667e
push edi
mov dword [ebp - 0x22c], esi
call ebx
push 4
lea edx, [ebp - 0x23c]
push edx
push 0x1006
push 0xffff
push edi
mov dword [ebp - 0x23c], 0x2710
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x200
lea eax, [ebp - 0x213]
push esi
push eax
mov byte [ebp - 0x214], 0
call fcn.00457910
mov ecx, dword [ebp - 0x228]
mov esi, dword [ecx]
add esp, 0xc
test esi, esi
je 0x41c077
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x41c077
add eax, eax
mov dword [ebp - 0x228], eax
call fcn.0045a170
mov ebx, esp
test ebx, ebx
je 0x41c077
mov edx, dword [ebp - 0x228]
mov eax, dword [ebp - 0x230]
push 0
push 0
push edx
push ebx
push 0xffffffffffffffff
push esi
push 0
push eax
mov byte [ebx], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, ebx
jmp 0x41c079
xor eax, eax
push eax
lea ecx, [ebp - 0x214]
push 0x47ea10
push ecx
call fcn.0045673e
lea eax, [ebp - 0x214]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41c097
push 0
sub eax, edx
push eax
lea edx, [ebp - 0x214]
push edx
push edi
call dword [sym.imp.WS2_32.dll_send]
push 0x200
lea eax, [ebp - 0x214]
push 0
push eax
call fcn.00457910
add esp, 0xc
push 0
push 0x200
lea ecx, [ebp - 0x214]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
jle 0x41c100
mov esi, dword [ebp - 0x238]
lea edx, [ebp - 0x214]
push edx
mov byte [ebp + ebx - 0x214], 0
call fcn.00423940
jmp 0x41c105
cmp ebx, 0xffffffff
je 0x41c10b
test ebx, ebx
jg 0x41c0b3
jmp 0x41c115
mov dword [ebp - 0x234], 0xffffffff
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x234]
lea esp, [ebp - 0x35c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00455843
mov esp, ebp
pop ebp
ret 4