Function at 0x40d460
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x108
push ebx
push ebp
mov ebp, ecx
push esi
xor ebx, ebx
push edi
mov al, byte [ebp + 0x84]
push ebx
cmp al, bl
mov byte [esp + 0x1b], bl
push ebx
je 0x40d4e1
mov eax, dword [ebp + 0x80]
mov ecx, dword [ebp + 4]
push eax
push ebx
xor edx, edx
call fcn.00410620
mov ecx, dword [ebp + 0x80]
add ecx, 0x14
mov eax, ecx
mov dword [ebp + 0x80], ecx
cmp eax, 0xc8
jl 0x40db6f
mov byte [ebp + 0x84], bl
mov dword [0x4312a0], ebx
mov dword [0x4312a4], ebx
mov byte [0x431298], 1
mov dword [0x431290], ebx
mov dword [0x431294], ebx
xor al, al
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 4]
push ebx
xor edx, edx
call fcn.0040fc50
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xa
div ecx
cmp edx, 8
jne 0x40d514
mov ecx, dword [ebp + 0x14]
push ebx
push ebx
push 0xa7
mov edx, 0x220
call fcn.0040fc50
mov eax, 0x1b3
mov esi, 0x14b
mov dword [esp + 0x94], eax
mov dword [esp + 0xdc], eax
mov edi, 0x1a3
mov edx, 0x166
mov ecx, 0x10f
mov eax, 0x1c8
mov dword [esp + 0x5c], esi
mov dword [esp + 0xd4], esi
mov dword [esp + 0x18], 0xa5
mov dword [esp + 0x1c], 0x15b
mov dword [esp + 0x20], 0xaa
mov dword [esp + 0x24], 0x141
mov dword [esp + 0x28], 0xbd
mov dword [esp + 0x2c], 0x11f
mov dword [esp + 0x30], 0xe4
mov dword [esp + 0x34], 0x130
mov dword [esp + 0x38], 0xf9
mov dword [esp + 0x3c], 0x156
mov dword [esp + 0x40], 0x109
mov dword [esp + 0x44], 0x18e
mov dword [esp + 0x48], 0x10a
mov dword [esp + 0x4c], 0x1ca
mov dword [esp + 0x50], 0xf2
mov dword [esp + 0x54], 0x1fa
mov dword [esp + 0x58], edi
mov dword [esp + 0x60], 0x1b2
mov dword [esp + 0x64], 0x14e
mov dword [esp + 0x68], 0x1b8
mov dword [esp + 0x6c], 0x162
mov dword [esp + 0x70], 0x1a6
mov dword [esp + 0x74], 0x172
mov dword [esp + 0x78], 0x18c
mov dword [esp + 0x7c], 0x185
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], 0x197
mov dword [esp + 0x88], 0x143
mov dword [esp + 0x8c], 0x1a1
mov dword [esp + 0x90], ecx
mov dword [esp + 0x98], 0xd5
mov dword [esp + 0x9c], 0x16a
mov dword [esp + 0xa0], 0xe4
mov dword [esp + 0xa4], edx
mov dword [esp + 0xa8], 0xf2
mov dword [esp + 0xac], 0x163
mov dword [esp + 0xb0], 0x109
mov dword [esp + 0xb4], 0x15c
mov dword [esp + 0xb8], 0x125
mov dword [esp + 0xbc], 0x154
mov dword [esp + 0xc0], 0x146
mov dword [esp + 0xc4], 0x150
mov dword [esp + 0xc8], 0x16e
mov dword [esp + 0xcc], 0x14a
mov dword [esp + 0xd0], edi
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], 0xf7
mov dword [esp + 0xe4], 0x1bb
mov dword [esp + 0xe8], 0xd7
mov dword [esp + 0xec], 0x1c1
mov dword [esp + 0xf0], 0xb7
mov dword [esp + 0xf4], eax
mov dword [esp + 0xf8], 0x92
mov dword [esp + 0xfc], 0x1cc
mov dword [esp + 0x100], 0x67
mov dword [esp + 0x104], 0x1d0
mov dword [esp + 0x108], 0x42
mov dword [esp + 0x10c], eax
mov dword [esp + 0x110], 0x4a
mov dword [esp + 0x114], 0x1a9
xor esi, esi
mov ecx, dword [0x4312a8]
push ebx
push ecx
lea eax, [esi + ecx]
mov ecx, dword [ebp + 0x10]
shl eax, 3
mov edx, dword [esp + eax + 0x24]
sub edx, 0x19
push edx
mov edx, dword [esp + eax + 0x24]
sub edx, 0x17
call fcn.0040ff30
add esi, 8
cmp esi, 0x10
jl 0x40d776
mov eax, dword [0x4312a8]
inc eax
cmp eax, 7
mov dword [0x4312a8], eax
jle 0x40d7b9
mov dword [0x4312a8], ebx
cmp byte [ebp + 0x85], bl
jne 0x40d945
xor edi, edi
mov ecx, dword [0x431304]
mov edx, dword [0x431300]
lea eax, [edi + edi*4]
push ecx
push edx
lea esi, [ebp + eax*4]
lea ecx, [esi + 0x18]
call fcn.00414310
test al, al
je 0x40d915
fld qword [0x4312a0]
fcomp qword [0x428458]
mov byte [esp + 0x17], 1
fnstsw ax
test ah, 0x40
jne 0x40d822
mov eax, dword [0x4312a4]
mov ecx, dword [0x4312a0]
mov edx, dword [esi + 0x20]
push edi
push ebx
push eax
push ecx
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [esi + 0x1c]
call fcn.00410b30
cmp edi, ebx
jne 0x40d868
cmp byte [0x4312ac], bl
jne 0x40d926
mov byte [0x4312ac], 1
mov byte [0x4312b0], bl
mov byte [0x4312af], bl
mov byte [0x4312ae], bl
mov byte [0x4312ad], bl
push 0x64
push str.bwav_button1.wav
push ebx
push 2
call fcn.0040f8d0
add esp, 0x10
jmp 0x40d926
cmp edi, 1
jne 0x40d89a
cmp byte [0x4312ad], bl
jne 0x40d926
mov byte [0x4312ad], 1
mov byte [0x4312b0], bl
mov byte [0x4312af], bl
mov byte [0x4312ae], bl
mov byte [0x4312ac], bl
jmp 0x40d851
cmp edi, 2
jne 0x40d8c8
cmp byte [0x4312ae], bl
jne 0x40d926
mov byte [0x4312ae], 1
mov byte [0x4312b0], bl
mov byte [0x4312af], bl
mov byte [0x4312ad], bl
mov byte [0x4312ac], bl
jmp 0x40d851
cmp edi, 3
jne 0x40d8e4
cmp byte [0x4312af], bl
jne 0x40d926
mov byte [0x4312af], 1
mov byte [0x4312b0], bl
jmp 0x40d8fe
cmp edi, 4
jne 0x40d926
cmp byte [0x4312b0], bl
jne 0x40d926
mov byte [0x4312b0], 1
mov byte [0x4312af], bl
mov byte [0x4312ae], bl
mov byte [0x4312ad], bl
mov byte [0x4312ac], bl
jmp 0x40d851
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
mov ecx, dword [ebp + 8]
push edi
push ebx
push eax
call fcn.0040fc50
inc edi
cmp edi, 5
jl 0x40d7c7
cmp byte [esp + 0x17], bl
jne 0x40dac1
mov byte [0x4312b0], bl
jmp 0x40daa9
xor esi, esi
mov eax, dword [ebp + esi*4 + 0x94]
cmp eax, ebx
jl 0x40da7e
cmp eax, 8
jge 0x40da7e
lea ecx, [esi + esi*4]
push eax
push ebx
mov edx, dword [ebp + ecx*4 + 0x20]
lea edi, [ebp + ecx*4]
mov ecx, dword [ebp + 0xc]
push edx
mov edx, dword [edi + 0x1c]
call fcn.0040fdb0
mov eax, dword [0x431304]
mov ecx, dword [0x431300]
push eax
push ecx
lea ecx, [edi + 0x18]
call fcn.00414310
test al, al
je 0x40da99
mov edx, dword [ebp + esi*4 + 0x94]
mov eax, dword [0x4312a4]
mov ecx, dword [0x4312a0]
push edx
mov edx, dword [edi + 0x20]
push ebx
push eax
push ecx
mov ecx, dword [ebp + 0xc]
push edx
mov edx, dword [edi + 0x1c]
mov byte [esp + 0x2b], 1
call fcn.00410b30
cmp esi, ebx
jne 0x40d9ff
cmp byte [0x4312ac], bl
jne 0x40da99
mov byte [0x4312ac], 1
mov byte [0x4312af], bl
mov byte [0x4312ae], bl
mov byte [0x4312ad], bl
push 0x64
push str.bwav_button1.wav
push ebx
push 2
call fcn.0040f8d0
add esp, 0x10
jmp 0x40da99
cmp esi, 1
jne 0x40da2b
cmp byte [0x4312ad], bl
jne 0x40da99
mov byte [0x4312ad], 1
mov byte [0x4312af], bl
mov byte [0x4312ae], bl
mov byte [0x4312ac], bl
jmp 0x40d9e8
cmp esi, 2
jne 0x40da53
cmp byte [0x4312ae], bl
jne 0x40da99
mov byte [0x4312ae], 1
mov byte [0x4312af], bl
mov byte [0x4312ad], bl
mov byte [0x4312ac], bl
jmp 0x40d9e8
cmp esi, 3
jne 0x40da99
cmp byte [0x4312af], bl
jne 0x40da99
mov byte [0x4312af], 1
mov byte [0x4312ae], bl
mov byte [0x4312ad], bl
mov byte [0x4312ac], bl
jmp 0x40d9e8
lea eax, [esi + esi*4]
push 8
push ebx
mov ecx, dword [ebp + eax*4 + 0x20]
mov edx, dword [ebp + eax*4 + 0x1c]
lea eax, [ebp + eax*4]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.0040fdb0
inc esi
cmp esi, 4
jl 0x40d947
cmp byte [esp + 0x17], bl
jne 0x40dac1
mov byte [0x4312af], bl
mov byte [0x4312ae], bl
mov byte [0x4312ad], bl
mov byte [0x4312ac], bl
mov eax, dword [0x431308]
cmp eax, 3
jne 0x40dae1
mov dword [0x4312a0], 0
mov dword [0x4312a4], 0
jmp 0x40dafa
cmp eax, 1
jne 0x40dafa
mov dword [0x4312a0], 0x9999999a
mov dword [0x4312a4], 0xbfd99999
fld qword [0x4312a0]
fcomp qword [0x428458]
cmp byte [0x431298], bl
fnstsw ax
je 0x40db44
test ah, 0x41
jne 0x40db6f
fld qword [0x4312a0]
fadd qword [0x428430]
fst qword [0x4312a0]
fcomp qword [0x428450]
fnstsw ax
test ah, 0x41
jne 0x40db6f
mov byte [0x431298], bl
xor al, al
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
test ah, 0x41
jne 0x40db6f
fld qword [0x4312a0]
fsub qword [0x428430]
fst qword [0x4312a0]
fcomp qword [0x428448]
fnstsw ax
test ah, 1
je 0x40db6f
mov byte [0x431298], 1
pop edi
xor al, al
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret