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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffe0
push edi
push esi
push ebx
sub esp, 0x274
mov edi, eax
mov edx, dword [0x7d4778]
test edx, edx
je 0x40fe54
test edi, edi
je 0x40fe54
mov esi, dword [0x7d3e20]
mov ebx, dword [0x7d3e24]
mov dword [esp + 0x254], 0
movsx eax, byte [0x586088]
jmp 0x40f649
mov eax, 1
mov byte [0x586088], 1
mov edx, dword [0x7d4778]
test eax, eax
je 0x40f6b2
xor eax, eax
mov byte [0x586088], al
mov ecx, dword [edx]
push eax
push 0x7d47bc
push eax
push dword [0x7d4770]
push eax
push 1
push ebx
push esi
push edx
call dword [ecx + 0x5c]
test eax, eax
jl 0x40f742
mov edx, dword [0x7d4778]
mov ecx, dword [edx]
push 0
push 0x7d47c4
push 2
push dword [0x5867c4]
push ebx
push esi
push edx
call dword [ecx + 0x90]
test eax, eax
jl 0x40f712
push ebx
push esi
push 0x7dd3ac
push 0x7d98a0
call fcn.00432de0
add esp, 0x10
mov edx, dword [0x7d4778]
mov ecx, dword [edx]
push edx
call dword [ecx + 0xc]
test eax, eax
je 0x40f6cb
cmp eax, 0x88760869
je 0x40f76f
xor ecx, ecx
jmp 0x40f6cd
xor ecx, ecx
movsx eax, byte [0x7d3e18]
cmp eax, 1
je 0x4101df
test ecx, ecx
je 0x40f779
cmp eax, 1
jne 0x4101ff
push 0x7dd3dc
push 0x7d98a0
call fcn.00432de0
add esp, 8
call fcn.00406a0c
test eax, eax
jne 0x410215
jmp 0x40f637
push 0x7dd370
push 0x7d98a0
call fcn.00432de0
push 0x7dd370
push 0x7dd3a4
call fcn.0040af10
mov eax, 0xffffffff
add esp, 0x284
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push 0x7dd34c
push 0x7d98a0
call fcn.00432de0
push 0x7dd34c
push 0
call fcn.0040af10
mov eax, 0xffffffff
add esp, 0x284
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, 1
jmp 0x40f6cd
mov ecx, dword [0x7d47bc]
mov eax, dword [ecx]
lea edx, [esp + 0x254]
push edx
push 0
push ecx
call dword [eax + 0x48]
test eax, eax
jne 0x40fe93
mov ecx, dword [0x7d47c4]
mov eax, dword [0x7d4338]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x244], edx
mov edx, dword [eax + 0x10]
mov dword [esp + 0x250], edx
mov eax, dword [ecx]
xor edx, edx
push edx
push edx
lea edx, [esp + 0x250]
push edx
push ecx
mov edx, dword [esp + 0x254]
mov dword [esp + 0x254], edx
mov dword [esp + 0x250], ecx
call dword [eax + 0x34]
mov ecx, dword [esp + 0x240]
mov edx, dword [esp + 0x244]
test eax, eax
jl 0x4101cb
mov eax, dword [esp + 0x250]
test eax, eax
jle 0x40f85d
xor eax, eax
add edx, edx
add edx, edx
mov dword [esp + 0x240], ecx
mov dword [esp + 0x238], ebx
mov dword [esp + 0x23c], esi
mov esi, eax
mov ebx, edx
mov ecx, esi
imul ecx, dword [esp + 0x248]
add ecx, dword [esp + 0x24c]
push ebx
push edi
push ecx
call dword [0x5a344c]
add esp, 0xc
add edi, ebx
inc esi
mov ecx, dword [esp + 0x250]
cmp esi, ecx
jl 0x40f81d
mov ecx, dword [esp + 0x240]
mov ebx, dword [esp + 0x238]
mov esi, dword [esp + 0x23c]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x38]
test eax, eax
jl 0x410193
mov edx, dword [0x7d4778]
mov ecx, dword [edx]
xor eax, eax
push eax
push dword [esp + 0x258]
push eax
push dword [0x7d47c4]
push edx
call dword [ecx + 0x78]
test eax, eax
jne 0x40fe63
mov eax, dword [esp + 0x254]
test eax, eax
je 0x40f8a1
mov edx, dword [eax]
push eax
call dword [edx + 8]
movsx eax, byte [0x7d4158]
test eax, eax
jne 0x40fe54
mov dword [esp + 0x254], 0
mov eax, dword [0x7d4778]
mov edx, dword [eax]
push eax
call dword [edx + 0xa4]
test eax, eax
jl 0x41017c
mov edx, dword [0x7d4778]
mov ecx, dword [edx]
xor eax, eax
push eax
push 0x3f800000
push 0xff000000
push 1
push eax
push eax
push edx
call dword [ecx + 0xac]
test eax, eax
jl 0x410165
cmp byte [0x7d3fb0], 1
je 0x40ff0c
cmp byte [0x7d3fb4], 1
je 0x40ff0c
fld qword [0x562300]
fld qword [0x562300]
fstp qword [esp + 0x220]
fld qword [0x562300]
fstp qword [esp + 0x218]
mov dword [esp + 0x210], esi
fild dword [esp + 0x210]
fstp qword [esp + 0x228]
mov dword [esp + 0x210], ebx
fild dword [esp + 0x210]
mov ecx, dword [0x7d4338]
mov edx, dword [ecx + 0xc]
test edx, edx
je 0x40f990
mov eax, dword [0x7d40a4]
imul eax, esi
mov dword [esp + 0x210], eax
fild dword [esp + 0x210]
mov dword [esp + 0x210], edx
fild dword [esp + 0x210]
fdivp st(1)
fstp qword [esp + 0x228]
mov edx, dword [ecx + 0x10]
test edx, edx
je 0x40f9bf
fstp st(0)
mov eax, dword [0x7d40a8]
imul eax, ebx
mov dword [esp + 0x210], eax
fild dword [esp + 0x210]
mov dword [esp + 0x210], edx
fild dword [esp + 0x210]
fdivp st(1)
fadd qword [esp + 0x218]
fst qword [esp + 0xc]
fxch st(1)
fstp qword [esp + 0x14]
mov dword [esp + 0x20], DirectSoundCreate
mov dword [esp + 0x24], 0xbee4f8b5
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0x3fefffeb
lea eax, [esp + 0x38]
fld qword [esp + 0x220]
mov edx, 0xffffffff
fxch st(1)
fstp qword [esp + 0x230]
call fcn.0040d298
fld qword [esp + 0x230]
xor ecx, ecx
mov edi, 0x3fefffeb
fld qword [esp + 0x228]
fadd qword [esp + 0x220]
fst qword [esp + 0x228]
fxch st(1)
fstp qword [esp + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edi
lea eax, [esp + 0x8c]
mov edx, 0xffffffff
call fcn.0040d298
mov edi, DirectSoundCreate
mov eax, 0xbee4f8b5
fld qword [esp + 0x218]
fstp qword [esp + 0xc]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0xe0]
fld qword [esp + 0x220]
mov edx, 0xffffffff
call fcn.0040d298
fld qword [esp + 0x218]
fstp qword [esp + 0xc]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], 0x3fefffeb
mov dword [esp + 0x28], DirectSoundCreate
mov dword [esp + 0x2c], 0xbee4f8b5
lea eax, [esp + 0x134]
fld qword [esp + 0x228]
mov edx, 0xffffffff
call fcn.0040d298
fld qword [0x562308]
fild dword [0x7d4094]
fmul st(1)
fst qword [esp + 0x218]
fild dword [0x7d4098]
fmulp st(2)
fxch st(1)
fst qword [esp + 0x220]
xor ecx, ecx
mov dword [esp + 0x1c8], ecx
mov dword [esp + 0x1c4], ecx
mov dword [esp + 0x1c0], ecx
mov dword [esp + 0x1bc], ecx
mov dword [esp + 0x1b4], ecx
mov dword [esp + 0x1b0], ecx
mov dword [esp + 0x1ac], ecx
mov dword [esp + 0x1a8], ecx
mov dword [esp + 0x1a0], ecx
mov dword [esp + 0x19c], ecx
mov dword [esp + 0x198], ecx
mov dword [esp + 0x194], ecx
mov edx, 0x3f800000
mov dword [esp + 0x1cc], edx
mov dword [esp + 0x1b8], edx
mov dword [esp + 0x1a4], edx
mov dword [esp + 0x190], edx
mov dword [esp + 0x208], ecx
mov dword [esp + 0x204], ecx
mov dword [esp + 0x200], ecx
mov dword [esp + 0x1fc], ecx
mov dword [esp + 0x1f4], ecx
mov dword [esp + 0x1f0], ecx
mov dword [esp + 0x1ec], ecx
mov dword [esp + 0x1e8], ecx
mov dword [esp + 0x1e0], ecx
mov dword [esp + 0x1dc], ecx
mov dword [esp + 0x1d8], ecx
mov dword [esp + 0x1d4], ecx
mov dword [esp + 0x20c], edx
mov dword [esp + 0x1f8], edx
mov dword [esp + 0x1e4], edx
mov dword [esp + 0x1d0], edx
fxch st(1)
fchs
fxch st(1)
fchs
fstp dword [esp + 8]
mov dword [esp + 0xc], ecx
lea eax, [esp + 0x38]
call fcn.0041022c
xor eax, eax
lea edx, [esp + 0x1d0]
push eax
push eax
push eax
push edx
call fcn.004b2709
xor edi, edi
lea eax, [esp + 0x190]
push dword [esp + edi + 0x40]
push dword [esp + edi + 0x40]
push dword [esp + edi + 0x40]
push eax
call fcn.004b2277
lea edx, [esp + 0x190]
lea eax, [esp + 0x1d0]
push eax
push edx
push edx
call fcn.004b18e6
mov eax, dword [esp + 0x1c0]
mov dword [esp + edi + 0x38], eax
mov edx, dword [esp + 0x1c4]
mov dword [esp + edi + 0x3c], edx
mov ecx, dword [esp + 0x1c8]
mov dword [esp + edi + 0x40], ecx
add edi, 0x54
cmp edi, 0x150
jl 0x40fc2a
fld qword [esp + 0x220]
fstp dword [esp + 8]
mov dword [esp + 0xc], 0
lea eax, [esp + 0x38]
fld qword [esp + 0x218]
call fcn.0041022c
mov eax, dword [0x7d4778]
mov edx, dword [eax]
push dword [0x7d47bc]
push 0
push eax
call dword [edx + 0x104]
test eax, eax
je 0x40fce6
push 0x7dd4e8
push 0x7d98a0
call fcn.00432de0
add esp, 8
mov eax, 0xffffffff
add esp, 0x274
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x7d4778]
mov edx, dword [eax]
push 2
push 1
push 0
push eax
call dword [edx + 0x10c]
test eax, eax
je 0x40fd10
push 0x7dd4fc
push 0x7d98a0
call fcn.00432de0
add esp, 8
mov edx, dword [0x7d4778]
mov ecx, dword [edx]
xor eax, eax
push eax
push 2
push eax
push edx
call dword [ecx + 0x10c]
test eax, eax
je 0x40fd3b
push 0x7dd514
push 0x7d98a0
call fcn.00432de0
add esp, 8
mov eax, dword [0x7d4778]
mov edx, dword [eax]
push 0
push eax
call dword [edx + 0x1ac]
mov eax, dword [0x7d4888]
test eax, eax
je 0x40fdf7
mov edx, dword [eax]
push dword [0x7d488c]
push eax
call dword [edx + 0xf0]
mov edx, dword [0x7d4888]
mov ecx, dword [edx]
xor eax, eax
push eax
push eax
push edx
call dword [ecx + 0x104]
mov eax, dword [0x7d4888]
mov edx, dword [eax]
push 0
push eax
call dword [edx + 0x108]
mov eax, dword [0x7d4888]
mov edx, dword [eax]
push dword [0x7d47bc]
push 0x7dd52c
push eax
call dword [edx + 0xd0]
mov dword [esp + 0x210], esi
fild dword [esp + 0x210]
mov dword [esp + 0x210], ebx
fild dword [esp + 0x210]
fxch st(1)
fstp dword [esp + 0x188]
fstp dword [esp + 0x18c]
mov edx, dword [0x7d4888]
mov ecx, dword [edx]
lea eax, [esp + 0x188]
push 8
push eax
push 0x7dd538
push edx
call dword [ecx + 0x50]
cmp byte [0x7d3e48], 3
je 0x40feb8
mov edx, dword [0x7d4778]
mov ecx, dword [edx]
lea eax, [esp + 0x38]
push 0x54
push eax
push 2
push 5
push edx
call dword [ecx + 0x14c]
test eax, eax
jne 0x40fcd4
mov eax, dword [0x7d4888]
test eax, eax
je 0x40fe39
mov edx, dword [eax]
push eax
call dword [edx + 0x110]
mov eax, dword [0x7d4888]
mov edx, dword [eax]
push eax
call dword [edx + 0x114]
mov eax, dword [0x7d4778]
mov edx, dword [eax]
push eax
call dword [edx + 0xa8]
test eax, eax
jl 0x40fef5
call fcn.00410334
xor eax, eax
add esp, 0x274
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push 0x7dd40c
push 0x7d98a0
call fcn.00432de0
push 0x7dd40c
push 0x7dd3a4
call fcn.0040af10
mov eax, 0xffffffff
add esp, 0x284
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 1
push 0x7dd460
push 0x7d98a0
call fcn.00432de0
mov eax, 0xffffffff
add esp, 0x284
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x210], esi
fild dword [esp + 0x210]
fdivr qword [0x562320]
fstp dword [esp + 0x30]
mov dword [esp + 0x34], 0
mov edx, dword [0x7d4888]
mov ecx, dword [edx]
lea eax, [esp + 0x30]
push 8
push eax
push 0x7dd544
push edx
call dword [ecx + 0x50]
jmp 0x40fdf7
push 0x7dd550
push 0x7d98a0
call fcn.00432de0
add esp, 8
jmp 0x40fe4f
movsx eax, byte [0x7d40bc]
cmp eax, 1
je 0x4100d0
cmp eax, 2
je 0x41003b
cmp eax, 3
je 0x40ffd2
fld qword [0x562300]
fldz
fldz
fstp qword [esp + 0x228]
fldz
fstp qword [esp + 0x218]
fldz
fstp qword [esp + 0x220]
test eax, eax
jne 0x40f9bf
fstp st(0)
mov edx, dword [0x7d4338]
fld qword [0x562308]
mov eax, dword [0x7d4094]
sub eax, dword [edx + 0xc]
mov dword [esp + 0x210], eax
fild dword [esp + 0x210]
fmul st(1)
fadd st(2)
fstp qword [esp + 0x220]
mov ecx, dword [0x7d4098]
sub ecx, dword [edx + 0x10]
mov dword [esp + 0x210], ecx
fild dword [esp + 0x210]
fmulp st(1)
fadd st(1)
fstp qword [esp + 0x218]
mov dword [esp + 0x210], esi
fild dword [esp + 0x210]
fstp qword [esp + 0x228]
mov dword [esp + 0x210], ebx
fild dword [esp + 0x210]
jmp 0x40f9bf
fld qword [0x562300]
fld qword [0x562300]
fstp qword [esp + 0x220]
fld qword [0x562300]
fstp qword [esp + 0x218]
mov ecx, dword [0x7d4338]
mov eax, dword [0x7d4094]
imul eax, esi
mov dword [esp + 0x210], eax
fild dword [esp + 0x210]
fild dword [ecx + 0xc]
fdivp st(1)
fstp qword [esp + 0x228]
mov edx, dword [0x7d4098]
imul edx, ebx
mov dword [esp + 0x210], edx
fild dword [esp + 0x210]
fild dword [ecx + 0x10]
fdivp st(1)
jmp 0x40f9bf
mov dword [esp + 0x238], ebx
mov edi, dword [0x7d4338]
mov ebx, dword [edi + 0x10]
fld qword [0x562300]
mov ecx, dword [0x7d4098]
mov eax, dword [edi + 0xc]
imul eax, ecx
cdq
idiv ebx
mov edx, dword [0x7d4094]
sub edx, eax
mov dword [esp + 0x210], edx
fild dword [esp + 0x210]
fmul qword [0x562308]
fadd st(1)
fstp qword [esp + 0x220]
fld qword [0x562300]
fstp qword [esp + 0x218]
fild dword [edi + 0x10]
mov eax, esi
imul eax, ecx
mov dword [esp + 0x210], eax
fild dword [esp + 0x210]
fdiv st(1)
fstp qword [esp + 0x228]
mov ebx, dword [esp + 0x238]
imul ecx, ebx
mov dword [esp + 0x210], ecx
fild dword [esp + 0x210]
fdivrp st(1)
jmp 0x40f9bf
mov dword [esp + 0x238], ebx
fld qword [0x562300]
fld qword [0x562300]
fstp qword [esp + 0x220]
mov edi, dword [0x7d4338]
mov ebx, dword [edi + 0xc]
mov ecx, dword [0x7d4094]
mov eax, dword [edi + 0x10]
imul eax, ecx
cdq
idiv ebx
mov edx, dword [0x7d4098]
sub edx, eax
mov dword [esp + 0x210], edx
fild dword [esp + 0x210]
fmul qword [0x562308]
fadd st(1)
fstp qword [esp + 0x218]
fild dword [edi + 0xc]
mov eax, esi
imul eax, ecx
mov dword [esp + 0x210], eax
fild dword [esp + 0x210]
fdiv st(1)
fstp qword [esp + 0x228]
mov ebx, dword [esp + 0x238]
imul ecx, ebx
mov dword [esp + 0x210], ecx
fild dword [esp + 0x210]
fdivrp st(1)
jmp 0x40f9bf
push 0x7dd4d4
push 0x7d98a0
call fcn.00432de0
add esp, 8
jmp 0x40f8f9
push 0x7dd4c0
push 0x7d98a0
call fcn.00432de0
add esp, 8
jmp 0x40f8d1
push 0x7dd900
push 0x7d98a0
call fcn.00432de0
add esp, 8
push 0x7dd430
push 0x7d98a0
call fcn.00432de0
push 0x7dd430
push 0x7dd3a4
call fcn.0040af10
add esp, 0x10
jmp 0x40f890
push 0x7dd8ec
push 0x7d98a0
call fcn.00432de0
add esp, 8
jmp 0x4101a5
movsx edx, byte [0x7d40d4]
test edx, edx
je 0x40f6dd
mov byte [0x7d40d4], 0
mov ecx, 1
jmp 0x40f6dd
mov byte [0x586088], 1
xor eax, eax
add esp, 0x274
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
add esp, 0x274
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret