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

Disassembly:
mov eax, 0x2009ebda
call fcn.2007d394
sub esp, 0x450
mov eax, dword [0x200cc84c]
push esi
xor eax, ebp
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov esi, ecx
call edi
sub eax, dword [esi + 0x191fc]
cmp eax, 0x7d0
jae 0x2004196b
xor eax, eax
jmp 0x20041da0
push ebx
call edi
xor ebx, ebx
cmp dword [esi + 0x10898], ebx
mov dword [esi + 0x191fc], eax
mov dword [ebp - 0x418], ebx
je 0x2004198b
xor eax, eax
jmp 0x20041d9f
lea eax, [esi + 0x2a4]
mov cl, byte [eax]
mov eax, dword [eax]
cmp eax, ebx
mov byte [ebp - 0x414], cl
je 0x200419a4
cmp eax, 1
jne 0x200419b4
cmp byte [esi + 0x10e58], 0
je 0x200419b4
or byte [ebp - 0x414], 0x80
cmp dword [esi + 0x192e4], 1
jne 0x200419c4
or byte [ebp - 0x414], 0x40
push 0x400
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x434]
call fcn.200030b0
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x430]
mov dword [ebp - 0x42c], eax
mov byte [eax], 0
mov eax, dword [esi + 0x19044]
mov edi, dword [eax]
mov dword [ebp - 0x43c], edi
jmp 0x20041d82
cmp dword [edi + 0x24], 0
je 0x20041a26
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [edi + 0x24]
cmp eax, dword [edi + 0x28]
ja 0x20041a26
mov al, byte [ebp - 0x414]
cmp byte [esi + 0x191c0], al
je 0x20041d6b
cmp dword [edi + 0x18], 4
jb 0x20041a57
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [edi + 0x18], 0
inc dword [edi + 0x30]
mov dword [edi + 0x24], eax
mov eax, dword [edi + 0x28]
cmp eax, 0xea60
jae 0x20041d6b
add eax, 0x1770
mov dword [edi + 0x28], eax
jmp 0x20041d6b
cmp dword [edi + 0x30], 0xa
jae 0x20041d6b
test bx, bx
jne 0x20041d2a
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x440]
push eax
mov ecx, esi
call fcn.2003e3b0
push 0
lea ecx, [ebp - 0x434]
call fcn.200012d7
push 0x43
lea ecx, [ebp - 0x434]
call fcn.20001294
push 0
lea ecx, [ebp - 0x434]
call fcn.200012d7
push 0xfc
lea ecx, [ebp - 0x434]
call fcn.20001294
push 0x14
lea eax, [esi + 8]
push eax
lea ecx, [ebp - 0x434]
call fcn.20001383
push dword [ebp - 0x44c]
lea ecx, [ebp - 0x434]
call fcn.200012d7
push dword [ebp - 0x440]
lea ecx, [ebp - 0x434]
call fcn.200012d7
push dword [ebp - 0x414]
lea ecx, [ebp - 0x434]
call fcn.20001294
push 1
mov ecx, esi
call fcn.2003c5bc
mov ebx, 0xff
cmp eax, ebx
lea ecx, [ebp - 0x434]
jbe 0x20041b15
push ebx
jmp 0x20041b16
push eax
call fcn.20001294
push 0
mov ecx, esi
call fcn.2003c5bc
cmp eax, ebx
lea ecx, [ebp - 0x434]
jbe 0x20041b31
push ebx
jmp 0x20041b32
push eax
call fcn.20001294
lea eax, [esi + 0x10938]
push eax
lea ecx, [ebp - 0x438]
call fcn.200011c0
mov byte [ebp - 4], 1
mov eax, dword [esi + 0x10968]
mov ecx, dword [esi + 0x10998]
add ecx, eax
mov dword [ebp - 0x418], ecx
mov byte [ebp - 4], 0
cmp dword [ebp - 0x438], 0
je 0x20041b83
push dword [ebp - 0x438]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x438]
dec dword [eax + 0x18]
cmp dword [ebp - 0x418], ebx
lea ecx, [ebp - 0x434]
jbe 0x20041b94
push ebx
jmp 0x20041b9a
push dword [ebp - 0x418]
call fcn.20001294
lea eax, [ebp - 0x444]
push eax
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x454]
push eax
mov ecx, esi
call fcn.2003aeb9
push dword [ebp - 0x448]
lea ecx, [ebp - 0x434]
call fcn.200012d7
push dword [ebp - 0x444]
lea ecx, [ebp - 0x434]
call fcn.200012d7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x19024]
xor edx, edx
mov ecx, 0x3e8
div ecx
lea ecx, [ebp - 0x434]
push eax
call fcn.2000133b
xor eax, eax
mov al, byte [esi + 0x194b0]
lea ecx, [ebp - 0x434]
push eax
call fcn.20001294
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x434]
call fcn.2000133b
push ebx
lea ecx, [ebp - 0x434]
call fcn.200012d7
cmp dword [esi + 0x19260], ebx
jbe 0x20041c5b
lea eax, [esi + 0x1924c]
cmp dword [eax + 0x18], 0x10
jb 0x20041c4c
mov eax, dword [eax + 4]
jmp 0x20041c4f
add eax, 4
push eax
lea ecx, [ebp - 0x434]
call fcn.2000122e
push ebx
lea ecx, [ebp - 0x434]
call fcn.20001294
cmp dword [esi + 0x1971c], ebx
je 0x20041c8f
lea eax, [esi + 0x19708]
cmp dword [eax + 0x18], 0x10
jb 0x20041c80
mov eax, dword [eax + 4]
jmp 0x20041c83
add eax, 4
push eax
lea ecx, [ebp - 0x434]
call fcn.2000122e
push ebx
lea ecx, [ebp - 0x434]
call fcn.20001294
cmp dword [esi + 0x19738], ebx
je 0x20041cc3
lea eax, [esi + 0x19724]
cmp dword [eax + 0x18], 0x10
jb 0x20041cb4
mov eax, dword [eax + 4]
jmp 0x20041cb7
add eax, 4
push eax
lea ecx, [ebp - 0x434]
call fcn.2000122e
push ebx
lea ecx, [ebp - 0x434]
call fcn.20001294
xor eax, eax
mov al, byte [esi + 0x194b1]
lea ecx, [ebp - 0x434]
push eax
call fcn.20001294
cmp dword [esi + 0x19670], 0
jne 0x20041cef
xor ebx, ebx
inc ebx
cmp dword [esi + 0x19678], 0
je 0x20041cfb
or ebx, 2
push ebx
lea ecx, [ebp - 0x434]
call fcn.2000133b
mov eax, dword [ebp - 0x430]
mov ebx, dword [ebp - 0x42c]
sub ebx, eax
mov dword [ebp - 0x42c], eax
lea eax, [ebx - 4]
push eax
lea ecx, [ebp - 0x434]
call fcn.200012d7
inc dword [edi + 0x18]
xor eax, eax
mov ax, word [edi + 0x14]
lea ecx, [esi + 0x10b5c]
push eax
push dword [edi + 0x10]
movzx eax, bx
push eax
push dword [ebp - 0x430]
call fcn.2007625c
test eax, eax
mov dword [ebp - 0x418], eax
je 0x20041d6b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x20], eax
mov al, byte [ebp - 0x414]
mov byte [esi + 0x191c0], al
lea ecx, [ebp - 0x43c]
call fcn.20001a0b
mov eax, dword [esi + 0x19044]
mov edi, dword [ebp - 0x43c]
cmp edi, eax
jne 0x20041a00
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x434]
call fcn.200030f4
mov eax, dword [ebp - 0x418]
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
xor ecx, ebp
pop esi
call fcn.2007c9ae
leave
ret