Function at 0x500050
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 0x500a61
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00539564
test eax, eax
je 0x500a43
mov eax, dword [0x66e8a8]
test byte [eax + 0xa9], 0x80
je 0x500a43
mov eax, dword [0x6700bc]
cmp dword [eax], 0x39999996
jge 0x500a43
call fcn.00539564
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
lea edi, [eax + 0x7dc]
mov eax, dword [0x672ea8]
push eax
call sub.user32.dll_IsWindowEnabled
test eax, eax
je 0x500a43
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x14d], 0
jne 0x500a43
cmp byte [0x672eb3], 0
jne 0x500a43
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, 9
call fcn.0063acf8
cmp byte [edi], 5
jne 0x5003c9
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 0
cmp byte [edi + 3], 0
je 0x50012b
call fcn.00658fe8
sub eax, dword [edi + 0x24]
cmp eax, 0x1388
jl 0x50012b
mov dl, 1
mov eax, dword [ebp - 0x2c]
call fcn.005e270c
lea edx, [ebp - 0xf8]
mov eax, dword [ebp - 0x2c]
call fcn.005c5ba8
lea ecx, [ebp - 0x34]
mov edx, dword [edi + 4]
mov eax, dword [ebp - 0x2c]
call fcn.005fbb34
cmp dword [ebp - 0x34], 0
jle 0x500163
mov eax, dword [ebp - 0x30]
inc eax
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 8], eax
jmp 0x500163
inc dword [edi + 4]
xor eax, eax
mov dword [edi + 8], eax
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0xe8]
jg 0x50017c
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.005fbe54
test al, al
jne 0x50015b
mov eax, dword [edi + 4]
cmp eax, dword [ebp - 0xe8]
jl 0x5001a9
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0xe8]
jne 0x500286
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.005bd358
cmp eax, dword [edi + 8]
jle 0x500286
mov byte [ebp - 0x25], 0
cmp dword [edi + 8], 0
jne 0x50023b
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x81c], 0
jne 0x50023b
mov edx, dword [edi + 4]
add edx, 0x400
mov eax, dword [ebp - 0xe8]
call fcn.00653538
mov esi, dword [edi + 4]
sub eax, esi
jl 0x50023b
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 0x5001fc
cmp esi, dword [edi + 0xc]
je 0x50023b
mov ecx, dword [ebx + 8]
xor edx, edx
mov eax, ebx
call fcn.00553138
test al, al
je 0x50023b
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.005fbebc
test al, al
jne 0x50022e
test byte [ebx + 0x67], 0x80
je 0x500224
mov byte [edi + 1], 1
test byte [ebx + 0x67], 0x40
je 0x50022e
mov byte [edi + 2], 1
inc dword [edi + 4]
mov byte [ebp - 0x25], 1
inc esi
dec dword [ebp - 0x38]
jne 0x5001e2
cmp byte [ebp - 0x25], 0
jne 0x500286
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.0052fdcc
mov eax, dword [eax + 4]
cmp eax, dword [ebx]
jne 0x500271
cmp dword [ebx + 4], 0
jle 0x500271
xor eax, eax
mov dword [ebx], eax
xor eax, eax
mov dword [edi + 8], eax
push 0
call fcn.00539564
push eax
call fcn.0052fdcc
mov cl, 1
pop edx
call fcn.0052cc2c
mov eax, dword [edi + 4]
cmp eax, dword [ebp - 0xe8]
jg 0x5002b3
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0xe8]
jne 0x5003ac
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.005bd358
cmp eax, dword [edi + 8]
jne 0x5003ac
cmp byte [edi + 3], 0
jne 0x5003ac
mov byte [edi], 2
cmp byte [edi + 1], 0
je 0x5002cb
mov byte [edi], 4
jmp 0x5002d4
cmp byte [edi + 2], 0
je 0x5002d4
mov byte [edi], 3
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x45a], 0
jne 0x5003a7
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x81c], 0
jne 0x5003a7
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xb0]
cmp dword [eax + 0x18], 0x8000
jge 0x5003a7
cmp byte [edi], 3
jne 0x50031d
call fcn.0052fdcc
mov eax, dword [eax + 8]
cmp dword [eax + 0x18], 0
jg 0x500334
cmp byte [edi], 4
jne 0x5003a7
call fcn.0052fdcc
mov eax, dword [eax + 8]
cmp dword [eax + 0x18], 1
jle 0x5003a7
mov al, 0x29
call fcn.006316c8
test al, al
jne 0x500350
mov eax, dword [0x66e8a8]
mov al, byte [eax + 0xd6]
and al, 0x7f
test al, al
jne 0x5003a7
xor eax, eax
mov dword [ebp - 0x18], eax
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c5ba8
mov esi, dword [ebp - 0x108]
cmp esi, 0
jl 0x5003a7
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 0x5003a1
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 1
mov dword [edi + 0x28], 0x7fffffff
jmp 0x5003a7
dec esi
cmp esi, 0xffffffff
jne 0x50036e
call fcn.00506b9c
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x459], 0
je 0x500a2e
mov eax, dword [ebp - 0x2c]
call fcn.005e25f0
jmp 0x500a2e
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x45b], 0
je 0x500a2e
mov eax, dword [0x670034]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov edx, dword [0x66f068]
cmp eax, dword [edx]
jne 0x500a2e
cmp dword [edi + 0x28], 0
jl 0x500651
cmp dword [edi + 0x28], 0x7fffffff
jne 0x500481
mov eax, 0x1388
call fcn.00656fe8
test al, al
je 0x500481
call fcn.0052fdcc
mov eax, dword [eax + 8]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x500481
call fcn.0052fdcc
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov ebx, dword [eax + esi*4]
cmp byte [ebx + 0x15], 0
jne 0x500460
cmp byte [ebx + 0x14], 0
jne 0x500444
mov eax, ebx
call fcn.00522b28
cmp byte [ebx + 0x15], 0
jne 0x500459
call fcn.0052fdcc
mov edx, dword [ebx + 0x18]
mov cl, 1
call fcn.005296c0
call fcn.00656fdc
jmp 0x500481
test esi, esi
jne 0x50047b
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c5ba8
mov eax, dword [ebp - 0x108]
mov dword [edi + 0x28], eax
dec esi
cmp esi, 0xffffffff
jne 0x500423
call fcn.0052fdcc
mov eax, dword [eax + 8]
cmp dword [eax + 0x18], 0
jne 0x50049e
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 0
jmp 0x500a2e
cmp dword [edi + 0x28], 0x7fffffff
je 0x500a2e
call fcn.00658fe8
mov dword [ebp - 0x1c], eax
jmp 0x500630
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 0x500506
call fcn.0052fdcc
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.00658ea4
mov edx, esi
mov eax, dword [ebx + 0x6c]
call fcn.00658ea4
call fcn.0052fdcc
mov eax, dword [eax + 8]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x500630
jmp 0x5005e7
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.0052fdcc
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.00653538
mov dword [ebp - 0x68], eax
call fcn.0052fdcc
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
push dword [eax + esi*4]
call fcn.0052fdcc
pop edx
mov dword [eax + 0xc], edx
lea eax, [ebp - 0x7c]
push eax
call fcn.00539564
push eax
call fcn.0052fdcc
mov cl, 2
pop edx
call fcn.0052cc2c
call fcn.0052fdcc
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 0x500607
call fcn.00658fe8
sub eax, dword [ebp - 0x1c]
cmp eax, 0xa
jl 0x500520
test esi, esi
jne 0x50061d
mov eax, esi
shl eax, 2
add eax, dword [ebx + 0x6c]
mov eax, dword [eax]
cmp eax, dword [ebx + 8]
jne 0x50061d
dec dword [edi + 0x28]
call fcn.00658fe8
sub eax, dword [ebp - 0x1c]
cmp eax, 0xa
jge 0x500630
dec esi
cmp esi, 0xffffffff
jne 0x5005e7
cmp dword [edi + 0x28], 0
jl 0x500647
call fcn.00658fe8
sub eax, dword [ebp - 0x1c]
cmp eax, 0xa
jl 0x5004b8
call fcn.00656fdc
jmp 0x500a2e
mov eax, 0x1388
call fcn.00656fe8
test al, al
je 0x500a2e
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45b], 0
xor eax, eax
mov dword [ebp - 0x18], eax
call fcn.0064e78c
mov edi, eax
call fcn.0052fdcc
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x18]
mov eax, edi
call fcn.0064e7dc
mov esi, dword [edi + 0x18]
dec esi
cmp esi, 0
jl 0x5006a2
mov eax, dword [edi + 0x1c]
xor edx, edx
mov dword [eax + esi*4], edx
dec esi
cmp esi, 0xffffffff
jne 0x500694
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c5ba8
mov esi, dword [ebp - 0x108]
cmp esi, 0
jl 0x500716
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.0052fdcc
mov eax, dword [eax + 8]
mov ebx, dword [eax + 0x18]
dec ebx
cmp ebx, 0
jl 0x500710
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 0x5006ef
dec esi
cmp esi, 0xffffffff
jne 0x5006bb
mov dword [ebp - 0x20], 0xffffffff
mov ebx, 0x7fffffff
mov esi, dword [edi + 0x18]
dec esi
cmp esi, 0
jl 0x500765
mov eax, dword [edi + 0x1c]
cmp ebx, dword [eax + esi*4]
jg 0x500756
mov eax, dword [edi + 0x1c]
cmp ebx, dword [eax + esi*4]
jne 0x50075f
call fcn.0052fdcc
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 0x18]
mov edx, dword [0x67036c]
cmp eax, dword [edx]
jne 0x50075f
mov eax, dword [edi + 0x1c]
mov ebx, dword [eax + esi*4]
mov dword [ebp - 0x20], esi
dec esi
cmp esi, 0xffffffff
jne 0x50072b
mov eax, edi
call fcn.0064edac
cmp dword [ebp - 0x20], 0xffffffff
je 0x500a2e
mov eax, dword [ebp - 0x18]
sub eax, 0xa
cmp ebx, eax
jge 0x500a2e
mov edx, 0x5a
mov eax, dword [ebp - 0x18]
call fcn.0061f000
cmp ebx, eax
jge 0x500a2e
xor edi, edi
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c5ba8
mov esi, dword [ebp - 0x108]
cmp esi, 0
jl 0x5007c7
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.005bd358
dec eax
add edi, eax
dec esi
cmp esi, 0xffffffff
jne 0x5007b4
mov eax, edi
mov ecx, 7
cdq
idiv ecx
mov ecx, 0xa
cdq
idiv ecx
cmp ebx, eax
jge 0x500a2e
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x45a], 1
call fcn.0052fdcc
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.0062a1f4
mov edx, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
mov eax, dword [0x66f430]
mov eax, dword [eax]
call fcn.00655b64
mov eax, dword [ebp - 0x11c]
mov cl, 0x29
mov dl, 3
call fcn.006200d0
cmp ax, 6
jne 0x500a2e
call fcn.00547bf4
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.005c5ba8
mov eax, dword [ebp - 0x108]
test eax, eax
jl 0x500937
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 0x500928
mov dl, 0x59
mov eax, dword [ebp - 0x2c]
call fcn.00564f50
xor ecx, ecx
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.005c5464
cmp eax, 0x400
je 0x5008be
push ebp
xor edx, edx
mov eax, esi
call fcn.004fffac
pop ecx
mov eax, dword [ebp - 0x2c]
call fcn.00565004
jmp 0x500928
mov eax, dword [edi + 4]
add eax, ebx
cmp word [eax], 0
jne 0x500922
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 0x5008ed
inc dword [ebp - 0x24]
jmp 0x50091d
cmp al, 0x16
jne 0x50091d
mov eax, dword [ebp - 0x40]
cmp dword [eax + 1], 0x400
sete al
cmp al, byte [ebp - 9]
je 0x50090f
push ebp
mov edx, dword [ebp - 0x24]
mov eax, esi
call fcn.004fffac
pop ecx
mov eax, dword [ebp - 0x40]
cmp dword [eax + 1], 0x400
sete byte [ebp - 9]
add ebx, 9
jmp 0x500928
add ebx, 2
inc dword [ebp - 0x24]
cmp ebx, dword [edi + 8]
jl 0x5008c8
inc esi
dec dword [ebp - 0x38]
jne 0x500873
push ebp
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 0x2c]
call fcn.005c5ba8
mov eax, dword [ebp - 0x108]
inc eax
xor edx, edx
call fcn.004fffac
pop ecx
mov eax, dword [ebp - 0x2c]
call fcn.0056505c
mov dl, 0x27
mov eax, dword [ebp - 0x2c]
call fcn.005caf88
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
call fcn.00547d5c
test al, al
jne 0x5009bc
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x418], 0
lea eax, [ebp - 0xd8]
call fcn.00544200
call fcn.0052fdcc
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 [0x500a70]
push eax
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x2c]
call fcn.005ce3f8
call fcn.0052fdcc
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.005d8fd8
mov eax, dword [ebp - 0x2c]
call fcn.005cb04c
mov eax, dword [ebp - 0x2c]
call fcn.005cb848
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.005cbb10
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
call fcn.005cb084
mov eax, dword [ebp - 0x2c]
call fcn.00565068
mov eax, dword [ebp - 0x10]
call fcn.00548150
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov ecx, 0xa
mov edx, 9
call fcn.0063acb8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x500a68
lea eax, [ebp - 0x120]
mov edx, 2
call fcn.00403298
ret