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

Disassembly:
sub esp, 0x330
push ebx
push ebp
xor edx, edx
push esi
xor esi, esi
cmp dword [esp + 0x350], edx
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
jl 0x4211d5
jg 0x4211c0
mov ebp, dword [esp + 0x350]
cmp ebp, 0x7fffffff
jb 0x4211dc
mov ebp, accept
mov dword [esp + 0x350], ebp
mov dword [esp + 0x354], edx
jmp 0x4211dc
mov ebp, dword [esp + 0x350]
mov eax, dword [esp + 0x344]
mov ecx, dword [esp + 0x348]
cmp eax, 0xffffffff
jne 0x42122f
cmp ecx, eax
jne 0x42122f
cmp dword [esp + 0x34c], eax
jne 0x42122f
cmp ebp, edx
je 0x421222
jge 0x42121b
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret
cmp dword [esp + 0x354], edx
jl 0x42127a
jg 0x42123e
cmp ebp, edx
jbe 0x42127a
mov esi, ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, dword [esp + 0x344]
imul ecx, ecx, 0x3e8
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x348]
xor edx, edx
xor edi, edi
or ebx, 0xffffffff
mov dword [esp + 0x28], edx
mov dword [esp + 0x130], edi
cmp eax, 0xffffffff
je 0x4212ae
mov edi, 1
mov edx, edi
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
mov ebx, eax
cmp ecx, 0xffffffff
je 0x42131a
xor eax, eax
test edi, edi
jbe 0x4212ce
lea esp, [esp]
cmp dword [esp + eax*4 + 0x134], ecx
je 0x4212ce
inc eax
cmp eax, edi
jb 0x4212c0
cmp eax, edi
jne 0x4212ed
cmp edi, 0x40
jae 0x4212ed
mov dword [esp + eax*4 + 0x134], ecx
mov edi, dword [esp + 0x130]
inc edi
mov dword [esp + 0x130], edi
xor eax, eax
test edx, edx
jbe 0x4212fe
cmp dword [esp + eax*4 + 0x2c], ecx
je 0x4212fe
inc eax
cmp eax, edx
jb 0x4212f3
cmp eax, edx
jne 0x421314
cmp edx, 0x40
jae 0x421314
mov dword [esp + eax*4 + 0x2c], ecx
mov edx, dword [esp + 0x28]
inc edx
mov dword [esp + 0x28], edx
cmp ecx, ebx
jbe 0x42131a
mov ebx, ecx
mov eax, dword [esp + 0x34c]
xor ecx, ecx
mov dword [esp + 0x238], ecx
cmp eax, 0xffffffff
je 0x421391
mov dword [esp + 0x23c], eax
mov ecx, 1
xor eax, eax
mov dword [esp + 0x238], ecx
test edx, edx
jbe 0x421369
jmp 0x421350
mov ebp, dword [esp + 0x34c]
cmp dword [esp + eax*4 + 0x2c], ebp
je 0x421362
inc eax
cmp eax, edx
jb 0x421350
mov ebp, dword [esp + 0x350]
cmp eax, edx
jne 0x421381
cmp edx, 0x40
jae 0x421381
mov edx, dword [esp + 0x34c]
mov dword [esp + eax*4 + 0x2c], edx
inc dword [esp + 0x28]
cmp dword [esp + 0x34c], ebx
jbe 0x421391
mov ebx, dword [esp + 0x34c]
cmp dword [esp + 0x354], 0
jg 0x4213b6
jl 0x4213a1
test ebp, ebp
jae 0x4213b6
inc ebx
mov dword [esp + 0x24], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], 0
jmp 0x4213de
inc ebx
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], eax
jmp 0x4213de
mov ecx, dword [esp + 0x238]
mov edi, dword [esp + 0x130]
cmp dword [esp + 0x354], 0
jl 0x421419
jg 0x4213ee
test ebp, ebp
jbe 0x421419
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x1c], eax
imul eax, eax, 0x3e8
mov edx, esi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x20], edx
jmp 0x42142c
mov eax, ebp
or eax, dword [esp + 0x354]
jne 0x42142c
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x10]
push edx
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x23c]
and ecx, edx
lea eax, [esp + 0x2c]
push eax
neg edi
push ecx
mov ecx, dword [esp + 0x30]
sbb edi, edi
lea eax, [esp + 0x13c]
and edi, eax
push edi
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x4214ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x42147e
cmp dword [0x470818], 0
jne 0x4214ec
cmp eax, 0x2714
jne 0x4214ec
cmp dword [esp + 0x354], 0
jl 0x4213d0
jg 0x421496
test ebp, ebp
jbe 0x4213d0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov edi, edx
shr edi, 6
mov edx, edi
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
mov eax, ecx
sub eax, dword [esp + 0x18]
push 0
cdq
push 0x3e8
push edx
push eax
call fcn.00449630
mov esi, dword [esp + 0x14]
sub esi, edi
imul esi, esi, 0x3e8
sub esi, eax
add esi, ebp
test esi, esi
jle 0x421222
jmp 0x4213d0
test edi, edi
jl 0x42120d
je 0x421222
mov edi, dword [esp + 0x344]
xor esi, esi
cmp edi, 0xffffffff
je 0x421531
lea eax, [esp + 0x130]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x42151f
mov esi, 1
lea ecx, [esp + 0x28]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x421531
or esi, 4
mov edi, dword [esp + 0x348]
cmp edi, 0xffffffff
je 0x421564
lea edx, [esp + 0x130]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x421552
or esi, 8
lea eax, [esp + 0x28]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x421564
or esi, 4
mov edi, dword [esp + 0x34c]
cmp edi, 0xffffffff
je 0x421597
lea ecx, [esp + 0x238]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x421585
or esi, 2
lea edx, [esp + 0x28]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x421597
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret