Function at 0x461bd0
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 [0x4d3a00]
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.00482250
add esp, 0xc
mov byte [ebp - 0x131], bl
mov dword [ebp - 0x13c], ebx
cmp dword [esi + 0x70], ebx
je 0x461ca3
push dword [esi + 0x70]
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x461c48
mov edx, dword [esi + 0x70]
mov ecx, eax
push ebx
call fcn.0046927f
mov ebx, eax
pop ecx
mov dword [ebp - 0x13c], ebx
jmp 0x461c9f
push dword [esi + 0x70]
call fcn.00483680
pop ecx
cmp eax, 1
jbe 0x461ca3
and dword [ebp - 0x138], ebx
lea eax, [ebp - 0x138]
push eax
push 0
lea edx, [ebp - 0x110]
mov ecx, edi
call fcn.00459dc4
pop ecx
pop ecx
cmp eax, 1
jne 0x461c86
lea edx, [ebp - 0x138]
mov ecx, edi
call fcn.00468273
mov edx, dword [ebp - 0x138]
test edx, edx
je 0x461ca3
mov ebx, dword [edx]
mov ecx, esi
mov dword [ebp - 0x13c], ebx
call fcn.00459f14
test ebx, ebx
jne 0x461cdc
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 0x461cd5
push str.getsockname___failed
jmp 0x461e9d
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 0x461e98
mov eax, dword [edi + 0xa4]
cmp eax, 0xffffffff
je 0x461d05
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp byte [ebp - 0x131], 0
mov dword [edi + 0xa4], ebx
jne 0x461d35
mov eax, dword [ebp - 0x13c]
push 0x10
push dword [eax + 0x14]
lea eax, [ebp - 0x120]
push eax
call fcn.00481c00
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 0x461e91
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 0x461ccb
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 0x461da9
push str.listen_2__failed_on_socket
jmp 0x461e9d
cmp byte [ebp - 0x131], 0
push 0x100
je 0x461dcf
lea eax, [ebp - 0x110]
push eax
push 2
lea edx, [ebp - 0x11c]
pop ecx
call fcn.00469399
pop ecx
jmp 0x461de0
mov ecx, dword [ebp - 0x13c]
lea edx, [ebp - 0x110]
call fcn.00459c8c
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.0047db99
add esp, 0x18
cmp eax, 4
jne 0x461ea5
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.0045da49
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.00463dfb
add esp, 0x20
test eax, eax
jne 0x461ea8
mov ecx, dword [ebp - 0x13c]
call fcn.00469267
mov eax, dword [ebp - 0x140]
mov dword [eax + 0x48], 2
mov eax, dword [edi + 0x16c]
mov dword [eax + 0x68], 0x19
xor eax, eax
jmp 0x461ea8
push str.bind_2__failed_on_socket
jmp 0x461e9d
push str.socket_2__failed___s_
push esi
call fcn.0045dab8
pop ecx
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047aabf
mov esp, ebp
pop ebp
ret