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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov ebx, dword [ebp + 8]
xor eax, eax
push ebp
push 0x504bf2
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
je 0x504bd7
mov eax, dword [0x688a9c]
cmp dword [eax], 0
je 0x504bd7
mov eax, dword [0x688a9c]
mov eax, dword [eax]
cmp byte [eax + 0x134], 0
jne 0x504bd7
mov eax, dword [0x688a9c]
mov eax, dword [eax]
cmp byte [eax + 0x1c], 0
jne 0x504bd7
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x6888c8]
sub eax, dword [edx]
mov edx, dword [0x688760]
cmp eax, dword [edx]
jb 0x504bd7
call sub.kernel32.dll_GetTickCount
cmp eax, dword [ebx + 7]
jb 0x504bd7
mov eax, ebx
call fcn.0058e954
mov edx, dword [0x688a9c]
mov edx, dword [edx]
cmp eax, dword [edx + 0x97]
jle 0x5042a9
cmp byte [ebx + 0x23], 0
jne 0x504bbf
cmp byte [ebx + 0x23], 0
jne 0x5043e4
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x6888c8]
mov dword [edx], eax
mov eax, dword [0x6891b8]
mov byte [eax], 0
mov eax, dword [0x688760]
mov dword [eax], 0x1f4
movzx eax, word [ebx + 0x12]
cmp ax, 0x64
jne 0x5043b5
mov edx, dword [0x688a9c]
mov edx, dword [edx]
cmp byte [edx + 0x1e], 0
je 0x5043b5
mov eax, dword [0x688b90]
cmp dword [eax], 0
jne 0x50430e
mov eax, dword [0x688cbc]
mov eax, dword [eax]
mov edx, dword [0x6891d0]
mov dword [edx], eax
jmp 0x50431d
mov eax, dword [0x688b90]
mov eax, dword [eax]
mov edx, dword [0x6891d0]
mov dword [edx], eax
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov edx, dword [0x688cbc]
mov dword [edx], eax
mov edx, dword [0x6891d0]
mov edx, dword [edx]
mov eax, dword [0x694598]
call fcn.0052c31c
test al, al
jne 0x504368
mov eax, dword [0x6891d0]
xor edx, edx
mov dword [eax], edx
push 1
push 0
mov ecx, 0xff00
mov edx, 0x504c0c
mov eax, dword [0x69458c]
call fcn.0053ca7c
jmp 0x504bd7
mov eax, dword [0x6891d0]
cmp dword [eax], 0
je 0x504bd7
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov eax, dword [ebp - 0x14]
push eax
movzx eax, word [ebx + 0x12]
push eax
push edi
mov ecx, dword [ebp - 0x10]
mov edx, 0x18
mov eax, esi
call fcn.0050bd38
jmp 0x5043d4
push 0
movzx eax, ax
push eax
push 0
mov eax, dword [0x688a9c]
mov eax, dword [eax]
movzx ecx, byte [eax + 0x14]
mov edx, 0x18
mov eax, esi
call fcn.0050bd38
mov eax, dword [0x688724]
mov dword [eax], 0xffffffff
jmp 0x504bd7
mov eax, dword [ebp - 8]
push eax
mov edx, dword [0x688994]
mov edx, dword [edx]
sub edx, 0x258
sar edx, 1
jns 0x5043fd
adc edx, 0
add edx, 0xc
add edx, 0xe0
mov eax, dword [0x6889bc]
mov eax, dword [eax]
sub eax, 0x320
sar eax, 1
jns 0x504419
adc eax, 0
add eax, 0x16c
mov ecx, dword [ebp - 4]
call fcn.005b2790
mov dword [ebp - 0xc], eax
mov eax, dword [0x688cbc]
cmp dword [eax], 0
je 0x504449
mov eax, dword [0x688cbc]
mov eax, dword [eax]
cmp byte [eax + 0x31], 0
je 0x504449
mov eax, dword [0x688cbc]
xor edx, edx
mov dword [eax], edx
test byte [ebx + 0x7c], 8
jne 0x504498
mov eax, dword [0x6885e4]
cmp byte [eax + 0x2b], 0
je 0x504461
cmp word [ebx + 0x12], 2
je 0x504498
mov eax, dword [0x6885e4]
cmp byte [eax + 0x2c], 0
jne 0x504473
cmp word [ebx + 0x12], 0x21
je 0x504498
mov eax, dword [0x6885e4]
cmp byte [eax + 0x2c], 0
jne 0x504486
cmp word [ebx + 0x12], 0xd3
je 0x504498
mov eax, dword [0x6885e4]
cmp byte [eax + 0x2d], 0
jne 0x5044e0
cmp word [ebx + 0x12], 0x2f
jne 0x5044e0
mov eax, dword [0x688b90]
cmp dword [eax], 0
je 0x5044af
mov eax, dword [0x688b90]
mov eax, dword [eax]
cmp byte [eax + 0x31], 0
je 0x5044c0
mov eax, dword [0x688cbc]
mov eax, dword [eax]
mov edx, dword [0x6891d0]
mov dword [edx], eax
jmp 0x5044cf
mov eax, dword [0x688b90]
mov eax, dword [eax]
mov edx, dword [0x6891d0]
mov dword [edx], eax
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov edx, dword [0x688cbc]
mov dword [edx], eax
jmp 0x504508
mov eax, dword [0x688b90]
mov eax, dword [eax]
mov edx, dword [0x6891d0]
mov dword [edx], eax
mov eax, dword [0x688cbc]
cmp dword [eax], 0
jne 0x504508
mov eax, dword [0x688b90]
mov eax, dword [eax]
mov edx, dword [0x688cbc]
mov dword [edx], eax
mov edx, dword [0x6891d0]
mov edx, dword [edx]
mov eax, dword [0x694598]
call fcn.0052c31c
test al, al
jne 0x504527
mov eax, dword [0x6891d0]
xor edx, edx
mov dword [eax], edx
movzx eax, word [ebx + 0x12]
mov edx, eax
add edx, 0xfffffff8
cmp dx, 0xd7
ja 0x504541
movzx edx, dx
bt dword [0x504c28], edx
jae 0x504618
movzx eax, word [ebx + 0x12]
cmp ax, 0x1e
je 0x504557
cmp ax, 0xdb
jne 0x504560
mov dword [ebp - 0x18], 5
jmp 0x504567
mov dword [ebp - 0x18], 1
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00504024
test al, al
jne 0x504a2a
lea ecx, [ebp - 0x1c]
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00504104
mov edi, eax
test edi, edi
je 0x5045fb
mov eax, dword [0x688384]
cmp byte [eax + 8], 0
jne 0x504bd7
mov eax, dword [0x688384]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x688384]
mov byte [eax + 0x112], 0
mov eax, dword [0x688384]
mov dword [eax], 9
lea eax, [ebp - 0x20]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x694588]
call fcn.0050bf38
mov eax, dword [ebp - 0x1c]
call fcn.005b1c4c
jmp 0x504a2a
push 1
push 0
mov ecx, 0xff00
mov edx, 0x504c4c
mov eax, dword [0x69458c]
call fcn.0053ca7c
jmp 0x504bd7
cmp ax, 6
jne 0x50478e
mov dword [ebp - 0x18], 2
mov eax, dword [0x6891d0]
cmp dword [eax], 0
je 0x50465f
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
test eax, 0x40000000
jne 0x50464b
mov dword [ebp - 0x18], 4
mov edx, dword [0x6891d0]
test eax, 0x80000000
jne 0x50465f
mov dword [ebp - 0x18], 3
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504024
test al, al
jne 0x50476a
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504104
mov edi, eax
test edi, edi
jne 0x5046c5
mov eax, dword [0x68878c]
cmp byte [eax + 0x96e], 0
je 0x5046c5
mov eax, dword [0x68878c]
cmp byte [eax + 0x97e], 0xe
jne 0x5046c5
mov eax, dword [0x68878c]
cmp byte [eax + 0x980], 2
ja 0x5046c5
mov edi, dword [0x68878c]
add edi, 0x96c
jmp 0x504776
test edi, edi
jne 0x5046e3
cmp dword [ebp - 0x18], 2
je 0x5046e3
lea ecx, [ebp - 0x1c]
mov edx, 2
mov eax, 1
call fcn.00504104
mov edi, eax
test edi, edi
je 0x50474d
mov eax, dword [0x688384]
cmp byte [eax + 8], 0
jne 0x504bd7
mov eax, dword [0x688384]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x688384]
mov byte [eax + 0x112], 0
mov eax, dword [0x688384]
mov dword [eax], 9
lea eax, [ebp - 0x24]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x694588]
call fcn.0050bf38
mov eax, dword [ebp - 0x1c]
call fcn.005b1c4c
jmp 0x504776
push 1
push 0
mov ecx, 0xff00
mov edx, 0x504c68
mov eax, dword [0x69458c]
call fcn.0053ca7c
jmp 0x504bd7
mov edi, dword [0x68878c]
add edi, 0x96c
cmp byte [edi + 0x14], 1
jne 0x504785
mov byte [ebx + 0x24], 4
jmp 0x504a2a
mov byte [ebx + 0x24], 0x65
jmp 0x504a2a
cmp ax, 0xd6
jne 0x5048d6
mov dword [ebp - 0x18], 2
mov eax, dword [0x6891d0]
cmp dword [eax], 0
je 0x5047d5
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
test eax, 0x40000000
jne 0x5047c1
mov dword [ebp - 0x18], 4
mov edx, dword [0x6891d0]
test eax, 0x80000000
jne 0x5047d5
mov dword [ebp - 0x18], 3
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504024
test al, al
jne 0x504a2a
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504104
mov edi, eax
test edi, edi
jne 0x50482e
mov eax, dword [0x68878c]
cmp byte [eax + 0x96e], 0
je 0x50482e
mov eax, dword [0x68878c]
cmp byte [eax + 0x97e], 0xe
jne 0x50482e
mov eax, dword [0x68878c]
cmp byte [eax + 0x980], 2
jbe 0x504a2a
test edi, edi
jne 0x50484c
cmp dword [ebp - 0x18], 2
je 0x50484c
lea ecx, [ebp - 0x1c]
mov edx, 2
mov eax, 1
call fcn.00504104
mov edi, eax
test edi, edi
je 0x5048b9
mov eax, dword [0x688384]
cmp byte [eax + 8], 0
jne 0x504bd7
mov eax, dword [0x688384]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x688384]
mov byte [eax + 0x112], 0
mov eax, dword [0x688384]
mov dword [eax], 9
lea eax, [ebp - 0x28]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x694588]
call fcn.0050bf38
mov eax, dword [ebp - 0x1c]
call fcn.005b1c4c
jmp 0x504a2a
push 1
push 0
mov ecx, 0xff00
mov edx, 0x504c68
mov eax, dword [0x69458c]
call fcn.0053ca7c
jmp 0x504bd7
cmp ax, 0x26
jne 0x504a2a
movzx eax, byte [esi + 0x410]
test al, al
je 0x5048f4
mov dword [ebp - 0x18], 3
jmp 0x5048fb
mov dword [ebp - 0x18], 4
xor al, 1
mov byte [esi + 0x410], al
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504024
test al, al
jne 0x504a0e
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504104
mov edi, eax
test edi, edi
jne 0x504969
mov eax, dword [0x68878c]
cmp byte [eax + 0x96e], 0
je 0x504969
mov eax, dword [0x68878c]
cmp byte [eax + 0x97e], 0xe
jne 0x504969
mov eax, dword [0x68878c]
cmp byte [eax + 0x980], 2
ja 0x504969
mov edi, dword [0x68878c]
add edi, 0x96c
jmp 0x504a1a
test edi, edi
jne 0x504987
cmp dword [ebp - 0x18], 2
je 0x504987
lea ecx, [ebp - 0x1c]
mov edx, 2
mov eax, 1
call fcn.00504104
mov edi, eax
test edi, edi
je 0x5049f1
mov eax, dword [0x688384]
cmp byte [eax + 8], 0
jne 0x504bd7
mov eax, dword [0x688384]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x688384]
mov byte [eax + 0x112], 0
mov eax, dword [0x688384]
mov dword [eax], 9
lea eax, [ebp - 0x2c]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x694588]
call fcn.0050bf38
mov eax, dword [ebp - 0x1c]
call fcn.005b1c4c
jmp 0x504a1a
push 1
push 0
mov ecx, 0xff00
mov edx, 0x504c68
mov eax, dword [0x69458c]
call fcn.0053ca7c
jmp 0x504bd7
mov edi, dword [0x68878c]
add edi, 0x96c
cmp byte [edi + 0x14], 1
jne 0x504a26
mov byte [ebx + 0x24], 0x2f
jmp 0x504a2a
mov byte [ebx + 0x24], 0x66
mov eax, dword [0x6891d0]
cmp dword [eax], 0
jne 0x504a50
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, dword [0x694598]
call fcn.0052b58c
xor edi, edi
jmp 0x504a74
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [0x6891d0]
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov eax, esi
call fcn.0050d798
test al, al
je 0x504bd7
mov eax, esi
call fcn.0050d734
test al, al
je 0x504bd7
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x6888c8]
mov dword [edx], eax
mov eax, dword [0x6891b8]
mov byte [eax], 1
mov eax, 0x24
call fcn.00402f54
mov esi, eax
mov eax, esi
xor ecx, ecx
mov edx, 0x24
call fcn.00488380
movzx eax, byte [ebx + 0x24]
mov dword [esi + 0x10], eax
movzx eax, word [ebx + 0x12]
mov dword [esi + 4], eax
xor eax, eax
mov dword [esi], eax
mov eax, dword [ebx + 0x28]
add eax, 0x1f4
mov edx, dword [0x688760]
mov dword [edx], eax
mov eax, dword [esi + 4]
cmp eax, 0x19
jge 0x504b02
sub eax, 2
je 0x504b3a
sub eax, 0xa
je 0x504b3a
add eax, 0xfffffffe
sub eax, 6
jb 0x504b3a
dec eax
je 0x504b3a
jmp 0x504b2d
cmp eax, 0xc9
jg 0x504b1b
je 0x504b3a
add eax, 0xffffffe7
sub eax, 2
jb 0x504b3a
dec eax
sub eax, 4
jb 0x504b3a
jmp 0x504b2d
add eax, 0xffffff35
sub eax, 2
jb 0x504b3a
add eax, 0xfffffff5
sub eax, 4
jb 0x504b3a
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x688584]
mov dword [edx], eax
mov eax, dword [0x68860c]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x6891d0]
cmp dword [eax], 0
je 0x504b71
mov eax, dword [0x6891d0]
mov eax, dword [eax]
cmp byte [eax + 0x16], 0
jne 0x504b71
mov eax, 0x44c
call fcn.00403440
add eax, 0x12c
mov edx, dword [0x68860c]
mov dword [edx], eax
cmp dword [esi + 4], 0x7b
jne 0x504b85
mov eax, dword [0x688a9c]
mov eax, dword [eax]
movzx eax, byte [eax + 0x14]
mov dword [ebp - 0xc], eax
movzx eax, word [ebx + 0x12]
mov edx, dword [0x688210]
mov dword [edx], eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
push esi
push edi
push 0
push 0
mov eax, dword [0x688a9c]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
mov dx, 0x18
call fcn.0059c908
mov eax, dword [0x688724]
mov dword [eax], 0xffffffff
jmp 0x504bd7
push 1
push 0
mov ecx, 0xff00
mov edx, 0x504c80
mov eax, dword [0x69458c]
call fcn.0053ca7c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x504bf9
lea eax, [ebp - 0x2c]
mov edx, 4
call fcn.0040517c
ret