Function at 0x46b450
Capabilities:
Convert ip address from string
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51e135
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 4], 0
mov eax, 0x528928
lea ecx, [ebp - 0x54]
call fcn.0040fae0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x54]
call fcn.004603c0
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0
lea esi, [ebp - 0x54]
call fcn.004150b0
lea edi, [ebx + 8]
mov dword [ebp - 0x18], edi
push edi
lea eax, [ebp - 0x34]
push eax
call fcn.004f0050
add esp, 8
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004603c0
mov dword [ebx + 0x104], eax
mov byte [ebp - 4], 0
lea esi, [ebp - 0x34]
call fcn.004150b0
push edi
call fcn.0045e7d0
add esp, 4
test al, al
jne 0x46b5ad
cmp dword [edi + 0x10], 3
jb 0x46b504
push 2
push 0x5368a8
push edi
xor eax, eax
call fcn.00460c60
cmp eax, 0xffffffff
jne 0x46b5ad
mov eax, 0x528928
lea ecx, [ebp - 0x54]
call fcn.0040fae0
mov byte [ebp - 4], 3
mov eax, dword [ebx + 0x104]
test al, 1
je 0x46b53a
test byte [ebp - 0x14], 1
je 0x46b53a
push 1
push edi
lea ecx, [ebp - 0x34]
push ecx
call fcn.0045f420
add esp, 0xc
mov byte [ebp - 4], 4
jmp 0x46b551
test al, 2
je 0x46b56a
push 0
push edi
lea edx, [ebp - 0x34]
push edx
call fcn.0045f420
add esp, 0xc
mov byte [ebp - 4], 5
mov edi, eax
lea esi, [ebp - 0x54]
call fcn.00411aa0
mov byte [ebp - 4], 3
lea esi, [ebp - 0x34]
call fcn.004150b0
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 0x44], 0
je 0x46b60d
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x34]
push ecx
call fcn.004ee870
add esp, 8
mov byte [ebp - 4], 6
mov edi, eax
mov esi, dword [ebp - 0x18]
call fcn.004117d0
mov byte [ebp - 4], 3
lea esi, [ebp - 0x34]
call fcn.004150e0
mov byte [ebp - 4], 0
lea esi, [ebp - 0x54]
call fcn.004150b0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebx + 0x104]
test al, 1
je 0x46b690
test byte [ebp - 0x14], 1
je 0x46b690
mov ecx, 2
mov word [ebx + 0x50], cx
cmp dword [edi + 0x14], 0x10
jb 0x46b5d6
mov edi, dword [edi]
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebx + 0x54], eax
movzx edx, word [ebx + 0x40]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 0x52], ax
cmp byte [ebx + 0x49], 0
je 0x46b67f
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 0x4c], eax
jmp 0x46b707
push edi
lea edx, [ebp - 0x70]
push edx
call fcn.004f0050
mov bl, 7
mov byte [ebp - 4], bl
push eax
lea eax, [ebp - 0x34]
push eax
mov edx, str.GetIpAddressByHost_failed___Server
call fcn.00413910
mov byte [ebp - 4], 8
push 0x10
push 0x20000000
push eax
push 0x89
push str.Socket::create
call fcn.0044d970
add esp, 0x24
mov byte [ebp - 4], bl
lea esi, [ebp - 0x34]
call fcn.004150b0
mov byte [ebp - 4], 3
lea esi, [ebp - 0x70]
call fcn.004150b0
mov byte [ebp - 4], 0
lea esi, [ebp - 0x54]
call fcn.004150b0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 0x4c], eax
jmp 0x46b707
test al, 2
jne 0x46b69a
test byte [ebp - 0x14], 2
je 0x46b707
xor eax, eax
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x68], eax
mov dword [ebx + 0x6c], eax
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x74], eax
mov dword [ebx + 0x78], eax
cmp dword [edi + 0x14], 0x10
jb 0x46b6b9
mov edi, dword [edi]
lea eax, [ebx + 0x68]
push eax
push edi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x46b707
mov ecx, 0x17
mov word [ebx + 0x60], cx
movzx edx, word [ebx + 0x40]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 0x62], ax
cmp byte [ebx + 0x49], 0
je 0x46b6ee
push 6
push 1
jmp 0x46b6f2
push 0x11
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 0x4c], eax
mov dword [ebx + 0x104], 2
mov eax, dword [ebx + 0x4c]
cmp eax, 0xffffffff
jne 0x46b768
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.004ef520
mov bl, 9
mov byte [ebp - 4], bl
push eax
lea ecx, [ebp - 0x34]
push ecx
mov edx, str.::socket_invalid_:
call fcn.00413910
mov byte [ebp - 4], 0xa
push 0x10
push 0x20000000
push eax
push 0xb6
push str.Socket::create
call fcn.0044d970
add esp, 0x24
mov byte [ebp - 4], bl
lea esi, [ebp - 0x34]
call fcn.004150b0
mov byte [ebp - 4], 0
lea esi, [ebp - 0x70]
jmp 0x46b667
mov dword [ebp - 0x38], 1
push 4
lea edx, [ebp - 0x38]
push edx
push 4
push 0xffff
push eax
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
call esi
cmp eax, 0xffffffff
jne 0x46b7c1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.004ef520
mov bl, 0xb
mov byte [ebp - 4], bl
push eax
lea ecx, [ebp - 0x34]
push ecx
mov edx, str.::setsockopt_SO_REUSEADDR_failed_:
call fcn.00413910
mov byte [ebp - 4], 0xc
push 0x10
push 0x20000000
push eax
push 0xc0
jmp 0x46b744
cmp byte [ebx + 0x49], 0
je 0x46b855
mov dword [ebp - 0x14], 0x30001
push 4
lea ecx, [ebp - 0x14]
push ecx
push 0x80
push 0xffff
mov edx, dword [ebx + 0x4c]
push edx
call esi
cmp eax, 0xffffffff
jne 0x46b846
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.004ef520
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x34]
push ecx
mov edx, str.::setsockopt_SO_LINGER_failed_:
call fcn.00413910
mov byte [ebp - 4], 0xe
push 0x10
push 0x20000000
push eax
push 0xce
push str.Socket::create
call fcn.0044d970
add esp, 0x24
mov byte [ebp - 4], 0xd
lea esi, [ebp - 0x34]
call fcn.004150b0
mov byte [ebp - 4], 0
lea esi, [ebp - 0x70]
call fcn.004150b0
mov ecx, dword [ebx + 0x44]
test ecx, ecx
jle 0x46b855
push ecx
mov edx, ebx
call fcn.0046c610
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret