Function at 0x103215b
Capabilities:
Check for time delay via gettickcount
Connect socket
Get socket status

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x1048628]
push edi
mov edi, ecx
mov dword [ebp - 4], eax
mov dword [ebp - 0x20], edi
call fcn.01031832
test eax, eax
je 0x1032185
xor eax, eax
inc eax
jmp 0x10323c2
push esi
mov esi, dword [ebp + 8]
cmp esi, 0xffffffff
jne 0x1032195
xor eax, eax
jmp 0x10323c1
push ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [edi + 0x1288]
mov ebx, eax
sub ebx, edx
mov ecx, 0x7530
cmp ebx, ecx
jb 0x10323ba
test edx, edx
je 0x10321c5
sub eax, dword [edi + 0x127c]
cmp eax, ecx
jb 0x10323ba
push 6
xor edi, edi
inc edi
push edi
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10323b6
lea eax, [ebp - 0x28]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x28], edi
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
test eax, eax
jne 0x10323b6
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x50
mov word [ebp - 0x14], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x12], ax
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
mov dword [ebp - 0x10], esi
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x1032233
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x274d
jne 0x103223b
xor esi, esi
inc esi
jmp 0x1032391
cmp eax, 0x2733
jne 0x1032387
push 0x41
pop ecx
xor eax, eax
lea edi, [ebp - 0x134]
rep stosd dword es:[edi], eax
push 0x41
pop ecx
lea edi, [ebp - 0x238]
xor esi, esi
rep stosd dword es:[edi], eax
mov eax, 0x2bc
mov dword [ebp - 0x1c], esi
mov edx, dword [ebp - 0x134]
xor ecx, ecx
cmp edx, esi
mov dword [ebp - 0x18], esi
jbe 0x1032285
cmp dword [ebp + ecx*4 - 0x130], ebx
je 0x1032285
inc ecx
cmp ecx, edx
jb 0x1032277
cmp ecx, edx
jne 0x103229b
cmp edx, 0x40
jae 0x103229b
mov dword [ebp + ecx*4 - 0x130], ebx
inc dword [ebp - 0x134]
mov edx, dword [ebp - 0x238]
xor ecx, ecx
cmp edx, esi
jbe 0x10322b5
cmp dword [ebp + ecx*4 - 0x234], ebx
je 0x10322b5
inc ecx
cmp ecx, edx
jb 0x10322a7
cmp ecx, edx
jne 0x10322cb
cmp edx, 0x40
jae 0x10322cb
mov dword [ebp + ecx*4 - 0x234], ebx
inc dword [ebp - 0x238]
xor edx, edx
mov ecx, 0x3e8
div ecx
xor edi, edi
inc edi
mov dword [ebp - 0x30], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x134]
push eax
push esi
push edi
mov dword [ebp - 0x2c], edx
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
jne 0x103230d
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x18], eax
jmp 0x103235b
cmp eax, esi
je 0x103235b
lea eax, [ebp - 0x134]
push eax
push ebx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x10323b6
lea eax, [ebp - 0x238]
push eax
push ebx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x103235b
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x1007
push 0xffff
push ebx
mov dword [ebp - 0x24], 4
call dword [sym.imp.WSOCK32.dll_getsockopt]
test eax, eax
jne 0x1032387
cmp dword [ebp - 0x18], 0x274d
je 0x10323b6
mov ecx, dword [ebp - 0x20]
call fcn.01031832
test eax, eax
jne 0x10323b6
cmp dword [ebp - 0x18], esi
jne 0x1032387
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 3
mov eax, 0x190
jb 0x1032268
mov ecx, dword [ebp - 0x20]
call fcn.01031832
mov esi, eax
mov edi, dword [ebp - 0x20]
mov dword [edi + 0x128c], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp ebx, 0xffffffff
mov dword [edi + 0x1288], eax
je 0x10323b2
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, esi
jmp 0x10323c0
mov esi, edi
jmp 0x1032391
mov eax, dword [edi + 0x128c]
pop ebx
pop esi
mov ecx, dword [ebp - 4]
pop edi
call fcn.01018732
leave
ret 4