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

Disassembly:
jmp 0x413a20
mov al, byte [0x794f48]
sub esp, 0x540
push ebx
push ebp
push esi
push edi
mov edi, 1
xor ebx, ebx
xor ebp, ebp
xor esi, esi
cmp al, 0x13
mov dword [0xd3d8bc], edi
jne 0x413a73
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x150]
lea edx, [esp + 0x150]
rep stosd dword es:[edi], eax
mov eax, dword [0x7977a0]
push edx
push 0x100
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov edi, 1
jmp 0x413aa1
mov eax, dword [0x794f44]
mov ecx, eax
or ecx, 8
jne 0x413a84
or eax, 2
je 0x413a8f
mov eax, dword [0x7977a0]
push eax
mov edx, dword [eax]
call dword [edx + 0x64]
mov eax, dword [0x7977a0]
lea edx, [esp + 0x10]
push edx
push 0x50
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
call dword [0xdd38ec]
mov ecx, dword [0x794f48]
and ecx, 0xff
cmp ecx, 0x13
jne 0x413d69
mov ecx, dword [0x7977dc]
test byte [esp + ecx + 0x150], 0x80
je 0x413b1d
mov edx, dword [ecx*4 + 0x7967a0]
mov ebp, 0x1010
cmp edx, ebx
mov esi, 0x10
je 0x413b0e
mov edi, eax
sub edi, edx
cmp edi, 0xfa
jl 0x413b01
mov edi, 1
mov dword [ecx*4 + 0x7967a0], eax
mov dword [0x77cdc0], edi
jmp 0x413b2a
mov dword [0x77cdc0], ebx
mov edi, 1
jmp 0x413b2a
mov dword [ecx*4 + 0x7967a0], eax
mov dword [0x77cdc0], edi
jmp 0x413b2a
mov dword [ecx*4 + 0x7967a0], ebx
mov dword [0x77cdc0], ebx
mov ecx, dword [0x7977e0]
test byte [esp + ecx + 0x150], 0x80
je 0x413b8a
mov edx, dword [ecx*4 + 0x7967a0]
or ebp, 0x2020
or esi, 0x20
cmp edx, ebx
je 0x413b7b
mov edi, eax
sub edi, edx
cmp edi, 0xfa
jl 0x413b6e
mov edi, 1
mov dword [ecx*4 + 0x7967a0], eax
mov dword [0x77cdc4], edi
jmp 0x413b97
mov dword [0x77cdc4], ebx
mov edi, 1
jmp 0x413b97
mov dword [ecx*4 + 0x7967a0], eax
mov dword [0x77cdc4], edi
jmp 0x413b97
mov dword [ecx*4 + 0x7967a0], ebx
mov dword [0x77cdc4], ebx
mov ecx, dword [0x7977e4]
test byte [esp + ecx + 0x150], 0x80
je 0x413bf7
mov edx, dword [ecx*4 + 0x7967a0]
or ebp, 0x4040
or esi, 0x40
cmp edx, ebx
je 0x413be8
mov edi, eax
sub edi, edx
cmp edi, 0xfa
jl 0x413bdb
mov edi, 1
mov dword [ecx*4 + 0x7967a0], eax
mov dword [0x77cdc8], edi
jmp 0x413c04
mov dword [0x77cdc8], ebx
mov edi, 1
jmp 0x413c04
mov dword [ecx*4 + 0x7967a0], eax
mov dword [0x77cdc8], edi
jmp 0x413c04
mov dword [ecx*4 + 0x7967a0], ebx
mov dword [0x77cdc8], ebx
mov ecx, dword [0x7977e8]
test byte [esp + ecx + 0x150], 0x80
je 0x413c60
mov edx, dword [ecx*4 + 0x7967a0]
or ebp, 0x8080
or esi, 0x80
cmp edx, ebx
je 0x413c55
mov edi, eax
sub edi, edx
cmp edi, 0xfa
jl 0x413c47
mov edi, 1
mov dword [ecx*4 + 0x7967a0], eax
mov eax, edi
jmp 0x413c69
xor eax, eax
mov edi, 1
mov dword [0x77cdcc], eax
jmp 0x413c6e
mov dword [ecx*4 + 0x7967a0], eax
mov eax, edi
jmp 0x413c69
mov dword [ecx*4 + 0x7967a0], ebx
xor eax, eax
mov dword [0x77cdcc], eax
test byte [esp + 0x16c], 0x80
je 0x413c90
mov ecx, dword [0x796810]
or ebp, 8
cmp ecx, ebx
jne 0x413c96
mov dword [0x796810], edi
or esi, 8
jmp 0x413c96
mov dword [0x796810], ebx
mov ecx, dword [0x7977ec]
test byte [esp + ecx + 0x150], 0x80
je 0x413cc0
mov edx, dword [ecx*4 + 0x7967a0]
or ebp, 4
cmp edx, ebx
jne 0x413cc7
mov dword [ecx*4 + 0x7967a0], edi
or esi, 4
jmp 0x413cc7
mov dword [ecx*4 + 0x7967a0], ebx
mov ecx, dword [0x7977f0]
test byte [esp + ecx + 0x150], 0x80
je 0x413cf1
mov edx, dword [ecx*4 + 0x7967a0]
or ebp, 2
cmp edx, ebx
jne 0x413cf8
mov dword [ecx*4 + 0x7967a0], edi
or esi, 2
jmp 0x413cf8
mov dword [ecx*4 + 0x7967a0], ebx
mov ecx, dword [0x7977f4]
test byte [esp + ecx + 0x150], 0x80
je 0x413d28
mov edx, dword [ecx*4 + 0x7967a0]
or ebp, 0x100
cmp edx, ebx
jne 0x413d2f
mov dword [ecx*4 + 0x7967a0], edi
or esi, 0x100
jmp 0x413d2f
mov dword [ecx*4 + 0x7967a0], ebx
test byte [esp + 0x15f], 0x80
je 0x413d5e
mov ecx, dword [0x7967dc]
or ebp, 0x200
cmp ecx, ebx
jne 0x413f5c
mov dword [0x7967dc], edi
or esi, 0x200
jmp 0x413f5c
mov dword [0x7967dc], ebx
jmp 0x413f5c
cmp ecx, 0x14
je 0x413d77
cmp ecx, 0x15
jne 0x413f57
mov edi, dword [esp + 0x10]
cmp edi, ebx
jl 0x413f57
mov edx, dword [esp + 0x14]
mov ecx, dword [0x7977dc]
cmp edx, ecx
jge 0x413dd9
mov ecx, dword [0x796ac0]
mov ebp, 0x1010
cmp ecx, ebx
mov esi, 0x10
je 0x413dc8
mov ebx, eax
sub ebx, ecx
cmp ebx, 0xfa
jl 0x413dc4
mov dword [0x796ac0], eax
mov dword [0x77cdc0], 1
xor ebx, ebx
jmp 0x413de5
xor ebx, ebx
jmp 0x413ddf
mov dword [0x796ac0], eax
mov dword [0x77cdc0], 1
jmp 0x413de5
mov dword [0x796ac0], ebx
mov dword [0x77cdc0], ebx
cmp edx, dword [0x7977e0]
jle 0x413e1e
mov ecx, dword [0x796ae0]
or ebp, 0x2020
or esi, 0x20
cmp ecx, ebx
je 0x413e0c
mov edx, eax
sub edx, ecx
cmp edx, 0xfa
jl 0x413e24
mov edx, 1
mov dword [0x796ae0], eax
mov dword [0x77cdc4], edx
jmp 0x413e2f
mov dword [0x796ae0], ebx
mov dword [0x77cdc4], ebx
mov edx, 1
cmp edi, dword [0x7977e4]
jge 0x413e82
mov ecx, dword [0x796acc]
or ebp, 0x4040
or esi, 0x40
cmp ecx, ebx
je 0x413e75
mov edx, eax
sub edx, ecx
cmp edx, 0xfa
jl 0x413e68
mov edx, 1
mov dword [0x796acc], eax
mov dword [0x77cdc8], edx
jmp 0x413e8e
mov dword [0x77cdc8], ebx
mov edx, 1
jmp 0x413e8e
mov dword [0x796acc], eax
mov dword [0x77cdc8], edx
jmp 0x413e8e
mov dword [0x796acc], ebx
mov dword [0x77cdc8], ebx
cmp edi, dword [0x7977e8]
jle 0x413ec1
mov ecx, dword [0x796ad4]
or ebp, 0x8080
or esi, 0x80
cmp ecx, ebx
je 0x413eb8
mov edi, eax
sub edi, ecx
cmp edi, 0xfa
jl 0x413ec7
mov dword [0x796ad4], eax
mov eax, edx
jmp 0x413ec9
mov dword [0x796ad4], ebx
xor eax, eax
mov ecx, dword [0x7977ec]
mov dword [0x77cdcc], eax
test byte [esp + ecx + 0x40], 0x80
je 0x413ef3
mov ecx, dword [0x796818]
or ebp, 4
cmp ecx, ebx
jne 0x413ef9
mov dword [0x796818], edx
or esi, 4
jmp 0x413ef9
mov dword [0x796818], ebx
mov ecx, dword [0x7977f0]
test byte [esp + ecx + 0x40], 0x80
je 0x413f1e
mov ecx, dword [0x796860]
or ebp, 2
cmp ecx, ebx
jne 0x413f24
mov dword [0x796860], edx
or esi, 2
jmp 0x413f24
mov dword [0x796860], ebx
mov ecx, dword [0x7977f4]
test byte [esp + ecx + 0x40], 0x80
je 0x413f4f
mov ecx, dword [0x7967f0]
or ebp, 0x100
cmp ecx, ebx
jne 0x413f5c
mov dword [0x7967f0], edx
or esi, 0x100
jmp 0x413f5c
mov dword [0x7967f0], ebx
jmp 0x413f5c
mov eax, dword [0x77cdcc]
mov cl, byte [0x77cdc8]
shl al, 1
add al, cl
mov cl, byte [0x77cdc4]
shl al, 1
add al, cl
mov cl, byte [0x77cdc0]
shl al, 1
add al, cl
mov ecx, dword [0x682578]
shl al, 2
add al, cl
shl al, 2
cmp ecx, ebx
jne 0x413faa
mov word [0x780e5c], si
pop edi
mov word [0x780e5a], bp
pop esi
pop ebp
mov byte [0x780e58], al
pop ebx
add esp, 0x540
ret
mov word [0x77da7c], si
pop edi
mov word [0x77da7a], bp
pop esi
pop ebp
mov byte [0x77da78], al
pop ebx
add esp, 0x540
ret