Function at 0x10085690
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x534
mov eax, dword [0x100ff900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [0x100fe3d0]
push edi
mov dword [ebp - 0x51c], eax
xor eax, eax
push eax
push 1
push 2
mov dword [ebp - 0x520], 1
mov dword [ebp - 0x528], eax
mov dword [ebp - 0x524], eax
mov dword [ebp - 0x52c], eax
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x100856fd
pop edi
pop esi
mov eax, 0x2b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100c5f50
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x51c]
xor eax, eax
push ebx
mov dword [ecx], edi
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x410], eax
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x408], eax
call sub.WSOCK32.dll_inet_addr
mov dword [ebp - 0x410], eax
cmp eax, 0xffffffff
jne 0x1008581a
mov edx, dword [0x1013271c]
push edx
call fcn.100853d0
add esp, 4
mov dword [ebp - 0x51c], eax
test eax, eax
je 0x1008576a
push edi
call sub.WSOCK32.dll_closesocket
mov eax, dword [ebp - 0x51c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100c5f50
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.100c6660
add esp, 0xc
push 0x400
lea ecx, [ebp - 0x404]
push ecx
push ebx
push 0
push 0
call sub.WSOCK32.dll_WSAAsyncGetHostByName
lea edx, [ebp - 0x524]
push edx
mov ebx, eax
call fcn.100851f0
add esp, 4
cmp dword [ebp - 0x404], 0
jne 0x100857fc
lea eax, [ebp - 0x528]
push eax
call fcn.100851f0
mov eax, dword [ebp - 0x528]
mov ecx, dword [ebp - 0x52c]
mov edx, eax
sub edx, dword [ebp - 0x524]
add esp, 4
add ecx, edx
mov dword [ebp - 0x52c], ecx
mov dword [ebp - 0x524], eax
cmp ecx, esi
jae 0x100858b8
push 0xa
call fcn.10085210
add esp, 4
cmp dword [ebp - 0x404], 0
je 0x100857b0
mov eax, dword [ebp - 0x3f8]
mov ecx, dword [eax]
mov eax, dword [0x1013271c]
mov edx, dword [ecx]
push eax
mov dword [ebp - 0x410], edx
call fcn.100853f0
add esp, 4
mov eax, dword [ebp + 0xc]
mov edx, 2
push eax
mov word [ebp - 0x414], dx
call sub.WSOCK32.dll_htons
mov word [ebp - 0x412], ax
mov eax, 0x10624dd3
mul esi
shr edx, 6
mov dword [ebp - 0x534], edx
imul edx, edx, 0x3e8
sub esi, edx
imul esi, esi, 0x3e8
lea ecx, [ebp - 0x520]
push ecx
push 0x8004667e
push edi
mov dword [ebp - 0x514], edi
mov dword [ebp - 0x518], 1
mov dword [ebp - 0x530], esi
call sub.WSOCK32.dll_ioctlsocket
push 0x10
lea edx, [ebp - 0x414]
push edx
push edi
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x100858e3
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x100858e3
push edi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
mov eax, 0x32
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100c5f50
mov esp, ebp
pop ebp
ret
push ebx
call sub.WSOCK32.dll_WSACancelAsyncRequest
mov ecx, dword [0x1013271c]
push ecx
call fcn.100853f0
add esp, 4
pop edi
pop esi
mov eax, 0x34
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100c5f50
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x534]
push eax
push 0
lea ecx, [ebp - 0x518]
push ecx
push 0
push 0
call sub.WSOCK32.dll_select
test eax, eax
jle 0x1008589c
lea edx, [ebp - 0x520]
push edx
push 0x8004667e
push edi
mov dword [ebp - 0x520], 0
call sub.WSOCK32.dll_ioctlsocket
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.100c5f50
mov esp, ebp
pop ebp
ret