Function at 0x415d50
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x61df80]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x38], ecx
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x38]
add ecx, 4
call fcn.00418bb0
lea edx, [ebp - 0x34]
push edx
mov ecx, dword [ebp - 0x38]
add ecx, 4
call fcn.0041e030
push eax
lea ecx, [ebp - 0x1c]
call fcn.00412890
movzx eax, al
test eax, eax
je 0x415da5
lea ecx, [ebp - 0x1c]
call fcn.0043ccd0
mov eax, dword [eax + 4]
jmp 0x415f8e
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
mov edx, 2
mov word [ebp - 0x14], dx
push 0x5ec538
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
movzx eax, word [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
call fcn.00401ff0
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x415e39
push 1
movzx ecx, byte [0x62334b]
push ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x24]
mov edx, dword [eax + 0xc]
call edx
movzx eax, al
test eax, eax
je 0x415e39
movzx ecx, word [ebp + 8]
push ecx
movzx edx, word [ebp + 0xc]
push edx
push str.new_connection_and_create__u__u__n
push 0x27f
push 0x5ec568
push 1
movzx eax, byte [0x62334b]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [edx + 0x10]
call ecx
add esp, 0x20
xor edx, edx
jne 0x415dd9
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x20], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x415ee9
call fcn.00401ff0
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x415ec0
push 4
movzx edx, byte [0x62334b]
push edx
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x28]
mov eax, dword [edx + 0xc]
call eax
movzx ecx, al
test ecx, ecx
je 0x415ec0
movzx edx, word [ebp + 0xc]
push edx
push str.at__d_peerSocket_connect_failed___Close_client_local_connection_n
push 0x283
push 0x5ec57c
push 4
movzx eax, byte [0x62334b]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [edx + 0x10]
call ecx
add esp, 0x1c
xor edx, edx
jne 0x415e65
mov eax, dword [ebp - 0x20]
push eax
call fcn.0058db40
add esp, 4
movzx ecx, word [ebp + 0xc]
push ecx
movzx edx, word [ebp + 8]
push edx
mov ecx, dword [ebp - 0x38]
call fcn.00418940
xor eax, eax
jmp 0x415f8e
mov eax, dword [ebp - 0x20]
push eax
call fcn.0058dab0
add esp, 4
cmp eax, 0xffffffff
jne 0x415f76
call fcn.00401ff0
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x415f50
push 4
movzx ecx, byte [0x62334b]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax + 0xc]
call edx
movzx eax, al
test eax, eax
je 0x415f50
push str.peerSocket_set_nonblock_failed___Close_client_local_connection_n
push 0x28b
push 0x5ec618
push 4
movzx ecx, byte [0x62334b]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [eax + 0x10]
call edx
add esp, 0x18
xor eax, eax
jne 0x415efa
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0058db40
add esp, 4
movzx edx, word [ebp + 0xc]
push edx
movzx eax, word [ebp + 8]
push eax
mov ecx, dword [ebp - 0x38]
call fcn.00418940
xor eax, eax
jmp 0x415f8e
push 1
mov ecx, dword [ebp - 0x20]
push ecx
movzx edx, word [ebp + 0xc]
push edx
movzx eax, word [ebp + 8]
push eax
mov ecx, dword [ebp - 0x38]
call fcn.00415340
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c7d13
mov esp, ebp
pop ebp
ret 8