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

Disassembly:
sub esp, 0x94
push ebx
push ebp
mov ebp, ecx
push esi
push edi
xor edi, edi
mov eax, dword [ebp + 0xfc4]
cmp eax, edi
jne 0x40b053
push 0xbfe00000
push edi
call fcn.0040f3a0
mov al, byte [ebp + 0x10a5]
add esp, 8
test al, al
je 0x40aed4
mov dword [0x431280], edi
mov eax, dword [ebp + 0xcd4]
mov dword [0x4311b4], eax
mov eax, dword [ebp + 0xfe8]
cmp eax, edi
je 0x40ad62
mov edx, dword [ebp + 0xfcc]
mov byte [esp + 0x3c], 1
inc edx
mov eax, edx
mov dword [ebp + 0xfcc], edx
cmp eax, 6
jle 0x40ad56
mov dword [ebp + 0xfcc], 6
mov ecx, dword [ebp + 0xfcc]
mov dword [esp + 0x38], ecx
jmp 0x40ad9f
mov edx, dword [ebp + 0xfcc]
mov dword [ebp + 0xfe8], 1
inc edx
mov byte [esp + 0x3c], 0
mov eax, edx
mov dword [ebp + 0xfcc], edx
cmp eax, 6
jle 0x40ad8f
mov dword [ebp + 0xfcc], 6
mov edx, dword [ebp + 0xfcc]
mov dword [ebp + 0xfcc], edi
mov dword [esp + 0x38], edx
xor edi, edi
lea ebx, [ebp + 0xb84]
mov esi, 0x43117c
push edi
mov ecx, ebx
call fcn.004022f0
mov dword [esi], eax
add esi, 4
inc edi
cmp esi, 0x4311b4
jl 0x40adac
mov eax, dword [0x4311b0]
test eax, eax
jne 0x40addb
lea ecx, [ebp + 0xda8]
call fcn.004022d0
mov dword [0x4311b0], eax
mov eax, dword [esp + 0x3c]
mov cl, byte [ebp + 0x10af]
push eax
push ecx
lea ecx, [ebp + 0xda8]
call fcn.004022d0
mov edx, dword [esp + 0x40]
push eax
dec edx
mov ecx, ebx
push edx
call fcn.004023e0
mov dword [0x431178], eax
mov ecx, dword [ebp + 0xfe4]
imul ecx, eax
add ecx, dword [ebp + 0xfe0]
lea ecx, [ecx + ecx*4]
lea eax, [ecx + ecx*4]
lea ecx, [ebp + 0xce0]
shl eax, 2
mov dword [ebp + 0xfec], eax
mov eax, 0x4310cc
mov edx, dword [ecx]
add ecx, 4
mov dword [eax], edx
add eax, 4
cmp eax, 0x431178
jl 0x40ae2e
mov eax, dword [0x4311b0]
mov ecx, ebx
push eax
push 0xd
call fcn.00402390
push 0x64
push 0x320
push 0x1e5
push 0
call fcn.0040f4a0
add esp, 0x10
mov ecx, ebp
call fcn.00406ac0
cmp dword [0x431178], 3
jl 0x40ae7b
mov byte [ebp + 0x79d], 1
cmp dword [0x431178], 4
jl 0x40ae8b
mov byte [ebp + 0x79f], 1
cmp dword [0x431178], 5
jl 0x40ae9b
mov byte [ebp + 0x79c], 1
cmp dword [0x431178], 6
jl 0x40aeab
mov byte [ebp + 0x7a0], 0
cmp dword [0x431178], 7
jl 0x40aebb
mov byte [ebp + 0x79e], 1
cmp dword [0x431178], 8
jl 0x40b02a
mov byte [ebp + 0x7a1], 1
jmp 0x40b02a
mov dword [0x431280], 1
mov ecx, dword [ebp + 0xef8]
mov dword [0x4311b4], ecx
mov eax, dword [ebp + 0xfe8]
cmp eax, edi
jne 0x40af23
mov edx, dword [ebp + 0xfcc]
mov byte [esp + 0x3c], 1
inc edx
mov eax, edx
mov dword [ebp + 0xfcc], edx
cmp eax, 6
jle 0x40af17
mov dword [ebp + 0xfcc], 6
mov edx, dword [ebp + 0xfcc]
mov dword [esp + 0x38], edx
jmp 0x40af5c
mov edx, dword [ebp + 0xfcc]
mov dword [ebp + 0xfe8], edi
inc edx
mov byte [esp + 0x3c], 0
mov eax, edx
mov dword [ebp + 0xfcc], edx
cmp eax, 6
jle 0x40af4c
mov dword [ebp + 0xfcc], 6
mov eax, dword [ebp + 0xfcc]
mov dword [ebp + 0xfcc], edi
mov dword [esp + 0x38], eax
xor edi, edi
lea ebx, [ebp + 0xda8]
mov esi, 0x43117c
push edi
mov ecx, ebx
call fcn.004022f0
mov dword [esi], eax
add esi, 4
inc edi
cmp esi, 0x4311b4
jl 0x40af69
mov eax, dword [0x4311b0]
test eax, eax
jne 0x40af98
lea ecx, [ebp + 0xb84]
call fcn.004022d0
mov dword [0x4311b0], eax
mov ecx, dword [esp + 0x3c]
mov dl, byte [ebp + 0x10af]
push ecx
push edx
lea ecx, [ebp + 0xb84]
call fcn.004022d0
push eax
mov eax, dword [esp + 0x44]
dec eax
mov ecx, ebx
push eax
call fcn.004023e0
mov dword [0x431178], eax
mov ecx, dword [ebp + 0xfe4]
imul ecx, eax
mov edx, dword [ebp + 0xfe0]
mov eax, 0x4310cc
add ecx, edx
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
shl ecx, 2
mov dword [ebp + 0xfec], ecx
lea ecx, [ebp + 0xf04]
mov edx, dword [ecx]
add ecx, 4
mov dword [eax], edx
add eax, 4
cmp eax, 0x431178
jl 0x40afed
mov eax, dword [0x4311b0]
mov ecx, ebx
push eax
push 0xd
call fcn.00402390
push 0x3c
push 0x320
push 0x139
push 0
call fcn.0040f4a0
add esp, 0x10
mov ecx, ebp
call fcn.00406c20
mov eax, dword [ebp + 0xfc4]
inc eax
mov dword [ebp + 0xfc4], eax
mov dword [0x4310c8], 0
call fcn.0040f510
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x94
ret
cmp eax, 1
jne 0x40b0a0
mov eax, dword [0x4310c8]
inc eax
cmp eax, 0x14
mov dword [0x4310c8], eax
jl 0x40b127
push edi
push edi
push 0x64
mov edx, 0x32
lea ecx, [ebp + 0xa78]
call fcn.0040fdb0
mov eax, dword [ebp + 0xfc4]
inc eax
mov dword [ebp + 0xfc4], eax
mov dword [0x4310c8], edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x94
ret
cmp eax, 2
jne 0x40b134
mov eax, dword [0x4310c8]
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
mov ecx, dword [0x4311b4]
cmp eax, ecx
lea edx, [edx*4 + 0x6a]
jge 0x40b0c8
sub edx, 0xa
cmp eax, 0xd
jne 0x40b0d0
add edx, 0x20
mov eax, dword [eax*4 + 0x43117c]
push edi
push eax
push 0x1a
lea ecx, [ebp + 0x7c8]
call fcn.0040fdb0
mov ecx, dword [0x4310c8]
push 0x64
push str.bwav_mj0.wav
inc ecx
push edi
push 3
mov dword [0x4310c8], ecx
call fcn.0040f8d0
mov eax, dword [0x4310c8]
add esp, 0x10
cmp eax, 0xd
jle 0x40b127
mov dword [0x4310c8], edi
mov dword [0x4310c4], edi
mov dword [0x4310c0], edi
inc dword [ebp + 0xfc4]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x94
ret
cmp eax, 3
jne 0x40b6d4
mov eax, dword [0x4310c0]
inc eax
cmp eax, 0x1e
mov dword [0x4310c0], eax
jl 0x40b127
mov ebx, dword [0x4310c8]
mov dword [0x4310c0], edi
mov ecx, dword [ebx*4 + 0x4310cc]
lea eax, [ebx*4 + 0x4310cc]
cmp ecx, edi
jne 0x40b184
add eax, 4
inc ebx
cmp eax, 0x431174
jg 0x40b353
cmp dword [eax], edi
je 0x40b16b
mov dword [0x4310c8], ebx
mov ecx, dword [0x4310c4]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
push ebx
shr eax, 0x1f
add edx, eax
push 0
lea eax, [edx + edx*4]
lea edx, [eax + eax*4]
mov eax, ecx
mov ecx, 6
lea esi, [edx*8 + 0xc6]
cdq
idiv ecx
lea ecx, [ebp + 0xa9c]
lea edx, [edx + edx*8]
lea edi, [edx*4 + 0xd0]
mov edx, esi
push edi
call fcn.0040fdb0
cmp dword [0x4310c8], 0xb
jne 0x40b1fb
mov eax, dword [0x4310f8]
push 0
lea ecx, [ebp + 8]
lea edx, [esi + 0x28]
lea ebx, [eax + 1]
sar ebx, 1
push ebx
push edi
call fcn.0040fdb0
push 0
push ebx
push edi
lea edx, [esi + 0x56]
lea ecx, [ebp + 8]
call fcn.0040fdb0
mov ecx, dword [0x4310c8]
mov eax, 0x66666667
mov ecx, dword [ecx*4 + 0x4310cc]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
je 0x40b22a
push 0
push edx
push edi
lea edx, [esi + 0x78]
lea ecx, [ebp + 8]
call fcn.0040fdb0
mov ecx, dword [0x4310c8]
lea ebx, [ebp + 8]
push 0
mov eax, dword [ecx*4 + 0x4310cc]
mov ecx, 0xa
cdq
idiv ecx
mov ecx, ebx
push edx
push edi
lea edx, [esi + 0x90]
call fcn.0040fdb0
push 0
push 0xa
push edi
lea edx, [esi + 0xa8]
mov ecx, ebx
call fcn.0040fdb0
mov eax, dword [0x4310c4]
inc eax
cmp eax, 0xb
mov dword [0x4310c4], eax
jle 0x40b27f
mov dword [0x4310c4], 0xb
mov eax, dword [0x4310c8]
cmp eax, 0xb
je 0x40b35e
cmp eax, 0x18
je 0x40b3eb
cmp eax, 0x27
je 0x40b3e2
cmp eax, 0x28
je 0x40b3e2
cmp eax, 0x29
je 0x40b3e2
cmp eax, 0x2a
je 0x40b3e2
mov ecx, 0x14
mov esi, str.0001020304050607080910111213141516171819202122232425262728293031323334353637383940
lea edi, [esp + 0x40]
xor edx, edx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, dword [str.twavx_xx.wav]
push 0x64
movsb byte es:[edi], byte [esi]
mov dword [esp + 0x97], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [0x42f71c]
mov dword [esp + 0x9b], edx
mov dword [esp + 0x9f], edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0xa3], edx
xor ecx, ecx
mov byte [esp + 0xa7], dl
mov edx, dword [0x42f718]
mov dword [esp + 0x2c], edx
mov dl, byte [0x42f720]
mov dword [esp + 0x35], ecx
mov byte [esp + 0x34], dl
mov edx, dword [0x431280]
mov word [esp + 0x39], cx
mov byte [esp + 0x3b], cl
mov cl, byte [esp + edx*2 + 0x45]
mov dl, byte [esp + eax*2 + 0x44]
mov al, byte [esp + eax*2 + 0x45]
mov byte [esp + 0x2c], cl
lea ecx, [esp + 0x28]
mov byte [esp + 0x2e], dl
mov byte [esp + 0x2f], al
push ecx
jmp 0x40b6af
mov dword [0x4310c8], ebx
jmp 0x40b121
mov cx, word [0x42f710]
mov edx, dword [str.012345678]
mov eax, dword [0x42f70c]
mov word [esp + 0x2c], cx
mov ecx, dword [0x42f700]
mov dword [esp + 0x24], edx
mov edx, dword [str.twavx_11_x.wav]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x28], eax
mov eax, dword [0x42f6fc]
mov dword [esp + 0x10], edx
mov dx, word [0x42f704]
mov dword [esp + 0x1f], ecx
mov byte [esp + 0x23], cl
mov ecx, dword [0x4310f8]
mov dword [esp + 0x14], eax
mov al, byte [0x42f706]
mov word [esp + 0x1c], dx
mov edx, dword [0x431280]
sar ecx, 1
mov byte [esp + 0x1e], al
mov al, byte [esp + edx + 0x24]
mov dl, byte [esp + ecx + 0x24]
mov byte [esp + 0x14], al
mov byte [esp + 0x19], dl
push 0x64
lea eax, [esp + 0x14]
jmp 0x40b6ae
cmp eax, 0x18
jne 0x40b470
mov ax, word [0x42f710]
mov ecx, dword [str.012345678]
mov edx, dword [0x42f70c]
mov word [esp + 0x2c], ax
mov eax, dword [0x42f6f0]
mov dword [esp + 0x24], ecx
mov ecx, dword [str.twavx_24_x.wav]
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], edx
mov edx, dword [0x42f6ec]
mov dword [esp + 0x10], ecx
mov cx, word [0x42f6f4]
xor eax, eax
mov dword [esp + 0x14], edx
mov dl, byte [0x42f6f6]
mov dword [esp + 0x1f], eax
mov word [esp + 0x1c], cx
mov ecx, dword [0x431280]
mov byte [esp + 0x23], al
mov eax, dword [0x43112c]
mov byte [esp + 0x1e], dl
mov dl, byte [esp + ecx + 0x24]
sar eax, 1
mov byte [esp + 0x14], dl
lea edx, [esp + 0x10]
mov cl, byte [esp + eax + 0x24]
push 0x64
mov byte [esp + 0x1d], cl
push edx
jmp 0x40b6af
cmp eax, 0x27
jne 0x40b4fb
mov eax, dword [str.012345678]
mov dx, word [0x42f710]
mov ecx, dword [0x42f70c]
mov dword [esp + 0x24], eax
mov eax, dword [str.twavx_39_x.wav]
mov word [esp + 0x2c], dx
mov edx, dword [0x42f6e0]
mov dword [esp + 0x28], ecx
mov ecx, dword [0x42f6dc]
mov dword [esp + 0x10], eax
mov ax, word [0x42f6e4]
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x14], ecx
mov cl, byte [0x42f6e6]
mov word [esp + 0x1c], ax
mov eax, dword [0x431280]
mov dword [esp + 0x1f], edx
mov byte [esp + 0x1e], cl
mov byte [esp + 0x23], dl
mov cl, byte [esp + eax + 0x24]
mov edx, dword [0x431168]
mov byte [esp + 0x14], cl
lea ecx, [esp + 0x10]
mov al, byte [esp + edx + 0x23]
push 0x64
mov byte [esp + 0x1d], al
push ecx
jmp 0x40b6af
cmp eax, 0x28
jne 0x40b588
mov cx, word [0x42f710]
mov edx, dword [str.012345678]
mov eax, dword [0x42f70c]
mov word [esp + 0x2c], cx
mov ecx, dword [0x42f6d0]
mov dword [esp + 0x24], edx
mov edx, dword [str.twavx_40_x.wav]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x28], eax
mov eax, dword [0x42f6cc]
mov dword [esp + 0x10], edx
mov dx, word [0x42f6d4]
mov dword [esp + 0x1f], ecx
mov byte [esp + 0x23], cl
mov ecx, dword [0x43116c]
mov dword [esp + 0x14], eax
mov al, byte [0x42f6d6]
mov word [esp + 0x1c], dx
mov edx, dword [0x431280]
sar ecx, 1
mov byte [esp + 0x1e], al
mov al, byte [esp + edx + 0x24]
mov dl, byte [esp + ecx + 0x23]
mov byte [esp + 0x14], al
mov byte [esp + 0x19], dl
push 0x64
lea eax, [esp + 0x14]
jmp 0x40b6ae
cmp eax, 0x29
jne 0x40b614
mov ecx, dword [str.012345678]
mov ax, word [0x42f710]
mov edx, dword [0x42f70c]
mov dword [esp + 0x24], ecx
mov ecx, dword [str.twavx_41_x.wav]
mov word [esp + 0x2c], ax
mov eax, dword [0x42f6c0]
mov dword [esp + 0x28], edx
mov edx, dword [0x42f6bc]
mov dword [esp + 0x10], ecx
mov cx, word [0x42f6c4]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], edx
mov dl, byte [0x42f6c6]
mov word [esp + 0x1c], cx
mov ecx, dword [0x431280]
mov dword [esp + 0x1f], eax
mov byte [esp + 0x1e], dl
mov byte [esp + 0x23], al
mov dl, byte [esp + ecx + 0x24]
mov eax, dword [0x431170]
mov byte [esp + 0x14], dl
lea edx, [esp + 0x10]
mov cl, byte [esp + eax + 0x23]
push 0x64
mov byte [esp + 0x1d], cl
push edx
jmp 0x40b6af
cmp eax, 0x2a
jne 0x40b6c0
mov ecx, dword [0x42f6ac]
mov eax, dword [str.0012345060708]
mov edx, dword [0x42f6b0]
mov dword [esp + 0x28], ecx
xor ecx, ecx
mov dword [esp + 0x24], eax
mov ax, word [0x42f6b4]
mov dword [esp + 0x32], ecx
mov word [esp + 0x36], cx
mov ecx, dword [0x42f6a0]
mov dword [esp + 0x2c], edx
mov edx, dword [str.twavx_42_x.wav]
mov dword [esp + 0x18], ecx
mov word [esp + 0x30], ax
mov eax, dword [0x42f69c]
mov dword [esp + 0x10], edx
mov dx, word [0x42f6a4]
xor ecx, ecx
mov dword [esp + 0x1f], ecx
mov dword [esp + 0x14], eax
mov al, byte [0x42f6a6]
mov word [esp + 0x1c], dx
mov edx, dword [0x431280]
mov byte [esp + 0x23], cl
mov ecx, dword [0x431174]
mov byte [esp + 0x1e], al
mov al, byte [esp + edx + 0x24]
push 0x64
mov dl, byte [esp + ecx + 0x28]
mov byte [esp + 0x18], al
mov byte [esp + 0x1d], dl
lea eax, [esp + 0x14]
push eax
push 0
push 0
call fcn.0040f8d0
mov eax, dword [0x4310c8]
add esp, 0x10
inc eax
cmp eax, 0x2a
mov dword [0x4310c8], eax
jle 0x40b127
jmp 0x40b121
cmp eax, 4
jne 0x40b7a9
mov eax, 0x51eb851f
imul dword [0x431178]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
je 0x40b708
push edi
push edx
push 0x1ee
mov edx, 0x190
lea ecx, [ebp + 8]
call fcn.0040fdb0
mov eax, dword [0x431178]
mov ecx, 0x64
cdq
idiv ecx
mov eax, 0x66666667
lea esi, [ebp + 8]
push edi
mov ecx, esi
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
push edx
push 0x1ee
mov edx, 0x1a4
call fcn.0040fdb0
mov eax, dword [0x431178]
mov ecx, 0xa
cdq
idiv ecx
push edi
mov ecx, esi
push edx
push 0x1ee
mov edx, 0x1b8
call fcn.0040fdb0
mov al, byte [ebp + 0x10a5]
push edi
test al, al
je 0x40b76b
push 0xb
jmp 0x40b76d
push 0xc
push 0x20c
mov edx, 0x15e
mov ecx, esi
call fcn.0040fdb0
mov edx, dword [ebp + 0xfec]
lea edi, [ebp + 0x100]
push edx
push 0x20c
push 0x1d6
push esi
mov ecx, edi
call fcn.00412ff0
mov ecx, edi
call fcn.004131b0
jmp 0x40b121
cmp eax, 5
jne 0x40b127
lea esi, [ebp + 0xb5c]
mov ecx, esi
call fcn.00412250
mov ecx, esi
call fcn.00412140
test al, al
je 0x40b127
mov al, byte [ebp + 0x10a5]
test al, al
je 0x40b817
mov eax, dword [ebp + 0xfd8]
mov ecx, dword [ebp + 0xfec]
cmp ecx, eax
jle 0x40b7ee
mov dword [ebp + 0xfec], eax
mov ecx, dword [ebp + 0xfec]
mov esi, dword [ebp + 0xfdc]
add esi, ecx
sub eax, ecx
mov dword [ebp + 0xfdc], esi
pop edi
mov dword [ebp + 0xfd8], eax
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x94
ret
mov eax, dword [ebp + 0xfdc]
mov ecx, dword [ebp + 0xfec]
cmp ecx, eax
jle 0x40b82d
mov dword [ebp + 0xfec], eax
mov ecx, dword [ebp + 0xfec]
mov esi, dword [ebp + 0xfd8]
add esi, ecx
sub eax, ecx
mov dword [ebp + 0xfd8], esi
pop edi
mov dword [ebp + 0xfdc], eax
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x94
ret