Function at 0x4b2d15
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
lea eax, [ebp - 0x110]
push 0x100
xor ebx, ebx
push ebx
mov edi, dword [esi]
push eax
call fcn.0052a280
add esp, 0xc
mov byte [ebp - 0x131], bl
mov dword [ebp - 0x138], ebx
mov byte [ebp - 0x132], 1
push 0x10
pop eax
mov dword [ebp - 0x13c], eax
mov ebx, dword [edi + 0x2bc]
test ebx, ebx
je 0x4b2e0d
lea edx, [ebp - 0x144]
mov ecx, ebx
call fcn.004b5c14
test eax, eax
jle 0x4b2d99
push 0
push ebx
lea edx, [ebp - 0x144]
call fcn.004b5edf
pop ecx
pop ecx
mov dword [ebp - 0x138], eax
jmp 0x4b2e09
push ebx
call fcn.0053f120
pop ecx
cmp eax, 1
jbe 0x4b2e0d
and dword [ebp - 0x140], 0
lea eax, [ebp - 0x140]
push eax
push 0
mov edx, ebx
mov ecx, esi
call fcn.004a2d8a
pop ecx
pop ecx
cmp eax, 1
jne 0x4b2dd2
lea edx, [ebp - 0x140]
mov ecx, esi
call fcn.004a95d9
mov edx, dword [ebp - 0x140]
test edx, edx
je 0x4b2df4
mov eax, dword [edx]
mov ecx, edi
mov dword [ebp - 0x138], eax
call fcn.004a2ecf
mov byte [ebp - 0x132], 0
jmp 0x4b2e03
push ebx
push str.Failed_to_resolve_host_name__s_n
push edi
call fcn.0049dbc9
add esp, 0xc
mov eax, dword [ebp - 0x138]
test eax, eax
jne 0x4b2e69
lea eax, [ebp - 0x13c]
push eax
lea eax, [ebp - 0x120]
push eax
push dword [esi + 0xd4]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b2e4e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.004a6e35
push eax
push str.getsockname___failed:__s
push edi
call fcn.0049dc37
add esp, 0xc
jmp 0x4b303b
mov eax, dword [ebp - 0x13c]
push 0x10
pop ecx
cmp eax, ecx
mov byte [ebp - 0x131], 1
cmovg eax, ecx
mov dword [ebp - 0x13c], eax
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4b302e
mov eax, dword [esi + 0xd8]
cmp eax, 0xffffffff
je 0x4b2e92
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp byte [ebp - 0x131], 0
mov dword [esi + 0xd8], ebx
jne 0x4b2ec6
mov eax, dword [ebp - 0x138]
push dword [ebp - 0x13c]
push dword [eax + 0x18]
lea eax, [ebp - 0x120]
push eax
call fcn.00529780
add esp, 0xc
and dword [ebp - 0x11c], 0
xor eax, eax
push 0x10
mov word [ebp - 0x11e], ax
pop eax
push eax
mov dword [ebp - 0x13c], eax
lea eax, [ebp - 0x120]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x4b3027
push 0x10
pop ecx
lea eax, [ebp - 0x140]
mov dword [ebp - 0x140], ecx
push eax
lea eax, [ebp - 0x130]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b2e2b
push dword [ebp - 0x12e]
call dword [sym.imp.WS2_32.dll_ntohs]
push 1
movzx eax, ax
push ebx
mov dword [ebp - 0x148], eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x4b2f41
push str.listen_2__failed_on_socket
jmp 0x4b3033
cmp byte [ebp - 0x131], 0
lea edx, [ebp - 0x110]
push 0x100
je 0x4b2f62
lea ecx, [ebp - 0x11c]
call fcn.004b5cca
jmp 0x4b2f6d
mov ecx, dword [ebp - 0x138]
call fcn.004a2ba9
pop ecx
lea eax, [ebp - 6]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xa]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x110]
push str._hu._hu._hu._hu
push eax
call fcn.0049e253
add esp, 0x18
cmp eax, 4
jne 0x4b303b
mov eax, dword [ebp - 0x148]
movzx ebx, ax
movzx eax, word [ebp - 6]
push ebx
push eax
movzx eax, word [ebp - 8]
push eax
movzx eax, word [ebp - 0xa]
push eax
movzx eax, word [ebp - 0xc]
push eax
push str.Telling_server_to_connect_to__d._d._d._d:_d_n
push edi
call fcn.0049dbc9
add esp, 0x1c
movzx eax, bl
shr ebx, 8
push eax
movzx eax, word [ebp - 6]
push ebx
push eax
movzx eax, word [ebp - 8]
push eax
movzx eax, word [ebp - 0xa]
push eax
movzx eax, word [ebp - 0xc]
push eax
push str.PORT__d__d__d__d__d__d
push esi
call fcn.004b53ca
add esp, 0x20
test eax, eax
jne 0x4b303e
cmp byte [ebp - 0x132], al
je 0x4b3008
mov ecx, dword [ebp - 0x138]
call fcn.004b5d6a
mov dword [esi + 0x380], 1
xor eax, eax
mov byte [esi + 0x131], 1
mov dword [esi + 0x3a0], 0x1a
jmp 0x4b303e
push str.bind_2__failed_on_socket
jmp 0x4b3033
push str.socket_2__failed___s_
push edi
call fcn.0049dc37
pop ecx
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005121be
leave
ret