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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x422040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x6c], eax
test edi, edi
je 0x40cfd0
cmp word [edi], 1
je 0x40cfb1
pop edi
mov eax, 0x80070032
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
movzx eax, word [edi + 2]
test ax, ax
je 0x40cf9a
cmp eax, 0x40
ja 0x40cf9a
mov eax, dword [edi + 4]
cmp eax, 0x3e8
jb 0x40cf9a
cmp eax, 0x30d40
ja 0x40cf9a
mov dword [esi + 0x14], 0
xorps xmm0, xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0xc], 0
movups xmmword [esi + 0x28], xmm0
mov dword [esi + 0x38], 0
mov word [esi + 0x3c], 0
mov ecx, dword [esi]
test ecx, ecx
je 0x40d00b
mov dword [esi], 0
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
push 1
push 0
push esi
call dword [sym.imp.XAudio2_9.dll_Ordinal_1]
test eax, eax
js 0x40d3f1
test dword [esi + 0x40], 0x10000
je 0x40d04f
mov eax, dword [esi]
lea edx, [ebp - 0x1c]
xorps xmm0, xmm0
movups xmmword [ebp - 0x1c], xmm0
push 0
movq qword [ebp - 0xc], xmm0
mov dword [ebp - 0x1c], 3
mov dword [ebp - 0x18], 1
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x30]
mov ecx, dword [esi]
lea eax, [esi + 0x94]
push ebx
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ebx, eax
test ebx, ebx
js 0x40d094
test edi, edi
je 0x40d072
mov edx, dword [edi + 4]
movzx ebx, word [edi + 2]
jmp 0x40d076
xor edx, edx
xor ebx, ebx
push dword [esi + 0x44]
mov ecx, dword [esi]
lea edi, [esi + 4]
push 0
push dword [ebp - 0x6c]
mov eax, dword [ecx]
push 0
push edx
push ebx
push edi
push ecx
call dword [eax + 0x1c]
mov ebx, eax
test ebx, ebx
jns 0x40d0bb
mov edx, dword [esi]
test edx, edx
je 0x40d0a6
mov dword [esi], 0
mov ecx, dword [edx]
push edx
call dword [ecx + 8]
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
lea edx, [ebp - 0x78]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x4c]
mov ebx, eax
test ebx, ebx
jns 0x40d0fb
mov ecx, dword [edi]
test ecx, ecx
je 0x40d0df
mov edx, dword [ecx]
push ecx
call dword [edx + 0x48]
mov dword [edi], 0
mov ecx, esi
call fcn.0040cf50
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
lea edx, [ebp - 0x2c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx]
movss xmm0, dword [esi + 0x24]
ucomiss xmm0, dword [0x41dfc4]
mov eax, dword [ebp - 0x78]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x14], eax
lahf
test ah, 0x44
jnp 0x40d16e
mov eax, dword [edi]
push 0
mov ecx, dword [eax]
push ecx
movss dword [esp], xmm0
push eax
call dword [ecx + 0x30]
mov ebx, eax
test ebx, ebx
jns 0x40d16e
mov edx, dword [edi]
test edx, edx
je 0x40d152
mov ecx, dword [edx]
push edx
call dword [ecx + 0x48]
mov dword [edi], 0
mov ecx, esi
call fcn.0040cf50
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
test byte [esi + 0x40], 4
je 0x40d241
xorps xmm0, xmm0
lea eax, [ebp - 0x80]
push 8
movq qword [ebp - 0x80], xmm0
lea ecx, [esi + 0x4c]
push eax
mov dword [ebp - 0x80], 6
mov dword [ebp - 0x7c], 0x3e8
call fcn.0040cf30
push eax
push 0x417ae8
call sub.XAudio2_9.dll_Ordinal_4
add esp, 0x10
mov dword [ebp - 0x6c], eax
test eax, eax
jns 0x40d1e4
mov edx, dword [edi]
test edx, edx
je 0x40d339
mov ecx, dword [edx]
push edx
call dword [ecx + 0x48]
mov ecx, esi
mov dword [edi], 0
call fcn.0040cf50
mov eax, dword [ebp - 0x6c]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x10]
lea edx, [ebp - 0x74]
mov dword [ebp - 8], 0
xorps xmm0, xmm0
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x4c]
movq qword [ebp - 0x10], xmm0
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x70], eax
mov eax, dword [edi]
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x74], 1
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x6c], eax
test eax, eax
jns 0x40d241
mov eax, dword [edi]
test eax, eax
je 0x40d331
mov edx, dword [eax]
push eax
call dword [edx + 0x48]
mov dword [edi], 0
jmp 0x40d331
test byte [esi + 0x40], 1
je 0x40d356
lea ecx, [esi + 0x48]
call fcn.0040cf30
push eax
call dword [sym.imp.XAudio2_9.dll_Ordinal_2]
mov dword [ebp - 0x6c], eax
test eax, eax
jns 0x40d27c
mov edx, dword [edi]
test edx, edx
je 0x40d331
mov ecx, dword [edx]
push edx
call dword [ecx + 0x48]
mov dword [edi], 0
jmp 0x40d331
mov eax, dword [esi + 0x48]
lea ebx, [esi + 8]
mov edx, dword [esi]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x74]
push eax
mov eax, dword [esi + 0x40]
push 0
push 0
and eax, 2
mov dword [ebp - 0xc], 1
shl eax, 2
push eax
push dword [esi + 0x14]
mov dword [ebp - 8], 1
push 1
mov dword [ebp - 0x74], 1
mov byte [esi + 0x3d], 1
mov ecx, dword [edx]
push ebx
push edx
call dword [ecx + 0x18]
mov dword [ebp - 0x6c], eax
test eax, eax
jns 0x40d2d9
mov eax, dword [edi]
test eax, eax
je 0x40d329
mov edx, dword [eax]
push eax
call dword [edx + 0x48]
jmp 0x40d323
push 1
lea eax, [ebp - 0x68]
push eax
push 0x417404
call fcn.0040d410
mov eax, dword [ebx]
lea edx, [ebp - 0x68]
add esp, 0xc
mov ecx, dword [eax]
push 0
push 0x39
push edx
push 0
push eax
call dword [ecx + 0x18]
mov dword [ebp - 0x6c], eax
test eax, eax
jns 0x40d356
mov edx, dword [ebx]
test edx, edx
je 0x40d317
mov ecx, dword [edx]
push edx
call dword [ecx + 0x48]
mov dword [ebx], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x40d329
mov eax, dword [ecx]
push ecx
call dword [eax + 0x48]
mov dword [edi], 0
lea ecx, [esi + 0x48]
call fcn.0040cf50
lea ecx, [esi + 0x4c]
call fcn.0040cf50
mov ecx, esi
call fcn.0040cf50
mov eax, dword [ebp - 0x6c]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
lea eax, [esi + 0x28]
push eax
push ecx
mov dword [esp], 0x43abc000
push dword [esi + 0xc]
call dword [sym.imp.XAudio2_9.dll_Ordinal_6]
mov ebx, eax
add esp, 0xc
test ebx, ebx
jns 0x40d3c6
mov edx, dword [esi + 8]
test edx, edx
je 0x40d388
mov ecx, dword [edx]
push edx
call dword [ecx + 0x48]
mov dword [esi + 8], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x40d39a
mov eax, dword [ecx]
push ecx
call dword [eax + 0x48]
mov dword [edi], 0
lea ecx, [esi + 0x48]
call fcn.0040cf50
lea ecx, [esi + 0x4c]
call fcn.0040cf50
mov ecx, esi
call fcn.0040cf50
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x78]
mov ecx, dword [eax]
mov dword [ebp - 0x6c], ecx
cmp ecx, eax
je 0x40d3ee
mov eax, dword [ecx + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
add esp, 4
lea ecx, [ebp - 0x6c]
call fcn.0040c800
mov ecx, dword [ebp - 0x6c]
cmp ecx, dword [esi + 0x78]
jne 0x40d3d2
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040ac8b
mov esp, ebp
pop ebp
ret 8