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

Disassembly:
push 0xffffffffffffffff
push 0x8823c3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push ebp
push esi
push edi
mov edi, ecx
inc dword [edi + 0x14]
call fcn.0045ce40
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x2c]
mov eax, dword [eax + 0x7c]
cmp eax, 6
mov dword [esp + 0x28], eax
sete byte [esp + 0x13]
mov dword [esp + 0x24], DirectSoundCreate
call fcn.0064c9b0
test eax, eax
je 0x78809d
push 0xd
push 0x20
call fcn.00660100
add esp, 8
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0xc]
test eax, eax
mov dword [esp + 0x14], 0
jne 0x7883c2
mov ecx, dword [edi + 0x44]
lea eax, [edi + 0x44]
cmp ecx, eax
je 0x78839e
call fcn.0064c9b0
test eax, eax
je 0x7880d1
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esp + 0x24]
jmp 0x7880e7
mov edx, dword [esp + 0x20]
push edx
call fcn.00462430
fcomp dword [esp + 0x70]
add esp, 4
fnstsw ax
test ah, 0x41
je 0x78839e
mov edx, dword [edi + 0x18]
mov esi, dword [esp + 0x14]
mov ebx, dword [edi + 0x48]
inc esi
inc edx
mov dword [edi + 0x18], edx
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
movsx eax, word [ebx + 0xa]
cmp dword [edi + 0x34], eax
mov ecx, dword [0x9b38bc]
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], ebx
jne 0x788139
mov eax, dword [edi + 0x30]
test eax, eax
je 0x788374
movsx edx, word [ebx + 0xc]
shl edx, 5
add edx, ecx
cmp eax, edx
je 0x788374
movsx esi, word [ebx + 0xc]
mov eax, dword [0x9b38ec]
shl esi, 5
movzx ebp, byte [esi + ecx + 0x10]
add esi, ecx
push eax
mov dword [esp + 0x30], esi
call fcn.0045f150
lea ecx, [ebp - 1]
add esp, 4
cmp eax, ecx
jl 0x788380
test ebp, ebp
jle 0x788357
add esi, 0x12
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], ebp
movzx esi, word [esi]
movsx eax, word [ebx + 0xa]
cmp esi, eax
mov dword [esp + 0x30], esi
je 0x78833d
mov ecx, dword [0x9b38c0]
imul eax, eax, 0x16
imul esi, esi, 0x16
add eax, ecx
lea ebp, [ecx + esi]
test byte [eax + 0xa], 1
je 0x7881b3
test byte [ebp + 0xa], 1
je 0x7881b3
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x78833d
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
movsx ecx, word [eax + 0xc]
push edx
movzx edx, word [ebp]
cmp ecx, edx
sete al
mov ecx, edi
push eax
push ebp
call fcn.00773b60
test al, al
je 0x78833d
movzx ecx, word [ebp + 4]
movzx edx, word [ebx + 0xe]
mov dword [esp + 0x18], ecx
mov ecx, dword [0x9b38c0]
movzx eax, word [ecx + esi]
fild dword [esp + 0x18]
movzx ecx, word [ecx + esi + 2]
mov dword [esp + 0x18], edx
mov edx, dword [0x9b38bc]
shl ecx, 5
fmul dword [0x9b3a14]
add ecx, edx
fild dword [esp + 0x18]
shl eax, 5
mov dword [esp + 0x4c], ecx
fmul dword [0x905ce4]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x4c]
add eax, edx
cmp ecx, eax
faddp st(1)
fstp dword [esp + 0x18]
je 0x788235
mov ebx, eax
mov esi, dword [esp + 0x30]
push esi
push ebx
mov ecx, edi
call fcn.0076d280
mov ebp, eax
test ebp, ebp
je 0x788269
movzx edx, word [ebp + 0xe]
mov dword [esp + 0x40], edx
fild dword [esp + 0x40]
fmul dword [0x905ce4]
fcomp dword [esp + 0x18]
fnstsw ax
test ah, 0x41
jnp 0x788339
push esi
push ebx
mov ecx, edi
call fcn.0076d2d0
mov esi, eax
test esi, esi
je 0x788299
movzx eax, word [esi + 0xe]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fmul dword [0x905ce4]
fcomp dword [esp + 0x18]
fnstsw ax
test ah, 0x41
jnp 0x788339
test ebp, ebp
je 0x7882b8
mov ecx, dword [ebp + 4]
mov eax, dword [ebp]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov ecx, dword [0x9b38ec]
push ebp
push ecx
call fcn.00463ca0
add esp, 8
test esi, esi
je 0x7882d6
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov edx, dword [0x9b38ec]
push esi
push edx
call fcn.00463ca0
add esp, 8
lea eax, [edi + 0x38]
push eax
push ebx
call fcn.004100a0
fstp dword [esp + 0x48]
mov ecx, dword [0x9b38ec]
push ecx
call fcn.00463c70
add esp, 0xc
mov dword [esp + 0x44], eax
test eax, eax
mov dword [esp + 0x64], 0
je 0x788321
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ebx
push ecx
mov ecx, eax
call fcn.0076d1e0
jmp 0x788323
xor eax, eax
push eax
push 0x764f80
lea ecx, [edi + 0x44]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00772350
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
add esi, 2
dec eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], eax
jne 0x788177
mov ecx, dword [edi + 0x4c]
lea eax, [edi + 0x4c]
mov dword [eax], ebx
mov dword [ecx + 4], ebx
mov dword [ebx + 4], eax
mov dword [ebx], ecx
mov eax, dword [edi + 0xc]
test eax, eax
je 0x7880b0
jmp 0x78839e
mov dword [edi + 0xc], 1
mov dword [edi + 0x10], ebx
jmp 0x78839e
mov al, byte [esp + 0x13]
xor edx, edx
test al, al
setne dl
xor ecx, ecx
add edx, 2
test al, al
setne cl
mov dword [edi + 0xc], edx
dec ecx
and ecx, ebx
mov dword [edi + 0x10], ecx
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x7883c2
mov ecx, dword [edi + 0x44]
lea eax, [edi + 0x44]
cmp ecx, eax
jne 0x7883bd
mov dword [edi + 0xc], 3
mov dword [edi + 0x10], 0
mov eax, dword [edi + 0xc]
test eax, eax
jle 0x788662
mov eax, dword [edi + 0x10]
xor ebp, ebp
test eax, eax
je 0x7883ee
mov ax, word [eax + 8]
inc ebp
test ax, ax
jl 0x7883ee
mov ecx, dword [0x9b38ec]
movsx edx, ax
push edx
call fcn.0045f210
test eax, eax
jne 0x7883d1
mov esi, dword [edi + 0x10]
test esi, esi
je 0x788420
cmp ebp, 0x1fe
jle 0x788420
mov si, word [esi + 8]
dec ebp
test si, si
jl 0x78841e
mov ecx, dword [0x9b38ec]
movsx eax, si
push eax
call fcn.0045f210
mov esi, eax
test esi, esi
jne 0x7883f5
jmp 0x788420
xor esi, esi
test ebp, ebp
mov dl, byte [esp + 0x13]
mov byte [esp + 0x6c], dl
jle 0x788495
mov eax, dword [edi + 0x2c]
mov dword [eax + 0x78], 3
mov ecx, dword [edi + 0x2c]
movsx eax, word [ecx + 0x8e]
cmp eax, dword [edi + 0x34]
mov byte [esp + 0x6c], 0
jne 0x788495
fld dword [edi + 0x38]
fsub dword [ecx + 0x98]
fld dword [edi + 0x3c]
fsub dword [ecx + 0x9c]
fld dword [edi + 0x40]
fsub dword [ecx + 0xa0]
fmul dword [ecx + 0xc4]
fxch st(1)
fmul dword [ecx + 0xc0]
faddp st(1)
fxch st(1)
fmul dword [ecx + 0xbc]
faddp st(1)
fcomp dword [0x890968]
fnstsw ax
test ah, 5
jp 0x788495
mov byte [esp + 0x6c], dl
call fcn.0077bac0
test esi, esi
mov eax, dword [edi + 0x2c]
mov dword [eax + 0x2e0], ebp
mov ecx, dword [edi + 0x2c]
mov ebx, dword [ecx + 0x2e4]
je 0x78852c
nop
test ebp, ebp
jle 0x78852c
movsx eax, word [esi + 0xa]
dec ebp
mov word [ebx + ebp*2], ax
mov ecx, dword [edi + 0x2c]
movsx edx, word [ecx + 0x8e]
cmp eax, edx
jne 0x78850e
mov edx, dword [0x9b38c0]
imul eax, eax, 0x16
add eax, edx
movsx edx, byte [ecx + 0x8c]
movzx eax, word [eax + edx*2]
mov edx, dword [0x9b38bc]
shl eax, 5
add eax, edx
movsx edx, word [esi + 0xc]
shl edx, 5
add edx, dword [0x9b38bc]
cmp edx, eax
je 0x78850e
mov al, byte [esp + 0x13]
mov byte [esp + 0x6c], al
call fcn.0077bac0
mov si, word [esi + 8]
test si, si
jl 0x78852c
movsx ecx, si
push ecx
mov ecx, dword [0x9b38ec]
call fcn.0045f210
mov esi, eax
test esi, esi
jne 0x7884b0
mov eax, dword [edi + 0x2c]
cmp dword [eax + 0x7c], 3
mov ebp, dword [eax + 0x2e0]
jne 0x78854b
cmp dword [edi + 0xc], 1
je 0x78854b
mov dword [eax + 0x2e0], 0
mov al, byte [esp + 0x13]
test al, al
je 0x7885fd
lea ecx, [esp + 0x50]
call fcn.00771f50
mov dword [esp + 0x54], eax
mov byte [eax + 0xf], 1
mov eax, dword [esp + 0x54]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x54]
mov dword [eax], eax
mov eax, dword [esp + 0x54]
mov dword [eax + 8], eax
mov dword [esp + 0x58], 0
xor esi, esi
test ebp, ebp
mov dword [esp + 0x64], 1
jle 0x7885bd
mov edx, dword [edi + 0x2c]
mov eax, dword [edx + 0x2e4]
xor ecx, ecx
mov cx, word [eax + esi*2]
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x58]
call fcn.007801b0
inc esi
cmp esi, ebp
jl 0x788592
cmp dword [esp + 0x58], ebp
jae 0x7885c8
mov byte [esp + 0x6c], 1
mov eax, dword [esp + 0x54]
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x70], 0xffffffff
call fcn.00781220
mov eax, dword [esp + 0x54]
test eax, eax
je 0x7885fd
push 0
push 0x10
push eax
mov ecx, 0x925b30
call fcn.005d0370
mov al, byte [esp + 0x6c]
test al, al
je 0x78864a
fld dword [edi + 0x38]
mov edx, dword [edi + 0x40]
mov eax, dword [edi + 0x2c]
fchs
fstp dword [esp + 0x4c]
mov dword [esp + 0x48], edx
fld dword [eax + 0x98]
mov ecx, dword [eax + 0xa0]
fchs
mov dword [esp + 0x38], ecx
fstp dword [esp + 0x3c]
mov dword [eax + 0x78], 2
mov edx, dword [edi + 0x2c]
xor eax, eax
mov dword [edx + 0x2e0], eax
mov dword [edi + 0xc], 3
mov dword [edi + 0x10], eax
mov al, byte [0x9b38e8]
test al, al
je 0x788662
mov eax, dword [esp + 0x20]
push eax
call fcn.00462430
fstp st(0)
add esp, 4
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00462430
fstp dword [esp + 0x70]
add esp, 4
call fcn.0064c9a0
test eax, eax
je 0x78868d
mov edx, dword [esp + 0x14]
push 0xd
push 0x20
push edx
call fcn.00660200
add esp, 0xc
call fcn.0064c9a0
test eax, eax
je 0x7886af
mov eax, dword [esp + 0x6c]
push 0xd
mov ecx, eax
push 0x20
push ecx
mov dword [esp + 0x4c], eax
call fcn.00660200
add esp, 0xc
jmp 0x7886c8
call fcn.0064c9b0
test eax, eax
je 0x7886c8
push 0xd
push 0x20
call fcn.00660100
add esp, 8
mov dword [esp + 0x6c], eax
fld dword [esp + 0x6c]
mov ecx, dword [esp + 0x5c]
fadd dword [edi + 0x1c]
fstp dword [edi + 0x1c]
pop edi
fld dword [esp + 0x68]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x58
ret 4