Function at 0x405ab0
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x28], 0
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x38]
mov dword [ecx + 0x40], eax
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x40], 0xffffffff
jne 0x405ae2
xor eax, eax
jmp 0x405c72
mov dword [ebp - 0x24], 0
push 0
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 4
lea ecx, [ebp - 0x24]
push ecx
push 0x9800000c
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x40]
push eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
push 4
lea ecx, [ebp - 0x24]
push ecx
push 0xfffffffffffffffb
push 0xffff
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x40]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [ebp - 0x24]
push ecx
push 4
push 0xffff
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x40]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ecx, dword [ebp - 0x38]
mov dword [ecx + 0x44], eax
mov dword [ebp - 8], 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
add ecx, 1
push ecx
call fcn.0040e960
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x20], edx
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp - 0x1c]
mov byte [ecx], 0
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0040f3fb
add esp, 4
cmp dword [ebp - 8], 0
jne 0x405bea
xor eax, eax
jmp 0x405c72
mov edx, 2
mov word [ebp - 0x18], dx
movzx eax, word [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x16], ax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
push 0x30
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x44]
push eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x40]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x405c6f
push 0x10
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x40]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x405c62
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x405c59
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x405c62
mov dword [ebp - 0x3c], 0
jmp 0x405c69
mov dword [ebp - 0x3c], 1
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov esp, ebp
pop ebp
ret 8