Function at 0x1004ed10
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov ebp, ecx
mov eax, dword [ebp + 0x44]
lea esi, [ebp + 0x40]
push edi
xor edi, edi
cmp eax, edi
je 0x1004ef33
mov ecx, dword [esi + 8]
mov ebx, dword [esp + 0x30]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x1004ef33
mov eax, dword [esi + 4]
cmp eax, edi
je 0x1004ed70
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x1004ed75
call fcn.1015988d
mov ecx, dword [esi + 4]
lea eax, [ebx*8]
sub eax, ebx
mov edx, dword [ecx + eax*4]
cmp edx, dword [esp + 0x28]
jne 0x1004ef33
push ebx
mov ecx, esi
call fcn.1004d840
mov eax, dword [eax + 4]
cmp eax, dword [esp + 0x2c]
jne 0x1004ef33
cmp dword [ebp + 0x14], edi
jbe 0x1004eea3
add dword [ebp + 0x54], 1
mov dword [esp + 0x28], edi
mov eax, dword [esi + 4]
test eax, eax
je 0x1004eea3
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x1004eea3
push edi
mov ecx, esi
call fcn.1004d840
cmp dword [eax], 0xffffffff
je 0x1004ee97
cmp dword [eax + 4], 0xffffffff
je 0x1004ee97
push edi
mov ecx, esi
call fcn.1004d840
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, esi
lea ebx, [eax + 0x18]
call fcn.1004d840
mov edx, dword [ebx]
cmp edx, dword [eax + 0x18]
jae 0x1004ee93
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov ecx, esi
mov ebx, eax
call fcn.1004d840
sub ebx, dword [eax + 0x10]
mov eax, dword [ebp + 0x64]
imul eax, dword [ebp + 0x24]
cmp ebx, eax
jbe 0x1004ee93
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov ecx, esi
mov ebx, eax
call fcn.1004d840
push edi
mov ecx, esi
mov dword [eax + 0x10], ebx
call fcn.1004d840
add dword [eax + 0x14], 1
add eax, 0x14
push edi
mov ecx, esi
call fcn.1004d840
mov ecx, dword [ebp + 0x54]
push edi
mov dword [eax + 0x18], ecx
push edi
mov ecx, esi
call fcn.1004d840
push eax
lea ecx, [esp + 0x18]
call fcn.1004d800
mov ecx, dword [esp + 0x34]
push eax
call fcn.1004eb50
mov eax, dword [esp + 0x28]
add eax, 1
cmp eax, dword [ebp + 0x14]
mov dword [esp + 0x28], eax
ja 0x1004ee9f
mov ebx, dword [esp + 0x30]
add edi, 1
jmp 0x1004edb4
mov ebx, dword [esp + 0x30]
push ebx
mov ecx, esi
call fcn.1004d840
cmp dword [eax + 0x14], 1
jne 0x1004eeb8
mov ecx, ebp
call fcn.1004d8d0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
mov ecx, esi
mov edi, eax
call fcn.1004d840
mov eax, dword [eax + 0x10]
cmp edi, eax
jb 0x1004eed3
sub edi, eax
jmp 0x1004eed8
sub edi, eax
sub edi, 1
mov edx, dword [ebp + 0x24]
lea ecx, [edi + edx*2]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
cmp edx, 0x1f4
mov dword [ebp + 0x24], edx
jae 0x1004eef9
mov dword [ebp + 0x24], 0x1f4
mov eax, 0x7d0
cmp dword [ebp + 0x24], eax
jbe 0x1004ef06
mov dword [ebp + 0x24], eax
push ebx
mov ecx, esi
call fcn.1004d840
xor ecx, ecx
or edx, 0xffffffff
pop edi
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
add dword [ebp + 0x34], edx
pop esi
mov dword [ebp + 0x38], ebx
pop ebp
mov al, 1
pop ebx
add esp, 0x14
ret 0x10
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x14
ret 0x10