Function at 0x4c5400
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:
sub esp, 0x34
mov eax, dword [0x84dfc0]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
mov esi, dword [esp + 0x4c]
push edi
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 6
push 1
push 2
mov dword [esp + 0x18], 0x10
mov dword [esp + 0x1c], 1
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4c544e
pop edi
pop esi
or eax, eax
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0048d1f2
add esp, 0x34
ret
xor eax, eax
mov dword [esp + 0x14], eax
push ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, 2
push 0x7f000001
mov word [esp + 0x1c], ax
call dword [sym.imp.WS2_32.dll_htonl]
push 4
lea edx, [esp + 0x18]
push edx
push 4
push 0xffff
xor ecx, ecx
push ebx
mov dword [esp + 0x30], eax
mov word [esp + 0x2e], cx
mov dword [esi + 4], 0xffffffff
mov dword [esi], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4c55d0
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x4c55d0
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4c55d0
push 1
push ebx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x4c55d0
push 0
push 1
push 2
call edi
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4c55d0
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4c55d0
push 0
push 0
push ebx
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4c55d0
push esi
push 0x789ee0
lea edx, [esp + 0x30]
push 0xc
push edx
call fcn.004c5f00
lea eax, [esp + 0x38]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c5550
mov ecx, dword [esi]
sub eax, edx
push 0
mov edi, eax
push edi
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, edi
jne 0x4c55d0
mov eax, dword [esi + 4]
push 0
push 0xc
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, edi
jne 0x4c55d0
mov eax, edi
lea ecx, [esp + 0x34]
lea ebp, [esp + 0x28]
cmp edi, 4
jb 0x4c55ab
mov edx, dword [ebp]
cmp edx, dword [ecx]
jne 0x4c55d0
sub eax, 4
add ecx, 4
add ebp, 4
cmp eax, 4
jae 0x4c5596
test eax, eax
je 0x4c55fa
mov dl, byte [ecx]
cmp dl, byte [ebp]
jne 0x4c55d0
cmp eax, 1
jbe 0x4c55fa
mov dl, byte [ecx + 1]
cmp dl, byte [ebp + 1]
jne 0x4c55d0
cmp eax, 2
jbe 0x4c55fa
mov al, byte [ecx + 2]
cmp al, byte [ebp + 2]
je 0x4c55fa
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call edi
mov ecx, dword [esi]
push ecx
call edi
mov edx, dword [esi + 4]
push edx
call edi
pop ebp
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0048d1f2
add esp, 0x34
ret
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x40]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0048d1f2
add esp, 0x34
ret