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

Disassembly:
sub esp, 0x124
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x41291a
mov eax, dword [esi + 8]
test eax, eax
je 0x41291a
mov al, byte [esi + 0x25]
test al, al
jne 0x41291a
mov al, byte [esi + 0x2c]
mov dword [esp + 0x10], 0x14
test al, al
jne 0x412544
mov dword [esp + 0x10], 0xa
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
mov dword [esp + 0x20], eax
mov dword [esp + 0x64], edx
lea ecx, [eax + 0x14]
lea edi, [edx - 0xa]
mov dword [esp + 0x30], ecx
lea ecx, [eax + 0x1e]
mov dword [esp + 0x38], ecx
lea ecx, [eax + 0x28]
mov dword [esp + 0x40], ecx
lea ecx, [eax + 0x32]
mov dword [esp + 0x48], ecx
lea ecx, [eax + 0x3c]
mov dword [esp + 0x50], ecx
lea ecx, [eax + 0x46]
mov dword [esp + 0x58], ecx
lea ecx, [edx + 0xa]
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x6c], ecx
lea edi, [eax + 0x50]
lea ecx, [edx + 0x14]
mov dword [esp + 0x60], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x98], edi
mov dword [esp + 0xa0], edi
mov dword [esp + 0xa8], edi
lea ecx, [edx + 0x1e]
lea edi, [eax + 0x46]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0xb0], edi
lea ecx, [edx + 0x28]
lea edi, [eax + 0x3c]
mov dword [esp + 0x84], ecx
mov dword [esp + 0xb8], edi
lea ecx, [edx + 0x32]
lea edi, [eax + 0x32]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0xc0], edi
lea ecx, [edx + 0x3c]
lea edi, [eax + 0x28]
mov dword [esp + 0x94], ecx
mov dword [esp + 0xc8], edi
lea ecx, [edx + 0x46]
lea edi, [eax + 0x1e]
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xd0], edi
lea ebp, [eax - 0xa]
lea ebx, [eax + 0xa]
lea ecx, [edx + 0x50]
lea edi, [eax + 0x14]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb4], ecx
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], edi
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe0], ebx
mov dword [esp + 0xe4], ecx
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], ecx
lea ecx, [edx + 0x46]
mov dword [esp + 0xf0], ebp
mov dword [esp + 0xf4], ecx
lea ecx, [edx + 0x3c]
mov dword [esp + 0xfc], ecx
lea ecx, [edx + 0x32]
mov dword [esp + 0x104], ecx
lea ecx, [edx + 0x28]
mov dword [esp + 0x10c], ecx
lea ecx, [edx + 0x1e]
mov dword [esp + 0x114], ecx
lea ecx, [edx + 0x14]
mov dword [esp + 0x11c], ecx
lea ecx, [edx + 0xa]
mov dword [esp + 0x124], ecx
mov cl, byte [esi + 0x24]
test cl, cl
mov dword [esp + 0xf8], ebp
mov dword [esp + 0x100], ebp
mov dword [esp + 0x108], ebp
mov dword [esp + 0x110], ebp
mov dword [esp + 0x118], ebp
mov dword [esp + 0x120], ebp
mov dword [esp + 0x128], ebp
mov dword [esp + 0x12c], edx
mov dword [esp + 0x130], ebp
je 0x412865
mov edx, dword [esi + 0x20]
inc edx
mov eax, edx
mov dword [esi + 0x20], edx
cmp eax, 8
jle 0x412787
mov ecx, dword [esi + 0x28]
mov dword [esi + 0x20], 8
inc ecx
mov eax, ecx
mov dword [esi + 0x28], ecx
cmp eax, 8
jle 0x412787
mov byte [esi + 0x24], 0
mov dword [esi + 0x30], 0
mov eax, dword [esi + 0x20]
cmp eax, 8
jge 0x4127ef
lea edi, [eax - 2]
cmp edi, eax
jg 0x4127db
mov ebp, dword [esp + 0x10]
mov ebx, edi
imul ebx, ebp
test edi, edi
jle 0x4127d1
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 0x1c]
sub edx, eax
mov ecx, dword [esi + 0x10]
sar edx, 3
imul edx, edi
push 0
push 0
add edx, eax
push ebx
push edx
mov edx, dword [esi + 0x18]
sub edx, ecx
sar edx, 3
imul edx, edi
add edx, ecx
mov ecx, dword [esi + 4]
call fcn.004108a0
mov eax, dword [esi + 0x20]
inc edi
add ebx, ebp
cmp edi, eax
jle 0x41279f
mov dword [esi + 0x28], 6
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x124
ret
mov edi, dword [esi + 0x28]
cmp edi, eax
jge 0x412839
mov ebp, dword [esp + 0x10]
mov ebx, edi
imul ebx, ebp
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 0x1c]
sub edx, eax
mov ecx, dword [esi + 0x10]
sar edx, 3
imul edx, edi
push 0
push 0
add edx, eax
push ebx
push edx
mov edx, dword [esi + 0x18]
sub edx, ecx
sar edx, 3
imul edx, edi
add edx, ecx
mov ecx, dword [esi + 4]
call fcn.004108a0
mov eax, dword [esi + 0x20]
inc edi
add ebx, ebp
cmp edi, eax
jl 0x4127ff
jmp 0x41283d
mov ebp, dword [esp + 0x10]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
push 0
lea eax, [ebp*8]
push 0
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.004108a0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x124
ret
mov ecx, dword [esp + 0x10]
push 0
shl ecx, 3
push 0
push ecx
mov ecx, dword [esi + 4]
push eax
call fcn.004108a0
mov al, byte [esi + 0x2c]
test al, al
je 0x41291a
mov eax, dword [esi + 0x18]
mov ecx, dword [0x431300]
cmp ecx, eax
jl 0x41291a
add eax, 0x64
cmp ecx, eax
jge 0x41291a
mov eax, dword [esi + 0x1c]
mov ecx, dword [0x431304]
cmp ecx, eax
jl 0x41291a
add eax, 0x64
cmp ecx, eax
jge 0x41291a
push 3
call fcn.0040f990
add esp, 4
test al, al
jne 0x4128d2
push 0x64
push str.bwav_cpgd.wav
push 0
push 3
call fcn.0040f8d0
add esp, 0x10
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0xc]
push 0
push 0
push edx
mov edx, dword [esi + 0x18]
call fcn.0040fdb0
mov eax, dword [esi + 0x30]
shl eax, 3
mov ecx, dword [esp + eax + 0x18]
mov edx, dword [esp + eax + 0x14]
push ecx
mov ecx, dword [esi + 8]
push edx
call fcn.00412f80
mov ecx, dword [esi + 8]
call fcn.00412f00
mov ecx, dword [esi + 0x30]
inc ecx
mov eax, ecx
mov dword [esi + 0x30], ecx
cmp eax, 0x24
jl 0x41291a
mov dword [esi + 0x30], 0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x124
ret