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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x120], eax
xor eax, eax
push ebp
push 0x503411
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.0053c3b8
test eax, eax
je 0x5033f3
mov eax, dword [0x671910]
test byte [eax + 0xa9], 0x80
je 0x5033f3
mov eax, dword [0x673120]
cmp dword [eax], 0x39999996
jge 0x5033f3
call fcn.0053c3b8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
lea edi, [eax + 0x7dc]
mov eax, dword [0x675ea8]
push eax
call sub.user32.dll_IsWindowEnabled
test eax, eax
je 0x5033f3
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x14d], 0
jne 0x5033f3
cmp byte [0x675eb3], 0
jne 0x5033f3
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, 9
call fcn.0063e340
cmp byte [edi], 5
jne 0x502d79
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 0
cmp byte [edi + 3], 0
je 0x502adb
call fcn.0065c614
sub eax, dword [edi + 0x24]
cmp eax, 0x1388
jl 0x502adb
mov dl, 1
mov eax, dword [ebp - 0x2c]
call fcn.005e56d8
lea edx, [ebp - 0xf8]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
lea ecx, [ebp - 0x34]
mov edx, dword [edi + 4]
mov eax, dword [ebp - 0x2c]
call fcn.005feaf8
cmp dword [ebp - 0x34], 0
jle 0x502b13
mov eax, dword [ebp - 0x30]
inc eax
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 8], eax
jmp 0x502b13
inc dword [edi + 4]
xor eax, eax
mov dword [edi + 8], eax
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0xe8]
jg 0x502b2c
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.005fee18
test al, al
jne 0x502b0b
mov eax, dword [edi + 4]
cmp eax, dword [ebp - 0xe8]
jl 0x502b59
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0xe8]
jne 0x502c36
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.005c0310
cmp eax, dword [edi + 8]
jle 0x502c36
mov byte [ebp - 0x25], 0
cmp dword [edi + 8], 0
jne 0x502beb
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x81c], 0
jne 0x502beb
mov edx, dword [edi + 4]
add edx, 0x400
mov eax, dword [ebp - 0xe8]
call fcn.00656b70
mov esi, dword [edi + 4]
sub eax, esi
jl 0x502beb
inc eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
mov eax, dword [eax + 0x1c]
mov ebx, dword [eax + esi*4]
cmp byte [edi + 3], 0
je 0x502bac
cmp esi, dword [edi + 0xc]
je 0x502beb
mov ecx, dword [ebx + 8]
xor edx, edx
mov eax, ebx
call fcn.005560f0
test al, al
je 0x502beb
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.005fee80
test al, al
jne 0x502bde
test byte [ebx + 0x67], 0x80
je 0x502bd4
mov byte [edi + 1], 1
test byte [ebx + 0x67], 0x40
je 0x502bde
mov byte [edi + 2], 1
inc dword [edi + 4]
mov byte [ebp - 0x25], 1
inc esi
dec dword [ebp - 0x38]
jne 0x502b92
cmp byte [ebp - 0x25], 0
jne 0x502c36
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
mov eax, dword [eax + 0x1c]
mov edx, dword [edi + 4]
mov eax, dword [eax + edx*4]
lea ebx, [eax + 0x54]
call fcn.00532af4
mov eax, dword [eax + 4]
cmp eax, dword [ebx]
jne 0x502c21
cmp dword [ebx + 4], 0
jle 0x502c21
xor eax, eax
mov dword [ebx], eax
xor eax, eax
mov dword [edi + 8], eax
push 0
call fcn.0053c3b8
push eax
call fcn.00532af4
mov cl, 1
pop edx
call fcn.0052f954
mov eax, dword [edi + 4]
cmp eax, dword [ebp - 0xe8]
jg 0x502c63
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0xe8]
jne 0x502d5c
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.005c0310
cmp eax, dword [edi + 8]
jne 0x502d5c
cmp byte [edi + 3], 0
jne 0x502d5c
mov byte [edi], 2
cmp byte [edi + 1], 0
je 0x502c7b
mov byte [edi], 4
jmp 0x502c84
cmp byte [edi + 2], 0
je 0x502c84
mov byte [edi], 3
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x45a], 0
jne 0x502d57
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x81c], 0
jne 0x502d57
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
cmp dword [eax + 0x18], 0x8000
jge 0x502d57
cmp byte [edi], 3
jne 0x502ccd
call fcn.00532af4
mov eax, dword [eax + 8]
cmp dword [eax + 0x18], 0
jg 0x502ce4
cmp byte [edi], 4
jne 0x502d57
call fcn.00532af4
mov eax, dword [eax + 8]
cmp dword [eax + 0x18], 1
jle 0x502d57
mov al, 0x29
call fcn.00631cfc
test al, al
jne 0x502d00
mov eax, dword [0x671910]
mov al, byte [eax + 0xd6]
and al, 0x7f
test al, al
jne 0x502d57
xor eax, eax
mov dword [ebp - 0x18], eax
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
mov esi, dword [ebp - 0x108]
cmp esi, 0
jl 0x502d57
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 0x64]
and eax, 0x3fffffff
add dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xa
jl 0x502d51
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 1
mov dword [edi + 0x28], 0x7fffffff
jmp 0x502d57
dec esi
cmp esi, 0xffffffff
jne 0x502d1e
call fcn.00509530
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x459], 0
je 0x5033de
mov eax, dword [ebp - 0x2c]
call fcn.005e55bc
jmp 0x5033de
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x45b], 0
je 0x5033de
mov eax, dword [0x673098]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov edx, dword [0x6720d0]
cmp eax, dword [edx]
jne 0x5033de
cmp dword [edi + 0x28], 0
jl 0x503001
cmp dword [edi + 0x28], 0x7fffffff
jne 0x502e31
mov eax, 0x1388
call fcn.0065a614
test al, al
je 0x502e31
call fcn.00532af4
mov eax, dword [eax + 8]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x502e31
call fcn.00532af4
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov ebx, dword [eax + esi*4]
cmp byte [ebx + 0x15], 0
jne 0x502e10
cmp byte [ebx + 0x14], 0
jne 0x502df4
mov eax, ebx
call fcn.00525850
cmp byte [ebx + 0x15], 0
jne 0x502e09
call fcn.00532af4
mov edx, dword [ebx + 0x18]
mov cl, 1
call fcn.0052c3e8
call fcn.0065a608
jmp 0x502e31
test esi, esi
jne 0x502e2b
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
mov eax, dword [ebp - 0x108]
mov dword [edi + 0x28], eax
dec esi
cmp esi, 0xffffffff
jne 0x502dd3
call fcn.00532af4
mov eax, dword [eax + 8]
cmp dword [eax + 0x18], 0
jne 0x502e4e
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 0
jmp 0x5033de
cmp dword [edi + 0x28], 0x7fffffff
je 0x5033de
call fcn.0065c614
mov dword [ebp - 0x1c], eax
jmp 0x502fe0
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
mov eax, dword [eax + 0x1c]
mov edx, dword [edi + 0x28]
mov ebx, dword [eax + edx*4]
cmp dword [ebx + 0x68], 0
jne 0x502eb6
call fcn.00532af4
mov eax, dword [eax + 8]
mov esi, dword [eax + 0x18]
shl esi, 2
mov eax, esi
call fcn.00401e58
mov dword [ebx + 0x68], eax
mov eax, esi
call fcn.00401e58
mov dword [ebx + 0x6c], eax
mov edx, esi
mov eax, dword [ebx + 0x68]
call fcn.0065c4dc
mov edx, esi
mov eax, dword [ebx + 0x6c]
call fcn.0065c4dc
call fcn.00532af4
mov eax, dword [eax + 8]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x502fe0
jmp 0x502f97
push esi
push edi
lea esi, [ebx + 0x54]
lea edi, [ebp - 0x5c]
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
call fcn.00532af4
mov eax, dword [eax + 4]
mov dword [ebx + 0x54], eax
xor eax, eax
mov dword [ebx + 0x60], eax
xor eax, eax
mov dword [ebx + 0x5c], eax
xor eax, eax
mov dword [ebx + 0x58], eax
xor eax, eax
mov dword [ebx + 0x64], eax
mov eax, dword [edi + 0x28]
mov dword [ebp - 0x7c], eax
mov edx, esi
shl edx, 2
add edx, dword [ebx + 0x6c]
mov edx, dword [edx]
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x78]
add eax, 0x20
mov edx, dword [ebx + 8]
call fcn.00656b70
mov dword [ebp - 0x68], eax
call fcn.00532af4
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
push dword [eax + esi*4]
call fcn.00532af4
pop edx
mov dword [eax + 0xc], edx
lea eax, [ebp - 0x7c]
push eax
call fcn.0053c3b8
push eax
call fcn.00532af4
mov cl, 2
pop edx
call fcn.0052f954
call fcn.00532af4
xor edx, edx
mov dword [eax + 0xc], edx
mov eax, dword [ebx + 0x64]
and eax, 0x3fffffff
mov edx, esi
shl edx, 2
add edx, dword [ebp - 0x48]
add dword [edx], eax
mov eax, esi
shl eax, 2
add eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x68]
mov dword [eax], edx
mov eax, dword [ebx + 0x60]
call fcn.00401fac
push esi
push edi
lea esi, [ebp - 0x5c]
lea edi, [ebx + 0x54]
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, esi
shl eax, 2
add eax, dword [ebx + 0x6c]
mov eax, dword [eax]
cmp eax, dword [ebx + 8]
jge 0x502fb7
call fcn.0065c614
sub eax, dword [ebp - 0x1c]
cmp eax, 0xa
jl 0x502ed0
test esi, esi
jne 0x502fcd
mov eax, esi
shl eax, 2
add eax, dword [ebx + 0x6c]
mov eax, dword [eax]
cmp eax, dword [ebx + 8]
jne 0x502fcd
dec dword [edi + 0x28]
call fcn.0065c614
sub eax, dword [ebp - 0x1c]
cmp eax, 0xa
jge 0x502fe0
dec esi
cmp esi, 0xffffffff
jne 0x502f97
cmp dword [edi + 0x28], 0
jl 0x502ff7
call fcn.0065c614
sub eax, dword [ebp - 0x1c]
cmp eax, 0xa
jl 0x502e68
call fcn.0065a608
jmp 0x5033de
mov eax, 0x1388
call fcn.0065a614
test al, al
je 0x5033de
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 0
xor eax, eax
mov dword [ebp - 0x18], eax
call fcn.00651de8
mov edi, eax
call fcn.00532af4
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x18]
mov eax, edi
call fcn.00651e38
mov esi, dword [edi + 0x18]
dec esi
cmp esi, 0
jl 0x503052
mov eax, dword [edi + 0x1c]
xor edx, edx
mov dword [eax + esi*4], edx
dec esi
cmp esi, 0xffffffff
jne 0x503044
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
mov esi, dword [ebp - 0x108]
cmp esi, 0
jl 0x5030c6
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
add eax, 0x54
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x10]
and eax, 0x3fffffff
add dword [ebp - 0x18], eax
call fcn.00532af4
mov eax, dword [eax + 8]
mov ebx, dword [eax + 0x18]
dec ebx
cmp ebx, 0
jl 0x5030c0
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + ebx*4]
mov edx, dword [ebp - 0x3c]
mov edx, dword [edx + 0x14]
mov ecx, ebx
shl ecx, 2
add edx, ecx
add eax, dword [edx]
mov edx, dword [edi + 0x1c]
mov dword [edx + ebx*4], eax
dec ebx
cmp ebx, 0xffffffff
jne 0x50309f
dec esi
cmp esi, 0xffffffff
jne 0x50306b
mov dword [ebp - 0x20], 0xffffffff
mov ebx, 0x7fffffff
mov esi, dword [edi + 0x18]
dec esi
cmp esi, 0
jl 0x503115
mov eax, dword [edi + 0x1c]
cmp ebx, dword [eax + esi*4]
jg 0x503106
mov eax, dword [edi + 0x1c]
cmp ebx, dword [eax + esi*4]
jne 0x50310f
call fcn.00532af4
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 0x18]
mov edx, dword [0x6733cc]
cmp eax, dword [edx]
jne 0x50310f
mov eax, dword [edi + 0x1c]
mov ebx, dword [eax + esi*4]
mov dword [ebp - 0x20], esi
dec esi
cmp esi, 0xffffffff
jne 0x5030db
mov eax, edi
call fcn.00652408
cmp dword [ebp - 0x20], 0xffffffff
je 0x5033de
mov eax, dword [ebp - 0x18]
sub eax, 0xa
cmp ebx, eax
jge 0x5033de
mov edx, 0x5a
mov eax, dword [ebp - 0x18]
call fcn.00622538
cmp ebx, eax
jge 0x5033de
xor edi, edi
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
mov esi, dword [ebp - 0x108]
cmp esi, 0
jl 0x503177
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.005c0310
dec eax
add edi, eax
dec esi
cmp esi, 0xffffffff
jne 0x503164
mov eax, edi
mov ecx, 7
cdq
idiv ecx
mov ecx, 0xa
cdq
idiv ecx
cmp ebx, eax
jge 0x5033de
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45a], 1
call fcn.00532af4
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 0x18]
lea edx, [ebp - 0x120]
call fcn.0062d6d0
mov edx, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
mov eax, dword [0x672498]
mov eax, dword [eax]
call fcn.0065918c
mov eax, dword [ebp - 0x11c]
mov cl, 0x29
mov dl, 3
call fcn.00623608
cmp ax, 6
jne 0x5033de
call fcn.0054abac
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 4], eax
mov byte [ebp - 9], 0
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
mov eax, dword [ebp - 0x108]
test eax, eax
jl 0x5032e7
inc eax
mov dword [ebp - 0x38], eax
xor esi, esi
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
mov edi, dword [eax + 0x48]
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x24], eax
cmp byte [ebp - 9], 0
je 0x5032d8
mov dl, 0x59
mov eax, dword [ebp - 0x2c]
call fcn.00567f08
xor ecx, ecx
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.005c8424
cmp eax, 0x400
je 0x50326e
push ebp
xor edx, edx
mov eax, esi
call fcn.0050295c
pop ecx
mov eax, dword [ebp - 0x2c]
call fcn.00567fbc
jmp 0x5032d8
mov eax, dword [edi + 4]
add eax, ebx
cmp word [eax], 0
jne 0x5032d2
add eax, 2
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov al, byte [eax]
mov edx, eax
add dl, 0xe9
sub dl, 5
jae 0x50329d
inc dword [ebp - 0x24]
jmp 0x5032cd
cmp al, 0x16
jne 0x5032cd
mov eax, dword [ebp - 0x40]
cmp dword [eax + 1], 0x400
sete al
cmp al, byte [ebp - 9]
je 0x5032bf
push ebp
mov edx, dword [ebp - 0x24]
mov eax, esi
call fcn.0050295c
pop ecx
mov eax, dword [ebp - 0x40]
cmp dword [eax + 1], 0x400
sete byte [ebp - 9]
add ebx, 9
jmp 0x5032d8
add ebx, 2
inc dword [ebp - 0x24]
cmp ebx, dword [edi + 8]
jl 0x503278
inc esi
dec dword [ebp - 0x38]
jne 0x503223
push ebp
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c8b68
mov eax, dword [ebp - 0x108]
inc eax
xor edx, edx
call fcn.0050295c
pop ecx
mov eax, dword [ebp - 0x2c]
call fcn.00568014
mov dl, 0x27
mov eax, dword [ebp - 0x2c]
call fcn.005cdf48
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
call fcn.0054ad14
test al, al
jne 0x50336c
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x418], 0
lea eax, [ebp - 0xd8]
call fcn.005471b8
call fcn.00532af4
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xd8]
push eax
mov al, byte [0x503420]
push eax
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x2c]
call fcn.005d13b8
call fcn.00532af4
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4]
mov edx, dword [eax + 0x18]
mov eax, dword [ebp - 0x2c]
call fcn.005dbfac
mov eax, dword [ebp - 0x2c]
call fcn.005ce00c
mov eax, dword [ebp - 0x2c]
call fcn.005ce808
mov edx, dword [ebp - 0x2c]
lea esi, [edx + 0x258]
lea edi, [eax + 0x28]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx + 0x300]
mov eax, dword [eax + 0x38]
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [ebp - 0x2c]
call fcn.005cead0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
call fcn.005ce044
mov eax, dword [ebp - 0x2c]
call fcn.00568020
mov eax, dword [ebp - 0x10]
call fcn.0054b108
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov ecx, 0xa
mov edx, 9
call fcn.0063e300
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x503418
lea eax, [ebp - 0x120]
mov edx, 2
call fcn.00403298
ret