Function at 0x54dcd0
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 [0x5c43dc]
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 0x54dd19
push 0xff100002
call fcn.0054db80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005517d0
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 0x54dd7a
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x54dd70
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xff100003
call fcn.0054db80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005517d0
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 0x54ddc3
push 0
push 1
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x54ddc3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xff100004
call fcn.0054db80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005517d0
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 0x54ddde
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov edi, eax
test edi, edi
jne 0x54de17
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100005
call fcn.0054db80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005517d0
mov esp, ebp
pop ebp
ret
push 0x33
push edi
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x54de5a
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.0054db80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005517d0
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 0x54deb8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x54deb8
push edi
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xff100007
call fcn.0054db80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005517d0
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.005517d0
mov esp, ebp
pop ebp
ret