Function at 0x45b3c2
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 [0x52de80]
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.004bf1a0
add esp, 0xc
mov byte [ebp - 0x131], bl
mov dword [ebp - 0x13c], ebx
cmp dword [esi + 0x70], ebx
je 0x45b495
push dword [esi + 0x70]
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x45b43a
mov edx, dword [esi + 0x70]
mov ecx, eax
push ebx
call fcn.00462a7c
mov ebx, eax
pop ecx
mov dword [ebp - 0x13c], ebx
jmp 0x45b491
push dword [esi + 0x70]
call fcn.004c7cb0
pop ecx
cmp eax, 1
jbe 0x45b495
and dword [ebp - 0x138], ebx
lea eax, [ebp - 0x138]
push eax
push 0
lea edx, [ebp - 0x110]
mov ecx, edi
call fcn.0045326b
pop ecx
pop ecx
cmp eax, 1
jne 0x45b478
lea edx, [ebp - 0x138]
mov ecx, edi
call fcn.00461a70
mov edx, dword [ebp - 0x138]
test edx, edx
je 0x45b495
mov ebx, dword [edx]
mov ecx, esi
mov dword [ebp - 0x13c], ebx
call fcn.004533bb
test ebx, ebx
jne 0x45b4ce
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 0x45b4c7
push str.getsockname___failed
jmp 0x45b68f
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 0x45b68a
mov eax, dword [edi + 0xa4]
cmp eax, 0xffffffff
je 0x45b4f7
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp byte [ebp - 0x131], 0
mov dword [edi + 0xa4], ebx
jne 0x45b527
mov eax, dword [ebp - 0x13c]
push 0x10
push dword [eax + 0x14]
lea eax, [ebp - 0x120]
push eax
call fcn.004beb50
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 0x45b683
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 0x45b4bd
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 0x45b59b
push str.listen_2__failed_on_socket
jmp 0x45b68f
cmp byte [ebp - 0x131], 0
push 0x100
je 0x45b5c1
lea eax, [ebp - 0x110]
push eax
push 2
lea edx, [ebp - 0x11c]
pop ecx
call fcn.00462b96
pop ecx
jmp 0x45b5d2
mov ecx, dword [ebp - 0x13c]
lea edx, [ebp - 0x110]
call fcn.00453133
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.004c17dc
add esp, 0x18
cmp eax, 4
jne 0x45b697
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.0045723b
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.0045d5ed
add esp, 0x20
test eax, eax
jne 0x45b69a
mov ecx, dword [ebp - 0x13c]
call fcn.00462a64
mov eax, dword [ebp - 0x140]
mov dword [eax + 0x48], 2
mov eax, dword [edi + 0x16c]
mov dword [eax + 0x68], 0x19
xor eax, eax
jmp 0x45b69a
push str.bind_2__failed_on_socket
jmp 0x45b68f
push str.socket_2__failed___s_
push esi
call fcn.004572aa
pop ecx
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc11d
mov esp, ebp
pop ebp
ret