Function at 0x5459d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x5bb204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0xffffffff
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, 1
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
je 0x545a19
push 0xff100002
call fcn.00545880
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00549540
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov eax, 2
push ecx
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
push esi
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x545a7a
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x545a70
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xff100003
call fcn.00545880
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00549540
mov esp, ebp
pop ebp
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
push 6
push edi
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x545ac3
push 0
push 1
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x545ac3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xff100004
call fcn.00545880
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00549540
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x1c]
push edx
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x545ade
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov edi, eax
test edi, edi
jne 0x545b17
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100005
call fcn.00545880
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00549540
mov esp, ebp
pop ebp
ret
push 0x33
push edi
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x545b5a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100006
call fcn.00545880
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00549540
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 0x18]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea ecx, [ebp - 0x14]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x545bb8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x545bb8
push edi
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100007
call fcn.00545880
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00549540
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov dword [ebx + 4], edi
xor eax, eax
pop edi
mov dword [ebx], esi
mov dword [ebx + 0x15fcf], eax
mov dword [ebx + 0x15fd3], eax
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00549540
mov esp, ebp
pop ebp
ret