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

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0x340
push ebx
push esi
xor esi, esi
cmp dword [ebp + 0x7c], esi
push edi
mov dword [ebp + 0x40], esi
mov dword [ebp + 0x44], esi
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x5c], esi
jl 0x4103db
mov eax, accept
jg 0x4103d5
cmp dword [ebp + 0x78], eax
jb 0x4103db
mov dword [ebp + 0x78], eax
mov dword [ebp + 0x7c], esi
mov ebx, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x70]
mov edx, dword [ebp + 0x74]
or edi, 0xffffffff
cmp ebx, edi
jne 0x410401
cmp ecx, edi
jne 0x410401
cmp edx, edi
jne 0x410401
push dword [ebp + 0x78]
call fcn.00410385
pop ecx
jmp 0x4106ce
cmp dword [ebp + 0x7c], esi
jl 0x410431
jg 0x41040d
cmp dword [ebp + 0x78], esi
jbe 0x410431
mov eax, dword [ebp + 0x78]
mov dword [ebp + 0x5c], eax
lea eax, [ebp + 0x30]
push eax
call fcn.0041a826
mov edx, dword [ebp + 0x74]
mov esi, eax
lea edi, [ebp + 0x40]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
mov ecx, dword [ebp + 0x70]
or edi, 0xffffffff
xor esi, esi
mov dword [ebp - 0xd4], esi
mov dword [ebp + 0x60], edi
mov dword [ebp - 0x1d8], esi
cmp ebx, edi
je 0x410462
xor esi, esi
inc esi
mov dword [ebp - 0x1d4], ebx
mov dword [ebp - 0x1d8], esi
mov dword [ebp - 0xd0], ebx
mov dword [ebp - 0xd4], esi
mov dword [ebp + 0x60], ebx
cmp ecx, edi
je 0x4104d9
xor eax, eax
test esi, esi
jbe 0x41047a
cmp dword [ebp + eax*4 - 0x1d4], ecx
je 0x41047a
inc eax
cmp eax, esi
jb 0x41046c
cmp eax, esi
jne 0x410497
cmp esi, 0x40
jae 0x410497
mov dword [ebp + eax*4 - 0x1d4], ecx
mov esi, dword [ebp - 0x1d8]
inc esi
mov dword [ebp - 0x1d8], esi
xor eax, eax
cmp dword [ebp - 0xd4], eax
jbe 0x4104b3
cmp dword [ebp + eax*4 - 0xd0], ecx
je 0x4104b3
inc eax
cmp eax, dword [ebp - 0xd4]
jb 0x4104a1
cmp eax, dword [ebp - 0xd4]
jne 0x4104d1
cmp dword [ebp - 0xd4], 0x40
jae 0x4104d1
mov dword [ebp + eax*4 - 0xd0], ecx
inc dword [ebp - 0xd4]
cmp ecx, dword [ebp + 0x60]
jbe 0x4104d9
mov dword [ebp + 0x60], ecx
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x2dc], ecx
cmp edx, edi
je 0x41052c
mov edi, dword [ebp - 0xd4]
inc ecx
xor eax, eax
mov dword [ebp - 0x2d8], edx
mov dword [ebp - 0x2dc], ecx
cmp edi, ebx
jbe 0x41050e
cmp dword [ebp + eax*4 - 0xd0], edx
je 0x41050e
inc eax
cmp eax, edi
jb 0x410500
cmp eax, edi
jne 0x410524
cmp edi, 0x40
jae 0x410524
mov dword [ebp + eax*4 - 0xd0], edx
inc dword [ebp - 0xd4]
cmp edx, dword [ebp + 0x60]
jbe 0x41052c
mov dword [ebp + 0x60], edx
cmp dword [ebp + 0x7c], ebx
jg 0x41053d
jl 0x410538
cmp dword [ebp + 0x78], ebx
jae 0x41053d
mov dword [ebp + 0x58], ebx
jmp 0x410543
lea eax, [ebp + 0x50]
mov dword [ebp + 0x58], eax
mov ebx, dword [ebp + 0x60]
inc ebx
jmp 0x410555
mov esi, dword [ebp - 0x1d8]
mov ecx, dword [ebp - 0x2dc]
xor eax, eax
cmp dword [ebp + 0x7c], eax
jl 0x410579
jg 0x410563
cmp dword [ebp + 0x78], eax
jbe 0x410579
mov eax, dword [ebp + 0x5c]
cdq
mov edi, 0x3e8
idiv edi
imul edx, edx, 0x3e8
mov dword [ebp + 0x54], edx
jmp 0x410584
mov edx, dword [ebp + 0x78]
or edx, dword [ebp + 0x7c]
jne 0x410587
mov dword [ebp + 0x54], eax
mov dword [ebp + 0x50], eax
push dword [ebp + 0x58]
neg ecx
lea eax, [ebp - 0xd4]
push eax
sbb ecx, ecx
lea eax, [ebp - 0x2dc]
and ecx, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x1d8]
push ecx
and esi, eax
push esi
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x410621
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x4105d1
cmp dword [0x48f670], 0
jne 0x410625
cmp eax, 0x2714
jne 0x410625
cmp dword [ebp + 0x7c], 0
jl 0x410549
jg 0x4105e7
cmp dword [ebp + 0x78], 0
jbe 0x410549
lea eax, [ebp + 0x30]
push eax
call fcn.0041a826
sub esp, 0xc
mov edi, esp
lea esi, [ebp + 0x40]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0041a84b
mov ecx, dword [ebp + 0x78]
sub ecx, eax
add esp, 0x20
mov dword [ebp + 0x5c], ecx
test ecx, ecx
jg 0x410549
xor eax, eax
test eax, eax
jge 0x41062d
or eax, 0xffffffff
jmp 0x4106ce
jne 0x410636
xor eax, eax
jmp 0x4106ce
xor esi, esi
cmp dword [ebp + 0x6c], 0xffffffff
je 0x410668
lea eax, [ebp - 0x1d8]
push eax
push dword [ebp + 0x6c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410652
inc esi
lea eax, [ebp - 0xd4]
push eax
push dword [ebp + 0x6c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410668
or esi, 4
cmp dword [ebp + 0x70], 0xffffffff
je 0x41069a
lea eax, [ebp - 0x1d8]
push eax
push dword [ebp + 0x70]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410684
or esi, 8
lea eax, [ebp - 0xd4]
push eax
push dword [ebp + 0x70]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41069a
or esi, 4
cmp dword [ebp + 0x74], 0xffffffff
je 0x4106cc
lea eax, [ebp - 0x2dc]
push eax
push dword [ebp + 0x74]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4106b6
or esi, 2
lea eax, [ebp - 0xd4]
push eax
push dword [ebp + 0x74]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4106cc
or esi, 4
mov eax, esi
pop edi
pop esi
pop ebx
add ebp, 0x64
leave
ret