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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push esi
push edi
mov esi, edx
lea edi, [ebp - 0x28]
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x28]
mov edx, dword [0x47c6c0]
call fcn.00405284
xor eax, eax
push ebp
push 0x5010c2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x270], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xa]
mov edx, dword [ebp - 4]
mov dword [edx + 0x274], eax
cmp word [ebp - 0x28], 0x1b
jne 0x500cfc
mov eax, dword [ebp - 4]
mov byte [eax + 0x2c], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x34], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x2c], 0
jne 0x501044
movzx eax, word [ebp - 0x28]
add eax, 0xfffffffa
cmp eax, 0x15
ja case.0x500d1b.6
mov al, byte [eax + 0x500d22]
jmp dword [eax*4 + 0x500d38]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
mov dword [edx + 0x20], eax
mov eax, dword [ebp - 4]
test byte [eax + 0x20], 0xff
je 0x500d67
mov eax, dword [ebp - 4]
mov byte [eax + 0x194], 1
jmp case.0x500d1b.6
mov eax, dword [ebp - 4]
mov byte [eax + 0x194], 1
cmp word [ebp - 0x28], 0x17
jne 0x500d7d
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [0x52b860]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
jne 0x500f3c
cmp word [ebp - 0x28], 0xbc3
jne 0x500daf
mov eax, dword [0x52b734]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
call fcn.004c663c
test al, al
je 0x5010a6
cmp word [ebp - 0x28], 0xbc5
jne 0x500de9
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [0x52b860]
mov eax, dword [eax]
movzx ecx, word [eax + 0xa]
mov eax, dword [0x52b860]
mov eax, dword [eax]
movzx edx, word [eax + 8]
mov eax, dword [0x52b734]
mov eax, dword [eax]
call fcn.004c6588
test al, al
je 0x5010a6
movzx eax, word [ebp - 0x28]
add eax, 0xfffff443
cmp eax, 0x14
ja case.0x500e01.3005
mov al, byte [eax + 0x500e08]
jmp dword [eax*4 + 0x500e1d]
mov eax, dword [ebp - 4]
add eax, 0x280
lea edx, [ebp - 0x28]
mov ecx, dword [0x47c6c0]
call fcn.004053a4
cmp word [ebp - 0x28], 0xbc1
jne 0x500e5a
mov word [ebp - 0x28], 0xd
jmp case.0x500e01.3005
sub word [ebp - 0x28], 0xbb8
jmp case.0x500e01.3005
mov eax, dword [ebp - 4]
cmp dword [eax + 0x18], 0
je 0x500e9d
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + 0xa]
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
mov dword [edx + 0x12c], eax
mov eax, dword [ebp - 4]
add eax, 0x280
lea edx, [ebp - 0x28]
mov ecx, dword [0x47c6c0]
call fcn.004053a4
mov word [ebp - 0x28], 0xa97
jmp case.0x500e01.3005
mov eax, dword [ebp - 4]
add eax, 0x280
lea edx, [ebp - 0x28]
mov ecx, dword [0x47c6c0]
call fcn.004053a4
mov word [ebp - 0x28], 8
jmp case.0x500e01.3005
mov eax, dword [ebp - 4]
add eax, 0x280
lea edx, [ebp - 0x28]
mov ecx, dword [0x47c6c0]
call fcn.004053a4
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ax, word [eax + 4]
mov edx, dword [ebp - 4]
mov word [edx + 0x282], ax
sub word [ebp - 0x28], 0xbb8
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x264], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xa]
mov edx, dword [ebp - 4]
mov dword [edx + 0x268], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + 0x26c], eax
mov ax, word [ebp - 0x28]
sub ax, 0x11
je 0x500fac
sub ax, 0xe
jne 0x50100a
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
mov dword [edx + 0x1d0], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x4c]
lea eax, [eax + eax*4]
mov edx, 0xc8
sub edx, eax
mov dword [ebp - 0x2c], edx
fild dword [ebp - 0x2c]
call fcn.00402bf8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x50
jle 0x500f8f
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x244], eax
jmp 0x500f9c
mov eax, dword [ebp - 4]
mov dword [eax + 0x244], 0x50
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x1c4], eax
jmp 0x501029
mov al, byte [ebp - 0x26]
mov edx, dword [ebp - 4]
mov byte [edx + 0xc], al
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x501029
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov esi, eax
lea edi, [edx + 0x16c]
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 4]
mov dword [eax + 0x16c], 0xffffffff
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
mov dword [edx + 0x180], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 4]
mov dword [edx + 0x184], eax
mov edx, 0x24
mov eax, dword [ebp - 0xc]
call fcn.004027bc
jmp 0x501029
mov ax, word [ebp - 0x24]
mov edx, dword [ebp - 4]
mov word [edx + 8], ax
mov ax, word [ebp - 0x20]
mov edx, dword [ebp - 4]
mov word [edx + 0xa], ax
mov al, byte [ebp - 0x26]
mov edx, dword [ebp - 4]
mov byte [edx + 0xc], al
movzx eax, word [ebp - 0x28]
mov edx, dword [ebp - 4]
mov dword [edx + 0x1a8], eax
mov eax, dword [ebp - 4]
mov si, 0xffff
call fcn.00403b30
jmp 0x50106b
cmp word [ebp - 0x28], 0x21
jne 0x50106b
movzx eax, word [ebp - 0x28]
mov edx, dword [ebp - 4]
mov dword [edx + 0x1a8], eax
mov eax, dword [ebp - 4]
mov si, 0xffff
call fcn.00403b30
mov eax, dword [ebp - 4]
mov byte [eax + 0x34], 1
cmp word [ebp - 0x28], 0x20
je 0x501079
cmp word [ebp - 0x28], 0x22
jne 0x50109a
mov eax, dword [ebp - 4]
mov byte [eax + 0x2c], 1
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [0x52b734]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
call fcn.004c6d34
mov eax, dword [ebp - 4]
mov si, 0xfff9
call fcn.00403b30
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5010c9
lea eax, [ebp - 0x28]
mov edx, dword [0x47c6c0]
call fcn.00405140
ret