Function at 0x412ca0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3b8
mov eax, dword [0x47b654]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x3ac]
push edi
push eax
push 0x202
mov dword [ebp - 0x3b0], 1
mov bl, 1
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
lea eax, [ebp - 0x3b0]
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp + 0xc]
mov esi, eax
mov eax, 2
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x14]
push 0x10
push eax
push edi
mov dword [ebp - 0x10], esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x412e58
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
mov ecx, 0x2733
cmp ax, cx
jne 0x412e46
mov ecx, dword [ebp + 0x10]
mov eax, 0x10624dd3
imul ecx
mov dword [ebp - 0x114], edi
sar edx, 6
mov eax, edx
mov dword [ebp - 0x118], 1
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x3b8], eax
imul eax, eax, 0x3e8
mov dword [ebp - 0x21c], 1
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x3b4], eax
lea eax, [ebp - 0x3b8]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x118]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
je 0x412e42
lea eax, [ebp - 0x118]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
xor ecx, ecx
movzx ebx, bl
test eax, eax
lea eax, [ebp - 0x21c]
push eax
push edi
cmovne ebx, ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x412e5a
lea eax, [esi - 0x2714]
cmp eax, 0x59
ja case.0x412df7.10005
movzx eax, byte [eax + 0x412e9c]
jmp dword [eax*4 + 0x412e80]
push str.WSANOTINITIALISED:__A_successful_WSAStartup_call_must_occur_before_using_this_function._n
jmp 0x412e2d
push str.WSAEFAULT:__The_Windows_Sockets_implementation_was_unable_to_allocate_needed_resources_for_its_internal_operations__or_the_readfds__writefds__exceptfds__or_timeval_parameters_are_not_part_of_the_user_address_space._n
jmp 0x412e2d
push str.WSAENETDOWN:__The_network_subsystem_has_failed._n
jmp 0x412e2d
push str.WSAEINVAL:__The_time_out_value_is_not_valid__or_all_three_descriptor_parameters_were_null._n
jmp 0x412e2d
push str.WSAEINTR:__A_blocking_Windows_Socket_1.1_call_was_canceled_through_WSACancelBlockingCall._n
jmp 0x412e2d
push str.WSAEINPROGRESS:__A_blocking_Windows_Sockets_1.1_call_is_in_progress__or_the_service_provider_is_still_processing_a_callback_function._n
jmp 0x412e2d
push str.WSAENOTSOCK_One_of_the_descriptor_sets_contains_an_entry_that_is_not_a_socket._n
call fcn.0040ad40
add esp, 4
push str._nSelect___Error._n
call fcn.0040ad40
add esp, 4
mov bl, 1
jmp 0x412e5a
call esi
push eax
push str._nConnect_Error__d_n
call fcn.0040ad40
add esp, 8
jmp 0x412e5a
xor bl, bl
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
test bl, bl
pop edi
sete al
xor ecx, ebp
pop esi
pop ebx
call fcn.0042a28a
mov esp, ebp
pop ebp
ret