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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
push 0xff
push ebx
mov byte [ebp - 0x110], bl
mov eax, dword [edi + 0x16c]
mov esi, dword [edi]
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x10f]
push eax
call fcn.004bf240
add esp, 0xc
mov byte [ebp - 0x131], bl
mov dword [ebp - 0x13c], ebx
cmp dword [esi + 0x70], ebx
je 0x45b742
push dword [esi + 0x70]
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x45b6e7
mov edx, dword [esi + 0x70]
mov ecx, eax
push ebx
call fcn.00462d28
mov ebx, eax
pop ecx
mov dword [ebp - 0x13c], ebx
jmp 0x45b73e
push dword [esi + 0x70]
call fcn.004c80b0
pop ecx
cmp eax, 1
jbe 0x45b742
and dword [ebp - 0x138], ebx
lea eax, [ebp - 0x138]
push eax
push 0
lea edx, [ebp - 0x110]
mov ecx, edi
call fcn.00453515
pop ecx
pop ecx
cmp eax, 1
jne 0x45b725
lea edx, [ebp - 0x138]
mov ecx, edi
call fcn.00461d1c
mov edx, dword [ebp - 0x138]
test edx, edx
je 0x45b742
mov ebx, dword [edx]
mov ecx, esi
mov dword [ebp - 0x13c], ebx
call fcn.00453665
test ebx, ebx
jne 0x45b77b
lea eax, [ebp - 0x138]
mov dword [ebp - 0x138], 0x10
push eax
lea eax, [ebp - 0x120]
push eax
push dword [edi + 0xa0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x45b774
push str.getsockname___failed
jmp 0x45b93c
mov byte [ebp - 0x131], 1
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x45b937
mov eax, dword [edi + 0xa4]
cmp eax, 0xffffffff
je 0x45b7a4
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp byte [ebp - 0x131], 0
mov dword [edi + 0xa4], ebx
jne 0x45b7d4
mov eax, dword [ebp - 0x13c]
push 0x10
push dword [eax + 0x14]
lea eax, [ebp - 0x120]
push eax
call fcn.004bebf0
add esp, 0xc
and dword [ebp - 0x11c], 0
xor eax, eax
mov word [ebp - 0x11e], ax
lea eax, [ebp - 0x120]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x45b930
lea eax, [ebp - 0x138]
mov dword [ebp - 0x138], 0x10
push eax
lea eax, [ebp - 0x130]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x45b76a
push dword [ebp - 0x12e]
call dword [sym.imp.WS2_32.dll_ntohs]
push 1
movzx eax, ax
push ebx
mov dword [ebp - 0x144], eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x45b848
push str.listen_2__failed_on_socket
jmp 0x45b93c
cmp byte [ebp - 0x131], 0
push 0x100
je 0x45b86e
lea eax, [ebp - 0x110]
push eax
push 2
lea edx, [ebp - 0x11c]
pop ecx
call fcn.00462e42
pop ecx
jmp 0x45b87f
mov ecx, dword [ebp - 0x13c]
lea edx, [ebp - 0x110]
call fcn.004533dd
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.004c187d
add esp, 0x18
cmp eax, 4
jne 0x45b944
mov eax, dword [ebp - 0x144]
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 esi
call fcn.004574e5
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 edi
call fcn.0045d89a
add esp, 0x20
test eax, eax
jne 0x45b947
mov ecx, dword [ebp - 0x13c]
call fcn.00462d10
mov eax, dword [ebp - 0x140]
mov dword [eax + 0x48], 2
mov eax, dword [edi + 0x16c]
mov dword [eax + 0x68], 0x19
xor eax, eax
jmp 0x45b947
push str.bind_2__failed_on_socket
jmp 0x45b93c
push str.socket_2__failed___s_
push esi
call fcn.00457554
pop ecx
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret