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

Disassembly:
push 0x40
mov eax, 0x4a30ab
call fcn.0048104e
mov edi, ecx
mov esi, dword [edi + 0x98]
xorps xmm0, xmm0
xor al, al
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x4c], xmm0
movlpd qword [ebp - 0x44], xmm0
movsd qword [ebp - 0x3c], xmm0
mov byte [ebp - 0xd], al
test esi, esi
je 0x43992c
add esi, 0x9c
push esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [edi + 0x98]
and dword [ebp - 4], 0
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx + 0xc]
mov ebx, dword [ecx + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x1c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0x24]
mov dword [ebp - 0x14], eax
mov al, byte [ecx + 2]
mov byte [ebp - 0xe], al
lea eax, [ebp - 0xf]
push eax
lea eax, [edi + 0x14]
mov dword [ebp - 0x24], edx
push eax
lea eax, [ecx + 0x44]
push eax
call fcn.004364e4
or dword [ebp - 4], 0xffffffff
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x2c]
jmp 0x43995c
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x1c], eax
mov al, byte [ebp + 0xb]
mov dword [ebp - 0x24], edx
mov byte [ebp - 0xe], al
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
mov al, byte [ebp - 0xe]
mov dword [ebp - 0x2c], edx
test al, al
jne 0x439980
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x18], eax
mov eax, edx
sub eax, dword [edi + 0x24]
add eax, dword [edi + 0x28]
push 0
pop ecx
adc ecx, dword [edi + 0x2c]
mov dword [ebp - 0x1c], ecx
mov dword [edi + 0x2c], ecx
mov ecx, dword [edi + 0x38]
mov dword [ebp - 0x14], eax
add ecx, 3
mov dword [edi + 0x28], eax
mov eax, dword [edi + 0x3c]
adc eax, 0
mov dword [edi + 0x24], edx
push 0x64
pop edx
mul edx
push 0x64
mov esi, eax
mov eax, ecx
pop ecx
mul ecx
add esi, edx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jb 0x4399e2
mov edx, dword [ebp - 0x14]
ja 0x4399cb
cmp edx, ecx
jbe 0x4399e2
push 0
mov ecx, 0x3e8
push ecx
push eax
push edx
call fcn.004814b0
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], edx
jmp 0x4399ec
cmp byte [ebp + 8], 0
je 0x439ad3
mov edx, dword [ebp - 0x20]
mov eax, edx
mov ecx, dword [ebp - 0x18]
or eax, ecx
je 0x439ad3
mov esi, dword [ebp - 0x24]
mov eax, ebx
and eax, esi
cmp eax, 0xffffffff
jne 0x439a1d
mov eax, dword [edi + 0x40]
and eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x439a92
or dword [edi + 0x40], 0xffffffff
or dword [edi + 0x44], 0xffffffff
jmp 0x439a92
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
cmp ecx, esi
ja 0x439a53
jb 0x439a2f
cmp edx, ebx
jae 0x439a53
push ecx
mov ecx, ebx
mov eax, esi
sub ecx, edx
push edx
sbb eax, dword [ebp - 0x18]
push eax
push ecx
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call fcn.004366a4
mov ecx, eax
mov dword [ebp + 8], eax
add esp, 0x18
mov eax, edx
jmp 0x439a5c
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], ecx
push 0
mov edx, 0x3e8
mov dword [ebp - 0x2c], eax
push edx
push eax
push ecx
call fcn.004814b0
mov ecx, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], ecx
cmp eax, dword [edi + 0x40]
jne 0x439a86
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [edi + 0x44]
je 0x439a92
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], edx
mov dword [edi + 0x40], ecx
mov dword [edi + 0x44], edx
mov eax, dword [ebp - 0x14]
or eax, dword [ebp - 0x1c]
jne 0x439aa4
and dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x18]
mov ecx, 0x3e8
push dword [ebp - 0x1c]
mul ecx
mov edx, 0x3e8
mov ecx, eax
mov eax, dword [ebp - 0x20]
mul edx
add ecx, edx
mov edx, dword [ebp - 0x14]
push edx
push ecx
push eax
call fcn.004814b0
mov dword [ebp - 0x2c], edx
mov byte [ebp - 0xd], 1
jmp 0x439adf
mov eax, dword [ebp - 0x48]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp + 8], eax
mov eax, ebx
and eax, esi
cmp eax, 0xffffffff
je 0x439b2c
test ebx, ebx
jne 0x439af3
test esi, esi
je 0x439b2c
mov eax, dword [ebp - 0x18]
push 0x64
pop ecx
mul ecx
mov esi, eax
mov eax, dword [ebp - 0x20]
mul ecx
add edx, esi
mov ecx, eax
call fcn.00481db0
mov edx, dword [ebp - 0x24]
mov ecx, ebx
movsd qword [ebp - 0x3c], xmm0
call fcn.00481db0
movsd xmm1, qword [ebp - 0x3c]
mov bl, 1
divsd xmm1, xmm0
movsd qword [ebp - 0x3c], xmm1
jmp 0x439b34
mov bl, byte [ebp - 0xd]
movsd xmm1, qword [ebp - 0x3c]
movaps xmm0, xmm1
subsd xmm0, qword [edi + 0x30]
push ecx
push ecx
movsd qword [esp], xmm0
call fcn.0048a51e
fstp qword [ebp - 0x4c]
movsd xmm0, qword [ebp - 0x4c]
comisd xmm0, xmmword [0x4a9fd8]
pop ecx
pop ecx
jb 0x439b66
movsd xmm0, qword [ebp - 0x3c]
movsd qword [edi + 0x30], xmm0
test bl, bl
je 0x439c1a
push 0x28
call fcn.00480fbd
mov esi, eax
mov dword [ebp - 0x30], esi
pop ecx
test esi, esi
je 0x439b9f
xor eax, eax
xorps xmm0, xmm0
mov byte [esi], al
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
movsd qword [esi + 0x18], xmm0
mov dword [esi + 0x24], eax
mov dword [esi + 0x20], eax
jmp 0x439ba1
xor esi, esi
mov eax, dword [ebp + 8]
lea ecx, [edi + 0x14]
movsd xmm0, qword [ebp - 0x3c]
push 2
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x2c]
pop ebx
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x44]
push 0
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x40]
push str.ck_W
movsd qword [esi + 0x18], xmm0
mov dword [esi + 0x14], eax
call fcn.0040324a
cmp eax, dword [edi + 0x18]
jae 0x439be3
mov eax, dword [ebp - 0x28]
push 3
mov dword [esi + 0x20], eax
pop ebx
dec ebx
sub ebx, 1
je 0x439bfb
sub ebx, 1
jne 0x439c1a
push ebx
push dword [esi + 0x20]
mov ecx, edi
call fcn.004392b8
jmp 0x439c1a
movsd xmm0, qword [esi + 0x18]
push ecx
push ecx
movsd qword [esp], xmm0
mov ecx, edi
push dword [esi + 0x14]
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
call fcn.004393bb
call fcn.00481017
ret 4