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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
test dl, dl
je 0x4be989
add esp, 0xfffffff0
call fcn.004043c4
mov esi, ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov edi, dword [ebp + 0x20]
mov eax, dword [0x5316d4]
mov eax, dword [eax]
mov dword [ebx + 0x14], eax
mov eax, esi
sub eax, 0x2a
je 0x4be9b1
add eax, 0xfffffff3
sub eax, 2
jb 0x4be9b1
sub eax, 0x27
jne 0x4be9bb
mov eax, dword [0x5320c0]
mov eax, dword [eax]
mov dword [ebx + 0x14], eax
mov eax, esi
sub eax, 0x32
jne 0x4be9cc
mov eax, dword [0x531f88]
mov eax, dword [eax]
mov dword [ebx + 0x14], eax
xor eax, eax
mov al, byte [ebp + 0x10]
cmp eax, 0x10
ja case.0x4be9da.0
jmp dword [eax*4 + 0x4be9e1]
mov eax, esi
sub eax, 0x2a
je 0x4bea34
add eax, 0xfffffff3
sub eax, 2
jae 0x4bea39
mov esi, 0x6f
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 6
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 0
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x68], al
mov dword [ebx + 0x74], 0xa
cmp esi, 0x26
jne 0x4bea77
mov dword [ebx + 0x90], 0xa
cmp esi, 0x27
jne 0x4bea8d
mov dword [ebx + 0x90], 4
mov dword [ebx + 0x74], 8
mov eax, esi
sub eax, 0x51
sub eax, 3
jns case.0x4be9da.0
mov byte [ebx + 0x84], 1
mov byte [ebx + 0x68], 1
cmp esi, 0x51
jne 0x4beacf
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp dword [eax + 8], 0x54
jl 0x4beac1
mov dword [ebx + 0x18], 0x82
jmp 0x4beac8
mov dword [ebx + 0x18], 0x8c
mov byte [ebx + 0x85], 1
cmp esi, 0x52
jne 0x4beb05
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp dword [eax + 8], 0x4e
jl 0x4beaf7
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp dword [eax + 0xc], 0x30
jl 0x4beaf7
mov dword [ebx + 0x18], 0x96
jmp 0x4beafe
mov dword [ebx + 0x18], 0xa0
mov byte [ebx + 0x85], 2
cmp esi, 0x53
jne 0x4beb18
mov dword [ebx + 0x18], 0xb4
mov byte [ebx + 0x85], 3
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 0xa
mov dword [ebx + 0x1c], 0xbe
mov dword [ebx + 0x74], 0xa
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 6
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 0
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x68], al
mov dword [ebx + 0x74], 1
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 0x14
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 1
mov byte [ebx + 0x68], 0
mov dword [ebx + 0x74], 0x14
mov eax, dword [0x531df0]
mov eax, dword [eax]
mov eax, dword [eax + 0x398]
mov dword [ebx + 0x14], eax
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 0xffffffff
mov dword [ebx + 0x74], 0xa
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 1
mov byte [ebx + 0x68], 0
cmp esi, 0x50
jne 0x4bec5c
mov byte [ebx + 0x84], 2
mov eax, 6
call fcn.004038e0
cmp eax, 5
ja case.default.0x4bebfb
jmp dword [eax*4 + 0x4bec02]
mov dword [ebx + 0x18], 0xe6
jmp case.default.0x4bebfb
mov dword [ebx + 0x18], 0xf0
jmp case.default.0x4bebfb
mov dword [ebx + 0x18], 0xfa
jmp case.default.0x4bebfb
mov dword [ebx + 0x18], 0xe6
jmp case.default.0x4bebfb
mov dword [ebx + 0x18], 0xf0
jmp case.default.0x4bebfb
mov dword [ebx + 0x18], 0xfa
mov dword [ebx + 0x7c], 4
mov dword [ebx + 0x74], 5
cmp esi, 0x46
jne 0x4beca5
mov byte [ebx + 0x84], 3
mov eax, 3
call fcn.004038e0
sub eax, 1
jb 0x4bec7e
je 0x4bec87
dec eax
je 0x4bec90
jmp 0x4bec97
mov dword [ebx + 0x18], 0x190
jmp 0x4bec97
mov dword [ebx + 0x18], 0x19a
jmp 0x4bec97
mov dword [ebx + 0x18], 0x1a4
mov dword [ebx + 0x7c], 4
mov dword [ebx + 0x74], 5
cmp esi, 0x47
jne 0x4becb8
mov byte [ebx + 0x84], 3
mov dword [ebx + 0x74], 0x14
cmp esi, 0x48
jne 0x4becd2
mov byte [ebx + 0x84], 3
mov dword [ebx + 0x7c], 3
mov dword [ebx + 0x74], 0xa
cmp esi, 0x49
jne 0x4becec
mov byte [ebx + 0x84], 3
mov dword [ebx + 0x7c], 5
mov dword [ebx + 0x74], 0x14
cmp esi, 0x4a
jne 0x4bed06
mov byte [ebx + 0x84], 3
mov dword [ebx + 0x7c], 4
mov dword [ebx + 0x74], 0x23
cmp esi, 0x5a
jne case.0x4be9da.0
mov dword [ebx + 0x18], 0x15e
mov dword [ebx + 0x1c], 0x15e
mov dword [ebx + 0x74], 0x1e
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 0xffffffff
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 1
mov byte [ebx + 0x68], 0
mov eax, dword [0x531400]
mov eax, dword [eax]
mov dword [ebx + 0x14], eax
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 3
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 0
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x68], al
mov dword [ebx + 0x74], 3
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 1
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 0
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x68], al
mov dword [ebx + 0x74], 1
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 6
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 0
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x68], al
mov dword [ebx + 0x74], 2
jmp case.0x4be9da.0
xor eax, eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x90], 1
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov byte [ebx + 0x69], 0
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x68], al
mov dword [ebx + 0x74], 1
xor eax, eax
mov dword [ebx + 0x80], eax
mov dword [ebx + 8], esi
mov eax, dword [ebp + 0x24]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x34], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x38], eax
cmp byte [ebx + 0x84], 1
jne 0x4bee77
cmp esi, 0x51
jne 0x4bee55
sub edi, 0xe
add dword [ebp + 0x1c], 0x14
cmp esi, 0x51
jne 0x4bee61
sub edi, 0x46
sub dword [ebp + 0x1c], 0xa
cmp esi, 0x53
jne 0x4bee6d
sub edi, 0x3c
sub dword [ebp + 0x1c], 0x46
mov eax, 0x2010
call fcn.004bd158
mov dword [ebx + 0xa4], edi
mov eax, dword [ebp + 0x1c]
mov dword [ebx + 0xa8], eax
mov dword [ebx + 0x44], edi
mov eax, dword [ebp + 0x1c]
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x4c], edi
mov eax, dword [ebp + 0x1c]
mov dword [ebx + 0x50], eax
mov dword [ebp - 0x10], edi
fild dword [ebp - 0x10]
fstp qword [ebx + 0x58]
wait
fild dword [ebp + 0x1c]
fstp qword [ebx + 0x60]
wait
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0x10c]
shl eax, 4
lea eax, [eax + eax*2]
mov edx, dword [0x531548]
mov edx, dword [edx]
add eax, dword [edx + 0xd4]
mov dword [ebx + 0xbc], eax
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0x110]
shl eax, 5
mov edx, dword [0x531548]
mov edx, dword [edx]
add eax, dword [edx + 0xd8]
mov dword [ebx + 0xc0], eax
cmp byte [ebx + 0x84], 0
jne 0x4bef08
mov eax, dword [ebx + 0x18]
add eax, 0xaa
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x7c], 1
mov esi, dword [ebx + 0x34]
cmp esi, dword [ebx + 0xa4]
je 0x4bef2c
mov eax, esi
sub eax, dword [ebx + 0xa4]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 8], eax
jmp 0x4bef33
mov dword [ebp - 8], 1
mov eax, dword [ebx + 0x38]
cmp eax, dword [ebx + 0xa8]
je 0x4bef51
mov eax, dword [ebx + 0x38]
sub eax, dword [ebx + 0xa8]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0xc], eax
jmp 0x4bef58
mov dword [ebp - 0xc], 1
mov eax, dword [ebx + 0xa4]
sub eax, esi
cdq
xor eax, edx
sub eax, edx
mov ecx, eax
mov eax, dword [ebx + 0xa8]
sub eax, dword [ebx + 0x38]
cdq
xor eax, edx
sub eax, edx
cmp ecx, eax
jle 0x4befc2
fild dword [ebp - 8]
fdivr dword [0x4bf094]
sub esi, dword [ebx + 0xa4]
mov dword [ebp - 0x10], esi
fild dword [ebp - 0x10]
fmulp st(1)
call fcn.00403340
mov dword [ebx + 0xac], eax
fild dword [ebp - 8]
fdivr dword [0x4bf094]
mov eax, dword [ebx + 0x38]
sub eax, dword [ebx + 0xa8]
mov dword [ebp - 0x10], eax
fild dword [ebp - 0x10]
fmulp st(1)
call fcn.00403340
mov dword [ebx + 0xb0], eax
jmp 0x4bf009
fild dword [ebp - 0xc]
fdivr dword [0x4bf094]
sub esi, dword [ebx + 0xa4]
mov dword [ebp - 0x10], esi
fild dword [ebp - 0x10]
fmulp st(1)
call fcn.00403340
mov dword [ebx + 0xac], eax
fild dword [ebp - 0xc]
fdivr dword [0x4bf094]
mov eax, dword [ebx + 0x38]
sub eax, dword [ebx + 0xa8]
mov dword [ebp - 0x10], eax
fild dword [ebp - 0x10]
fmulp st(1)
call fcn.00403340
mov dword [ebx + 0xb0], eax
mov dword [ebx + 0x78], 0x32
call fcn.00407464
mov dword [ebx + 0x94], eax
call fcn.00407464
mov dword [ebx + 0x98], eax
call fcn.00407464
mov dword [ebx + 0xa0], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x9c], eax
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
mov eax, edi
call fcn.004ce6c0
mov byte [ebx + 0x30], al
mov al, byte [ebx + 0x30]
mov byte [ebx + 0x31], al
xor eax, eax
mov dword [ebx + 0x70], eax
mov byte [ebx + 4], 1
mov dword [ebx + 0xc4], 0x1869f
mov dword [ebx + 0xc8], 0x1869f
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x4bf088
call fcn.0040441c
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20