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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], 0
lea ebx, [esi + 0x6ac]
mov ecx, ebx
call fcn.004120d0
test al, al
je 0x405e91
push 0x58
mov ecx, ebx
call fcn.004120c0
mov eax, dword [esp + 0x10]
lea edi, [eax + 1]
cmp edi, 6
jge 0x405e91
lea ebp, [ebx + 0x28]
mov ecx, ebp
call fcn.004120d0
test al, al
jne 0x405e80
inc edi
add ebp, 0x28
cmp edi, 6
jl 0x405e6a
jmp 0x405e91
sub edi, dword [esp + 0x10]
lea ecx, [edi + edi*4]
shl ecx, 1
push ecx
mov ecx, ebx
call fcn.004120c0
mov eax, dword [esp + 0x10]
add ebx, 0x28
inc eax
cmp eax, 6
mov dword [esp + 0x10], eax
jl 0x405e47
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
sub eax, dword [esi + 0x10b8]
cmp eax, 0x32
jae 0x405ec2
call edi
sub eax, dword [esi + 0x10b8]
cmp eax, 0x32
jb 0x405eb5
call edi
mov dword [esi + 0x10b8], eax
mov eax, dword [esi + 0xfbc]
mov ebx, 1
cmp eax, ebx
jne 0x405f33
mov ecx, esi
call fcn.00406450
test al, al
jne 0x4063f4
mov eax, dword [esi + 0x10c0]
cmp eax, 7
je 0x405f29
cmp eax, 3
je 0x405f29
mov dword [esi + 0xfbc], 2
call edi
mov dword [esi + 0x10bc], eax
mov byte [esi + 0x10b0], 0
mov byte [esi + 0x10b1], 0
mov byte [esi + 0x10b2], 0
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x2c
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
cmp eax, 2
jne 0x4063a9
call edi
sub eax, dword [esi + 0x10bc]
cmp eax, 0x2710
jbe 0x405fff
mov byte [esi + 0x10b0], 1
call fcn.00415c1c
call fcn.00415c1c
call edi
mov dword [esi + 0x10bc], eax
mov edx, dword [str.0123456789abcdefg]
mov eax, dword [0x42f524]
mov ecx, dword [0x42f528]
mov dword [esp + 0x14], edx
mov edx, dword [0x42f52c]
mov dword [esp + 0x18], eax
mov ax, word [0x42f530]
mov dword [esp + 0x20], edx
mov edx, dword [0x42f514]
mov dword [esp + 0x1c], ecx
mov ecx, dword [str.pwavx_waitx.wav]
mov word [esp + 0x24], ax
mov eax, dword [0x42f518]
mov dword [esp + 0x2c], edx
mov edx, dword [0x42fa1c]
xor ebp, ebp
mov dword [esp + 0x28], ecx
mov ecx, dword [0x42f51c]
mov word [esp + 0x26], bp
mov dword [esp + 0x30], eax
mov al, byte [esp + edx + 0x14]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ebp
mov byte [esp + 0x2c], al
call edi
and eax, 3
lea edx, [esp + 0x28]
push 0x64
push edx
mov cl, byte [esp + eax + 0x1c]
push ebp
push ebp
mov byte [esp + 0x42], cl
mov dword [0x42fa18], eax
call fcn.0040f8d0
add esp, 0x10
jmp 0x406001
xor ebp, ebp
cmp dword [esi + 0xfc0], ebp
jne 0x40601d
mov al, byte [esi + 0x10ad]
test al, al
jne 0x40601d
mov al, byte [esi + 0x10ae]
test al, al
je 0x406025
call edi
mov dword [esi + 0x10bc], eax
mov al, byte [esi + 0x10ad]
test al, al
je 0x40605d
mov ecx, esi
call fcn.0040a670
test al, al
jne 0x4063f4
mov ecx, esi
call fcn.0040a0c0
test al, al
jne 0x4063f4
mov byte [esi + 0x10ad], al
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
mov al, byte [esi + 0x10ae]
mov ecx, esi
test al, al
je 0x40608c
call fcn.0040b860
test al, al
jne 0x406078
mov byte [esi + 0x10ae], al
mov eax, dword [esi + 0x10c0]
pop edi
cmp eax, 3
pop esi
pop ebp
pop ebx
setne al
add esp, 0x2c
ret
call fcn.00406db0
test al, al
jne 0x4063f4
mov al, byte [esi + 0x10a5]
test al, al
je 0x406136
cmp dword [esi + 0xfc0], ebp
jne 0x4060f3
cmp dword [0x431308], 6
jne 0x4060f3
mov byte [esi + 0x10ae], 1
mov dword [esi + 0xb58], 0xffffffff
mov eax, dword [0x4312f8]
inc eax
mov dword [esi + 0xb50], eax
mov ecx, dword [0x4312fc]
inc ecx
mov dword [esi + 0xb54], ecx
mov ecx, esi
call fcn.0040c410
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
test al, al
je 0x406136
cmp dword [esi + 0xfc0], ebp
jne 0x406136
lea ecx, [esi + 0xb84]
call fcn.004021c0
test al, al
jne 0x406136
mov dword [esi + 0xfc8], 0xffffffff
mov edi, 5
lea ebx, [esi + 0x774]
mov ecx, ebx
call fcn.00411f40
test al, al
jne 0x406168
dec edi
sub ebx, 0x28
cmp edi, ebp
jge 0x406123
mov eax, dword [esi + 0xfc0]
cmp eax, 4
je 0x4061ee
cmp eax, 6
je 0x4061ee
cmp eax, 0xb
je 0x4061f7
mov ecx, esi
call fcn.00407290
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
push 0x64
push str.bwav_mofa.wav
push ebp
push 3
call fcn.0040f8d0
lea edx, [edi + edi*4]
add esp, 0x10
mov byte [esi + 0x10ad], 1
mov dword [esi + 0xfc8], edi
lea ecx, [esi + edx*8 + 0x6ac]
mov byte [edi + esi + 0x79c], 0
call fcn.004120a0
mov eax, dword [esi + 0xcd4]
mov byte [esi + 0x10a6], 0
cmp eax, 0xe
jge 0x4061c2
mov ecx, 0xe
lea edi, [esi + eax*4 + 0xbc4]
sub ecx, eax
xor eax, eax
rep stosd dword es:[edi], eax
lea edi, [esi + 0x558]
mov ebx, 5
mov ecx, edi
call fcn.00412950
add edi, 0x34
dec ebx
jne 0x4061cd
mov dword [esi + 0x958], 0xffffffff
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
cmp eax, 0xb
jne 0x406361
lea edi, [esi + 0xb84]
push 1
mov ecx, edi
call fcn.00401970
test eax, eax
je 0x406361
cmp dword [esi + 0xfd0], ebp
jne 0x406361
mov ecx, edi
call fcn.004021c0
test al, al
jne 0x406234
mov ecx, edi
call fcn.00401820
test al, al
je 0x406361
lea edi, [esi + 0x74c]
mov dword [esi + 0xfc0], ebp
mov ecx, edi
mov byte [esi + 0x10af], 0
mov dword [esi + 0xfd0], 1
mov byte [esi + 0x10a5], 1
mov byte [esi + 0x10ad], 1
mov dword [esi + 0xfc8], 4
mov byte [esi + 0x7a0], 0
call fcn.004120b0
mov ecx, edi
call fcn.004120a0
mov byte [esi + 0x10a6], 0
lea edi, [esi + 0x558]
mov ebx, 5
mov ecx, edi
call fcn.00412950
add edi, 0x34
dec ebx
jne 0x406290
mov ebx, 0xfffff69a
mov dword [esi + 0x958], 0
lea edi, [esi + 0x966]
lea ebp, [esi + 0x930]
sub ebx, esi
lea ecx, [esi + 0x168]
call fcn.004111a0
mov dword [ebp], eax
mov byte [edi - 0xa], 0
mov byte [edi], 0
add ebp, 4
inc edi
lea eax, [ebx + edi]
cmp eax, 0xa
jl 0x4062ba
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xa
div ecx
mov ebp, 1
mov edi, edx
cmp ebp, 0xa
je 0x40633e
cmp ebp, 0x14
je 0x40633e
cmp ebp, 0x1e
je 0x40633e
push ebp
lea ecx, [esi + 0xb84]
call fcn.00401390
test al, al
je 0x40633e
push ebp
lea ecx, [esi + 0x168]
call fcn.00411320
test eax, eax
je 0x40633e
mov dword [esi + edi*4 + 0x930], ebp
mov ebx, edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xa
div ecx
mov edi, edx
cmp ebx, edi
je 0x406329
inc ebp
cmp ebp, 0x26
jl 0x4062f1
push 0x64
push str.bwav_mofa.wav
push 0
push 3
call fcn.0040f8d0
add esp, 0x10
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
lea ecx, [esi + 0xb84]
mov byte [esi + 0x10ac], 1
mov dword [esi + 0x10b4], ebp
mov dword [esi + 0xfbc], 3
mov dword [esi + 0xfc4], ebp
call fcn.004021c0
test al, al
jne 0x4063f4
push 0x64
push str.bwav_mj1.wav
push ebp
push 3
call fcn.0040f8d0
add esp, 0x10
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
cmp eax, 3
jne 0x4063f4
mov eax, dword [esi + 0xfc0]
cmp eax, 0xb
jne 0x4063cf
mov ecx, esi
call fcn.0040ab60
test al, al
jne 0x4063f4
cmp dword [0x431308], 3
jne 0x4063f4
jmp 0x4063e4
cmp eax, 4
je 0x4063d9
cmp eax, 6
jne 0x4063f4
mov ecx, esi
call fcn.0040ace0
test al, al
jne 0x4063f4
mov dword [esi + 0xfb8], 0
mov dword [esi + 0xfbc], ebx
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret