Function at 0x462c20
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, ecx
push esi
mov ecx, dword [esp + 0x30]
xor esi, esi
cmp ecx, esi
push edi
je 0x462f0c
cmp dword [esp + 0x38], esi
je 0x462f0c
mov eax, dword [ebp + 4]
cmp eax, 0xffffffff
je 0x462d12
push eax
call sub.wsock32.dll_closesocket
mov edi, 0x870c08
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
lea ebx, [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, ebx
push edi
mov dword [esp + 0x1c], edi
call fcn.00401b40
test al, al
je 0x462ca3
mov ecx, edi
mov edi, dword [ebx + 4]
mov eax, ecx
mov esi, 0x870c08
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], eax
xor esi, esi
mov byte [ecx + eax], 0
mov edx, dword [ebp + 0x4003c]
mov dword [ebp + 0x1c], esi
push edx
mov dword [ebp + 0x40020], esi
mov dword [ebp + 0x40094], 1
mov dword [ebp + 0x40038], esi
call fcn.007a02e0
add esp, 4
mov ecx, 0x9a2cb0
mov dword [ebp + 0x4003c], esi
call fcn.007a01c0
push esi
push esi
mov ecx, 0x9a2cb0
call fcn.007a0180
push 0x74125800
push 0x96385200
mov ecx, 0x9a2cb0
call fcn.007a01a0
mov ecx, dword [esp + 0x34]
mov dword [0x9e2e6c], esi
mov word [0x9e2e70], si
mov dword [0x9e2e68], esi
mov al, byte [ecx]
cmp al, 0x30
jl 0x462d50
cmp al, 0x39
jg 0x462d50
xor eax, eax
push ecx
mov dword [esp + 0x20], eax
mov word [esp + 0x20], 2
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call sub.wsock32.dll_inet_addr
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], eax
push ecx
call sub.wsock32.dll_htons
mov word [esp + 0x1e], ax
jmp 0x462da5
push ecx
call sub.wsock32.dll_gethostbyname
cmp eax, esi
je 0x462f0c
xor edx, edx
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0xa]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
mov ax, word [eax + 8]
push ecx
mov word [esp + 0x20], ax
call sub.wsock32.dll_htons
mov word [esp + 0x1e], ax
xor esi, esi
push esi
push 1
push 2
call sub.wsock32.dll_socket
cmp eax, 1
mov dword [ebp + 4], eax
jae 0x462dc6
call sub.wsock32.dll_WSAGetLastError
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
lea edx, [esp + 0x18]
push 4
push edx
push 0x1002
push 0xffff
push eax
mov dword [esp + 0x2c], 0x40000
call sub.wsock32.dll_setsockopt
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x10]
push 4
push eax
push 0x80
push 0xffff
push ecx
mov word [esp + 0x24], 1
mov word [esp + 0x26], si
call sub.wsock32.dll_setsockopt
mov eax, dword [ebp + 4]
lea edx, [esp + 0x1c]
push 0x10
push edx
push eax
call sub.wsock32.dll_connect
test eax, eax
je 0x462e42
call sub.wsock32.dll_WSAGetLastError
mov ecx, dword [ebp + 4]
mov esi, eax
push ecx
call sub.wsock32.dll_closesocket
mov eax, esi
pop edi
mov dword [ebp + 4], 0xffffffff
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
mov esi, dword [esp + 0x30]
mov edx, dword [ebp + 4]
push 0x31
push 0x401
push esi
push edx
call sub.wsock32.dll_WSAAsyncSelect
mov dword [ebp + 8], esi
mov esi, dword [esp + 0x34]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea ebx, [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
cmp edi, 0xfffffffd
mov dword [esp + 0x34], edi
jbe 0x462e7d
call fcn.007a02eb
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x462ea2
mov al, byte [ecx - 1]
test al, al
je 0x462ea2
cmp al, 0xff
je 0x462ea2
test edi, edi
jne 0x462ec6
dec al
push edi
mov byte [ecx - 1], al
mov ecx, ebx
call fcn.00404e60
jmp 0x462eef
test edi, edi
jne 0x462eb1
push 1
mov ecx, ebx
call fcn.00404e60
jmp 0x462eef
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x462ebd
cmp eax, edi
jae 0x462ece
push 1
mov ecx, ebx
call fcn.00404e60
push edi
mov ecx, ebx
call fcn.00401c60
mov ecx, edi
mov edi, dword [ebx + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], eax
mov byte [ecx + eax], 0
mov edx, dword [esp + 0x38]
pop edi
mov dword [ebp + 0x1c], edx
mov dword [ebp + 0x40020], 1
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret 0xc