Function at 0x1002bae0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
mov eax, 0x1108
call fcn.1002c9f0
push ebp
push edi
push 0
push 1
mov ebp, ecx
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp], eax
jne 0x1002bb54
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [esp + 0x20]
push str.Error_at_socket__:__ld_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x124]
call fcn.1002a7f0
lea edx, [esp + 0x120]
push 0x10090e88
push edx
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [esp + 0x1114]
push esi
push eax
xor esi, esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x1002bb88
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
lea edi, [esp + 0xc]
mov esi, dword [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 esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x111c]
mov word [esp + 0x10], 2
mov dx, word [ecx]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp]
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push 0x10
push eax
push ecx
mov dword [esp + 0x20], esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
pop esi
jne 0x1002be20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea eax, [edx - 0x271e]
cmp eax, 0x2f
ja case.0x1002bbe3.10028
xor ecx, ecx
mov cl, byte [eax + 0x1002be6c]
jmp dword [ecx*4 + 0x1002be30]
push str.The_specified_address_is_already_in_use.
lea ecx, [esp + 0x124]
call fcn.1002a7f0
lea edx, [esp + 0x120]
push 0x10090e88
push edx
call sub.MSVCRT.dll__CxxThrowException
push str.The_specified_address_is_not_available_from_the_local_machine.
lea ecx, [esp + 0xef4]
call fcn.1002a7f0
lea eax, [esp + 0xef0]
push 0x10090e88
push eax
call sub.MSVCRT.dll__CxxThrowException
push str.Addresses_in_the_specified_family_cannot_be_used_with_this_socket.
lea ecx, [esp + 0x454]
call fcn.1002a7f0
lea ecx, [esp + 0x450]
push 0x10090e88
push ecx
call sub.MSVCRT.dll__CxxThrowException
push str.The_attempt_to_connect_was_forcefully_rejected.
lea ecx, [esp + 0xab4]
call fcn.1002a7f0
lea edx, [esp + 0xab0]
push 0x10090e88
push edx
call sub.MSVCRT.dll__CxxThrowException
push str.A_destination_address_is_required.
lea ecx, [esp + 0x674]
call fcn.1002a7f0
lea eax, [esp + 0x670]
push 0x10090e88
push eax
call sub.MSVCRT.dll__CxxThrowException
push str.The_lpSockAddrLen_argument_is_incorrect.
lea ecx, [esp + 0x234]
call fcn.1002a7f0
lea ecx, [esp + 0x230]
push 0x10090e88
push ecx
call sub.MSVCRT.dll__CxxThrowException
push str.The_socket_is_already_bound_to_an_address.
lea ecx, [esp + 0x894]
call fcn.1002a7f0
lea edx, [esp + 0x890]
push 0x10090e88
push edx
call sub.MSVCRT.dll__CxxThrowException
push str.The_socket_is_already_connected.
lea ecx, [esp + 0xcd4]
call fcn.1002a7f0
lea eax, [esp + 0xcd0]
push 0x10090e88
push eax
call sub.MSVCRT.dll__CxxThrowException
push str.No_more_file_descriptors_are_available.
lea ecx, [esp + 0x344]
call fcn.1002a7f0
lea ecx, [esp + 0x340]
push 0x10090e88
push ecx
call sub.MSVCRT.dll__CxxThrowException
push str.The_network_cannot_be_reached_from_this_host_at_this_time.
lea ecx, [esp + 0x564]
call fcn.1002a7f0
lea edx, [esp + 0x560]
push 0x10090e88
push edx
call sub.MSVCRT.dll__CxxThrowException
push str.No_buffer_space_is_available._The_socket_cannot_be_connected.
lea ecx, [esp + 0x784]
call fcn.1002a7f0
lea eax, [esp + 0x780]
push 0x10090e88
push eax
call sub.MSVCRT.dll__CxxThrowException
push str.The_socket_is_not_connected.
lea ecx, [esp + 0x9a4]
call fcn.1002a7f0
lea ecx, [esp + 0x9a0]
push 0x10090e88
push ecx
call sub.MSVCRT.dll__CxxThrowException
push str.The_descriptor_is_a_file__not_a_socket.
lea ecx, [esp + 0xbc4]
call fcn.1002a7f0
lea edx, [esp + 0xbc0]
push 0x10090e88
push edx
call sub.MSVCRT.dll__CxxThrowException
push str.The_attempt_to_connect_timed_out_without_establishing_a_connection.
lea ecx, [esp + 0xde4]
call fcn.1002a7f0
lea eax, [esp + 0xde0]
push 0x10090e88
push eax
call sub.MSVCRT.dll__CxxThrowException
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
lea ecx, [esp + 0x20]
push str.OnConnect_error:__d
push ecx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x1000]
push edx
call fcn.1002a7f0
lea eax, [esp + 0x1000]
push 0x10090e88
push eax
call sub.MSVCRT.dll__CxxThrowException
pop edi
mov al, 1
pop ebp
add esp, 0x1108
ret 8