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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x100554b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov ebx, ecx
push edi
mov dword [ebp - 0x330], ebx
mov dword [ebp - 0x328], eax
mov dword [ebp - 0x338], esi
mov dword [ebp - 0x334], esi
mov dword [ebp - 0x33c], esi
cmp ebx, esi
je 0x10022783
xor ecx, ecx
cmp edx, esi
jbe 0x10022783
cmp dword [ebx + ecx*8], 0xffffffff
jne 0x10022799
inc ecx
cmp ecx, edx
jb 0x10022778
call fcn.10022360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035d36
mov esp, ebp
pop ebp
ret
cmp eax, esi
jle 0x100227b4
mov dword [ebp - 0x33c], eax
call fcn.1002b060
mov dword [ebp - 0x338], eax
mov dword [ebp - 0x334], edx
xor ecx, ecx
xor edi, edi
xor eax, eax
mov dword [ebp - 0x320], ecx
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x324], 0xffffffff
mov dword [ebp - 0x32c], eax
lea esp, [esp]
xor edx, edx
mov word [ebx + eax*8 + 6], dx
mov edx, dword [ebx + eax*8]
cmp edx, 0xffffffff
je 0x100228c7
movzx ebx, word [ebx + eax*8 + 4]
test bl, 7
je 0x100228bb
cmp edx, dword [ebp - 0x324]
jbe 0x1002280f
mov dword [ebp - 0x324], edx
test bl, 1
je 0x1002284b
xor eax, eax
test ecx, ecx
je 0x1002282e
lea ebx, [ebx]
cmp dword [ebp + eax*4 - 0x31c], edx
je 0x1002282e
inc eax
cmp eax, ecx
jb 0x10022820
cmp eax, ecx
jne 0x1002284b
cmp ecx, 0x40
jae 0x1002284b
mov dword [ebp + eax*4 - 0x31c], edx
mov ecx, dword [ebp - 0x320]
inc ecx
mov dword [ebp - 0x320], ecx
test bl, 4
je 0x10022881
xor eax, eax
test esi, esi
je 0x10022864
cmp dword [ebp + eax*4 - 0x214], edx
je 0x10022864
inc eax
cmp eax, esi
jb 0x10022856
cmp eax, esi
jne 0x10022881
cmp esi, 0x40
jae 0x10022881
mov dword [ebp + eax*4 - 0x214], edx
mov esi, dword [ebp - 0x218]
inc esi
mov dword [ebp - 0x218], esi
test bl, 2
je 0x100228bb
xor eax, eax
test edi, edi
je 0x1002289e
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x10c], edx
je 0x1002289e
inc eax
cmp eax, edi
jb 0x10022890
cmp eax, edi
jne 0x100228bb
cmp edi, 0x40
jae 0x100228bb
mov dword [ebp + eax*4 - 0x10c], edx
mov edi, dword [ebp - 0x110]
inc edi
mov dword [ebp - 0x110], edi
mov ebx, dword [ebp - 0x330]
mov eax, dword [ebp - 0x32c]
inc eax
mov dword [ebp - 0x32c], eax
cmp eax, dword [ebp + 8]
jb 0x100227e0
test ecx, ecx
jne 0x100228ff
test esi, esi
jne 0x100228ff
test edi, edi
jne 0x100228ff
mov eax, dword [ebp - 0x328]
call fcn.10022360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035d36
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x33c]
xor eax, eax
cmp dword [ebp - 0x328], eax
lea edx, [ebp - 0x344]
setl al
dec eax
and eax, edx
mov dword [ebp - 0x32c], eax
mov eax, dword [ebp - 0x324]
inc eax
mov dword [ebp - 0x324], eax
jmp 0x10022942
mov edi, dword [ebp - 0x110]
mov esi, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x320]
mov edx, dword [ebp - 0x328]
xor eax, eax
cmp edx, eax
jle 0x1002297d
mov eax, 0x10624dd3
imul ebx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x344], eax
imul eax, eax, 0x3e8
mov edx, ebx
sub edx, eax
imul edx, edx, 0x3e8
mov dword [ebp - 0x340], edx
jmp 0x1002298b
jne 0x1002298b
mov dword [ebp - 0x344], eax
mov dword [ebp - 0x340], eax
mov eax, dword [ebp - 0x32c]
neg edi
sbb edi, edi
push eax
lea edx, [ebp - 0x110]
and edi, edx
neg esi
sbb esi, esi
lea eax, [ebp - 0x218]
and esi, eax
mov eax, dword [ebp - 0x324]
neg ecx
push edi
sbb ecx, ecx
lea edx, [ebp - 0x320]
push esi
and ecx, edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x10022a20
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x100229e5
cmp dword [0x10057348], 0
jne 0x10022a24
cmp eax, 0x2714
jne 0x10022a24
cmp dword [ebp - 0x328], 0
jle 0x10022930
mov ecx, dword [ebp - 0x334]
mov edx, dword [ebp - 0x338]
push ecx
push edx
call fcn.1002b060
push edx
push eax
call fcn.1002b090
mov ebx, dword [ebp - 0x328]
sub ebx, eax
add esp, 0x10
test ebx, ebx
jle 0x10022a3a
jmp 0x10022930
test eax, eax
jns 0x10022a38
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035d36
mov esp, ebp
pop ebp
ret
jne 0x10022a4d
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035d36
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x330]
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov dword [ebp - 0x324], 0
add esi, 6
lea esp, [esp]
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x10022ac5
lea ecx, [ebp - 0x320]
push ecx
push eax
call edi
test eax, eax
je 0x10022a8f
or word [esi], 1
mov eax, dword [esi - 6]
lea edx, [ebp - 0x218]
push edx
push eax
call edi
test eax, eax
je 0x10022aa4
or word [esi], 4
mov edx, dword [esi - 6]
lea ecx, [ebp - 0x110]
push ecx
push edx
call edi
test eax, eax
je 0x10022ab9
or word [esi], 2
cmp word [esi], 0
je 0x10022ac5
inc dword [ebp - 0x324]
add esi, 8
dec ebx
jne 0x10022a70
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x324]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10035d36
mov esp, ebp
pop ebp
ret