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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esi + 0x2c]
call fcn.00413850
lea ecx, [esi + 0xd8]
call fcn.004131b0
lea ecx, [esi + 0xb0]
call fcn.004131b0
lea ecx, [esi + 0x128]
call fcn.004145d0
lea ecx, [esi + 0x78]
call fcn.00412c50
mov ecx, esi
call fcn.00406c20
lea ecx, [esi + 0x168]
call fcn.004113e0
mov ecx, esi
call fcn.00406ac0
lea ecx, [esi + 0x684]
call fcn.00412f00
lea ecx, [esi + 0x7a8]
call fcn.00412ad0
mov eax, dword [esi + 0xfc8]
xor ebp, ebp
cmp eax, ebp
jne 0x40a6f8
lea ecx, [esi + 0x6ac]
call fcn.00411f90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov ebx, 1
cmp eax, ebx
jne 0x40a714
lea ecx, [esi + 0x6d4]
call fcn.00411f90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
cmp eax, 2
jne 0x40a72c
lea ecx, [esi + 0x6fc]
call fcn.00411f90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
cmp eax, 3
jne 0x40a765
lea ecx, [esi + 0x724]
call fcn.00411f90
test al, al
jne 0x40a755
lea ecx, [esi + 0x998]
call fcn.00412250
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
mov dword [esi + 0x7a4], ebp
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x2c
ret
cmp eax, 4
jne 0x40a9f5
lea ecx, [esi + 0x74c]
call fcn.00411f90
test al, al
jne 0x40ab35
cmp dword [esi + 0x958], 0xffffffff
je 0x40ab4b
mov ecx, 0xfffffffd
mov edx, 0xfffffff9
mov dword [esp + 0x1c], ecx
mov eax, 5
mov dword [esp + 0x34], ecx
lea ecx, [esi + 0x970]
mov dword [esp + 0x14], 0xfffffff5
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 9
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], edx
call fcn.00412250
cmp dword [esi + 0x7a4], 0xa
je 0x40a8ee
mov edi, 0x6a
lea ebx, [esi + 0x930]
mov al, byte [esi + ebp + 0x95c]
test al, al
mov eax, dword [esi + 0x958]
je 0x40a84a
cmp ebp, eax
push 0
jne 0x40a82a
mov eax, dword [ebx]
mov edx, edi
push eax
push 0xff
push 0
push 0xff
push 0xd2
lea ecx, [esi + 0x7c8]
call fcn.00410190
jmp 0x40a881
mov ecx, dword [ebx]
mov edx, edi
push ecx
push 0
push 0
push 0xff
push 0xd2
lea ecx, [esi + 0x7c8]
call fcn.00410190
jmp 0x40a881
cmp ebp, eax
push 0
push 0
jne 0x40a86f
push 0xff
push 0
push 0
push 0xd2
mov edx, edi
lea ecx, [esi + 0x858]
call fcn.00410190
jmp 0x40a881
push 0xd2
mov edx, edi
lea ecx, [esi + 0x858]
call fcn.0040fdb0
add edi, 0x3c
inc ebp
add ebx, 4
cmp edi, 0x2c2
jl 0x40a7f0
mov eax, dword [0x43127c]
inc eax
cmp eax, 0xa
mov dword [0x43127c], eax
jle 0x40ab56
xor edi, edi
push 0x64
mov dword [0x43127c], edi
mov ecx, dword [esi + 0x958]
push str.bwav_mj2.wav
inc ecx
push edi
push 3
mov dword [esi + 0x958], ecx
call fcn.0040f8d0
mov eax, dword [esi + 0x958]
add esp, 0x10
cmp eax, 9
jle 0x40ab56
mov dword [esi + 0x958], edi
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
mov dword [esp + 0x10], ebp
mov ebp, 0x6a
lea edi, [esi + 0x930]
mov edx, dword [0x43127c]
mov eax, dword [esp + 0x10]
add eax, edx
mov ecx, 0xa
cdq
idiv ecx
lea ecx, [esi + 0xb84]
mov ebx, edx
mov edx, dword [edi]
push edx
call fcn.00401390
test al, al
je 0x40a96c
mov eax, dword [esp + 0x10]
push 0
mov cl, byte [eax + esi + 0x95c]
test cl, cl
je 0x40a95c
mov ecx, dword [edi]
mov edx, dword [esp + ebx*4 + 0x18]
push ecx
push 0
push 0
add edx, 0xd2
push 0xff
push edx
mov edx, ebp
lea ecx, [esi + 0x7c8]
call fcn.00410190
jmp 0x40a9b2
mov ecx, dword [esp + ebx*4 + 0x18]
mov eax, dword [edi]
add ecx, 0xd2
push eax
push ecx
jmp 0x40a9a5
mov edx, dword [esp + 0x10]
push 0
mov al, byte [edx + esi + 0x95c]
test al, al
je 0x40a99d
mov eax, dword [edi]
mov edx, ebp
push eax
push 0
push 0
push 0xff
push 0xd2
lea ecx, [esi + 0x7c8]
call fcn.00410190
jmp 0x40a9b2
mov ecx, dword [edi]
push ecx
push 0xd2
mov edx, ebp
lea ecx, [esi + 0x7c8]
call fcn.0040fdb0
mov ebx, dword [esp + 0x10]
add ebp, 0x3c
inc ebx
add edi, 4
cmp ebp, 0x2c2
mov dword [esp + 0x10], ebx
jl 0x40a8fd
mov eax, dword [0x43127c]
inc eax
cmp eax, 0xa
mov dword [0x43127c], eax
jle 0x40ab56
pop edi
pop esi
pop ebp
mov dword [0x43127c], 0
xor al, al
pop ebx
add esp, 0x2c
ret
cmp eax, 5
jne 0x40ab56
lea ecx, [esi + 0x774]
call fcn.00411f90
test al, al
jne 0x40ab2f
cmp dword [esi + 0x7a4], 0xa
je 0x40ab4b
lea edi, [esi + 0x9e8]
push ebp
push ebp
push 0x96
mov edx, 0xfa
mov ecx, edi
call fcn.0040fdb0
mov eax, dword [0x43127c]
cmp eax, ebp
jle 0x40aa98
cmp eax, 0xa
jge 0x40aa98
mov ecx, dword [esi + 0x7a4]
push ebp
cmp ecx, ebp
jne 0x40aa71
mov edx, dword [esi + 0x958]
lea ecx, [esi + 0xa0c]
push edx
push 0x116
mov edx, 0x1b2
call fcn.0040fdb0
push ebp
push 2
jmp 0x40aa9a
mov eax, dword [esi + 0x958]
mov edx, 0x1b2
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*2]
push ecx
push 0x116
lea ecx, [esi + 0x7c8]
call fcn.0040fdb0
push ebp
push 2
jmp 0x40aa9a
push ebp
push ebx
push 0x96
mov edx, 0xfa
mov ecx, edi
call fcn.0040fdb0
mov eax, dword [0x43127c]
inc eax
cmp eax, 0x14
mov dword [0x43127c], eax
jle 0x40ab56
mov dword [0x43127c], ebp
mov eax, dword [esi + 0x7a4]
cmp eax, ebp
jne 0x40aaf3
mov ecx, dword [esi + 0x958]
inc ecx
mov eax, ecx
mov dword [esi + 0x958], ecx
cmp eax, 3
jle 0x40ab56
mov dword [esi + 0x958], ebp
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
mov ecx, dword [esi + 0x958]
inc eax
cmp ecx, 3
mov dword [esi + 0x7a4], eax
jge 0x40ab1a
cmp eax, 9
jle 0x40ab56
mov dword [esi + 0x7a4], ebx
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
cmp eax, 7
jle 0x40ab56
mov dword [esi + 0x7a4], ebx
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
mov dword [esi + 0x958], ebp
mov dword [esi + 0x7a4], ebp
pop edi
mov dword [0x43127c], ebp
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x2c
ret
lea ecx, [esi + 0x9c0]
call fcn.00412250
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret