Function at 0x43fd00
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x402c
call fcn.004874e0
mov eax, dword [0x4a701c]
xor eax, esp
mov dword [esp + 0x4028], eax
push ebx
push esi
push edi
push 0
push 1
push 2
mov edi, edx
mov ebx, ecx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
je 0x440012
mov ecx, eax
call fcn.0043f4d0
mov esi, eax
cmp esi, 0xffffffff
je 0x440012
test esi, esi
jne 0x43fd8b
push str.make_connection:_Socket_0_is_reserved___Please_report_this____n
call fcn.00442810
add esp, 4
push dword [0x4cf878]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x4cf878], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4028]
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
cmp esi, 0x1000
jl 0x43fdd6
push 0x1000
push esi
push str.make_connection:_New_socket__d_is_greater_than_can_we_handle__Increase_the_value_of_MAXCONN__currently__d__for_your_OS_to_fix_this__n
call fcn.00442810
add esp, 0xc
push dword [esi*4 + 0x4cf878]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi*4 + 0x4cf878], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4028]
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov edx, 0xa
mov ecx, esi
call fcn.0043f5b0
mov eax, 2
push ebx
mov word [esp + 0x1c], ax
call dword [sym.imp.WS2_32.dll_htonl]
push edi
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
movzx eax, di
push eax
movzx eax, bl
push eax
mov eax, ebx
shr eax, 8
movzx eax, al
push eax
mov eax, ebx
shr ebx, 0x18
shr eax, 0x10
movzx eax, al
push eax
push ebx
push str.Connecting_to__d._d._d._d:_i_n
call fcn.00442750
add esp, 0x18
mov dword [esp + 0x10], 1
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push dword [esi*4 + 0x4cf878]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x43fe65
call fcn.0043f530
push eax
push esi
push str.set_nonblocking:_Failed_to_set_socket__d_to_non_blocking_mode___s____Please_report_this____n
call fcn.00442810
add esp, 0xc
push 0x10
lea eax, [esp + 0x1c]
push eax
push dword [esi*4 + 0x4cf878]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x43ff7a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x43ff47
mov eax, dword [esi*4 + 0x4cf878]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x10]
push eax
push 0
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 1
push eax
push 0
push 0
mov dword [esp + 0x24], 0xa
mov dword [esp + 0x28], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x43feff
push 0xa
push esi
push str.make_connection:_connection_failed__socket__d__timeout_after__ds___n
call fcn.00442810
add esp, 0xc
mov ecx, esi
call fcn.00441380
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4028]
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
cmp eax, 0xffffffff
je 0x43ff47
lea eax, [esp + 0x28]
push eax
push dword [esi*4 + 0x4cf878]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x43ff7a
push esi
push str.make_connection:_connection_failed__socket__d__not_writeable___n
call fcn.00442810
add esp, 8
mov ecx, esi
call fcn.00441380
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4028]
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
call fcn.0043f530
push eax
push esi
push str.make_connection:_connect_failed__socket__d___s___n
call fcn.00442810
add esp, 0xc
mov ecx, esi
call fcn.00441380
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4028]
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4ad1d8]
xor ecx, ecx
test eax, eax
je 0x43ff9e
mov edx, dword [esi*4 + 0x4cf878]
nop dword [eax]
cmp dword [ecx*4 + 0x4ad1dc], edx
je 0x43ff9e
inc ecx
cmp ecx, eax
jb 0x43ff90
cmp ecx, eax
jne 0x43ffbd
cmp eax, 0x1000
jae 0x43ffbd
mov eax, dword [esi*4 + 0x4cf878]
mov dword [ecx*4 + 0x4ad1dc], eax
inc dword [0x4ad1d8]
cmp dword [0x4b9420], esi
jg 0x43ffcd
lea eax, [esi + 1]
mov dword [0x4b9420], eax
push dword [0x4a7a9c]
mov edx, 0x43f680
mov ecx, esi
push 0x43f740
call fcn.00440040
add esp, 8
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [esi*4 + 0x4b5420]
mov dword [ecx + 4], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4028]
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
call fcn.0043f530
push eax
push str.make_connection:_socket_creation_failed___s___n
call fcn.00442810
mov ecx, dword [esp + 0x403c]
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret