Function at 0x472720
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 6
push 1
push 2
mov dword [ebp - 0x34], 0x10
mov dword [ebp - 0x38], 1
call edi
mov ebx, eax
mov dword [ebp - 0x30], ebx
cmp ebx, 0xffffffff
je 0x4728e1
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov eax, 2
push 0x7f000001
mov word [ebp - 0x2c], ax
call dword [sym.imp.WS2_32.dll_htonl]
push 4
lea edx, [ebp - 0x38]
push edx
push 4
push 0xffff
xor ecx, ecx
push ebx
mov dword [ebp - 0x28], eax
mov word [ebp - 0x2a], cx
mov dword [esi + 4], 0xffffffff
mov dword [esi], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4728cd
push 0x10
lea eax, [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x4728cd
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x2c]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4728cd
push 1
push ebx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x4728cd
push 0
push 1
push 2
call edi
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4728cd
push 0x10
lea ecx, [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4728cd
push 0
push 0
push ebx
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4728cd
push esi
push 0x4c0d60
lea edx, [ebp - 0x1c]
push 0xc
push edx
call fcn.00473180
lea eax, [ebp - 0x1c]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x472850
mov ecx, dword [esi]
sub eax, edx
push 0
mov edi, eax
push edi
lea eax, [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, edi
jne 0x4728cd
mov eax, dword [esi + 4]
push 0
push 0xc
lea edx, [ebp - 0x10]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, edi
jne 0x4728cd
mov eax, edi
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x1c]
cmp edi, 4
jb 0x4728a6
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x4728cd
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x472892
test eax, eax
je 0x4728f8
mov bl, byte [ecx]
cmp bl, byte [edx]
jne 0x4728ca
cmp eax, 1
jbe 0x4728f5
mov bl, byte [ecx + 1]
cmp bl, byte [edx + 1]
jne 0x4728ca
cmp eax, 2
jbe 0x4728f5
mov cl, byte [ecx + 2]
cmp cl, byte [edx + 2]
je 0x4728f5
mov ebx, dword [ebp - 0x30]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call edi
mov edx, dword [esi]
push edx
call edi
mov eax, dword [esi + 4]
push eax
call edi
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x30]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004a1682
mov esp, ebp
pop ebp
ret