Function at 0x54e0d0
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 [0x5c53dc]
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 0x54e119
push 0xff100002
call fcn.0054df80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00551e40
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 0x54e17a
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x54e170
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xff100003
call fcn.0054df80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00551e40
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 0x54e1c3
push 0
push 1
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x54e1c3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xff100004
call fcn.0054df80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00551e40
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 0x54e1de
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov edi, eax
test edi, edi
jne 0x54e217
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100005
call fcn.0054df80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00551e40
mov esp, ebp
pop ebp
ret
push 0x33
push edi
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x54e25a
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.0054df80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00551e40
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 0x54e2b8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x54e2b8
push edi
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100007
call fcn.0054df80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00551e40
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 + 0x15fc9], eax
mov dword [ebx + 0x15fcd], eax
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00551e40
mov esp, ebp
pop ebp
ret