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

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
mov eax, dword [eax]
mov ecx, dword [ebx + 0x10]
mov esi, dword [ebx + 0xc]
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebx + 0x1c]
mov dword [esp + 0x38], eax
mov eax, dword [eax + 0x38]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x20], ecx
movsx eax, word [eax + esi*2]
mov ecx, dword [ebx + 0x24]
mov dword [esp + 0x28], esi
lea esi, [eax + edx*8]
movzx eax, byte [esp + 0x78]
mov dword [esp + 0x3c], ecx
mov edx, esi
mov ecx, dword [esp + 0x68]
and eax, 1
sar edx, 1
cmp dword [esp + 0x64], 2
mov byte [esp + 0x24], al
mov ecx, dword [ecx]
jne 0x401e10
cmp byte [esp + 0x24], 0
lea eax, [edx - 0x10]
mov ebp, 2
je 0x401e10
imul eax, ebp
add eax, ecx
sub ecx, esi
cdq
idiv ebp
lea edx, [ecx - 0x1f]
sub ecx, 0x20
cmp eax, edx
cmovl ecx, eax
cmp ecx, 3
jle 0x401e20
mov eax, 0x40
cmp ecx, eax
cmovg ecx, eax
mov eax, ecx
sar ecx, 3
and eax, 7
mov edx, ecx
mov ecx, 0xe
movsx eax, word [eax + eax + 0x41e164]
sub ecx, edx
sar eax, cl
add eax, 1
and eax, 0xfffffffe
mov ebp, eax
cmp eax, 0x100
jg 0x40252b
mov esi, dword [esp + 0x30]
cmp dword [esp + 0x28], esi
jl 0x401e33
cmp byte [esp + 0x24], 0
je 0x401e33
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x4025d2
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x402408
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
sub eax, dword [esp + 0x30]
mov ebx, eax
mov eax, dword [esp + 0x68]
sub dword [eax], ebx
movzx ecx, byte [esp + 0x6c]
mov edi, dword [esp + 0x7c]
mov eax, 1
xor esi, esi
xor ebp, ebp
shl eax, cl
sub eax, 1
and dword [edi], eax
mov edi, 0x7fff
mov eax, 0xffffc000
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x78]
mov dword [edx + 4], edi
mov dword [edx], ecx
mov dword [edx + 8], ebp
mov dword [edx + 0xc], eax
mov dword [edx + 0x10], esi
mov dword [edx + 0x14], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edx - 4]
mov edx, dword [esp + 0x64]
lea ebp, [edx + edx - 1]
jmp 0x401d1a
mov esi, dword [esp + 0x30]
mov ebp, 1
cmp dword [esp + 0x28], esi
jge 0x401d7e
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x401f00
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
mov dword [esp + 0x30], eax
cmp ebp, 1
je 0x401da5
cmp dword [esp + 0x64], 2
jle 0x401e6a
cmp byte [esp + 0x24], 0
jne 0x402260
cmp dword [esp + 0x70], 1
jg 0x402310
cmp byte [esp + 0x24], 0
jne 0x402310
mov esi, ebp
mov eax, dword [esp + 0x20]
sar esi, 1
lea ebx, [esi + 1]
mov dword [esp], eax
mov edi, ebx
imul edi, ebx
imul ebx, esi
mov dword [esp + 4], edi
sar ebx, 1
call sym._ec_decode
cmp ebx, eax
jg 0x402508
mov edx, edi
lea ebx, [ebp + 1]
sub edx, eax
lea esi, [ebx + ebx]
lea eax, [edx*8 - 7]
mov dword [esp], eax
call dbg.isqrt32
lea ecx, [ebp + 2]
mov edx, edi
sub esi, eax
mov eax, ebx
shr esi, 1
sub eax, esi
sub ecx, esi
imul ecx, eax
sar ecx, 1
sub edx, ecx
add eax, edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._ec_dec_update
jmp 0x4022d3
mov eax, dword [ebx + 0x2c]
mov dword [esp], edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 4], eax
call dbg.stereo_itheta
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
mov dword [esp + 0x30], eax
cmp ebp, 1
je 0x40260b
mov eax, dword [esp + 0x78]
mov ecx, esi
imul ecx, ebp
test eax, eax
je 0x402100
mov eax, dword [ebx + 0x30]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x402470
lea ebx, [ecx + 0x2000]
sar ebx, 0xe
cmp dword [esp + 0x64], 2
jle 0x40258f
mov eax, ebp
shr eax, 0x1f
add eax, ebp
sar eax, 1
lea esi, [eax + eax*2 + 3]
lea ecx, [eax + esi]
mov dword [esp + 0x24], ecx
cmp ebx, eax
jg 0x4023f0
lea ecx, [ebx + ebx*2 + 3]
lea edx, [ecx - 3]
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_encode
test ebx, ebx
js 0x402362
shl ebx, 0xe
cmp ebp, ebx
ja 0x4023b0
mov eax, ebx
xor edx, edx
div ebp
mov esi, eax
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
xor eax, eax
lea esi, [esi]
fld dword [0x41e200]
fld dword [edi + eax*4]
fmul st(1)
fxch st(1)
fmul dword [edx + eax*4]
fld st(1)
fadd st(1)
fstp dword [edi + eax*4]
fsubrp st(1)
fstp dword [edx + eax*4]
add eax, 1
cmp ecx, eax
jg 0x401fe0
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
sub eax, dword [esp + 0x30]
mov ebx, eax
mov eax, dword [esp + 0x68]
sub dword [eax], ebx
cmp esi, 0x4000
je 0x402380
movsx ecx, si
imul ecx, ecx
add ecx, 0x1000
sar ecx, 0xd
movsx edx, cx
imul eax, edx, 0xfffffd8e
add eax, 0x4000
sar eax, 0xf
add ax, 0x2055
movzx eax, ax
imul eax, edx
add eax, 0x4000
sar eax, 0xf
sub ax, 0x1de3
cwde
imul eax, edx
mov edx, 0xffff8000
mov edi, edx
sub edi, ecx
mov ecx, 0x4000
sub ecx, esi
add eax, 0x4000
movsx ecx, cx
sar eax, 0xf
imul ecx, ecx
add edi, eax
movsx edi, di
mov dword [esp + 4], edi
add ecx, 0x1000
sar ecx, 0xd
movsx ebp, cx
sub edx, ecx
imul eax, ebp, 0xfffffd8e
add eax, 0x4000
sar eax, 0xf
add ax, 0x2055
movzx eax, ax
imul eax, ebp
add eax, 0x4000
sar eax, 0xf
sub ax, 0x1de3
cwde
imul eax, ebp
add eax, 0x4000
sar eax, 0xf
add edx, eax
movsx ebp, dx
mov dword [esp], ebp
call dbg.bitexact_log2tan
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x78], 0
cwde
lea edx, [ecx - 1]
shl edx, 7
movsx edx, dx
imul edx, eax
lea eax, [edx + 0x4000]
sar eax, 0xf
jmp 0x401dec
mov edx, dword [ebx + 0x38]
lea esi, [ecx + 0x2000]
sar esi, 0xe
test edx, edx
je 0x402338
test esi, esi
jle 0x402338
cmp ebp, esi
jle 0x402338
mov eax, esi
xor edx, edx
shl eax, 0xe
div ebp
movsx edx, ax
imul edx, edx
add edx, 0x1000
mov edi, edx
mov edx, 0x4000
sar edi, 0xd
sub edx, eax
movsx ecx, di
movsx edx, dx
imul eax, ecx, 0xfffffd8e
imul edx, edx
add eax, 0x4000
sar eax, 0xf
add edx, 0x1000
add ax, 0x2055
sar edx, 0xd
movzx eax, ax
mov dword [esp + 0x24], edx
movsx ebx, word [esp + 0x24]
imul eax, ecx
add eax, 0x4000
sar eax, 0xf
sub ax, 0x1de3
cwde
imul eax, ecx
mov ecx, 0xffff8000
mov edx, ecx
sub edx, edi
add eax, 0x4000
sar eax, 0xf
add edx, eax
imul eax, ebx, 0xfffffd8e
movsx edx, dx
mov dword [esp + 4], edx
add eax, 0x4000
sar eax, 0xf
add ax, 0x2055
movzx eax, ax
imul eax, ebx
add eax, 0x4000
sar eax, 0xf
sub ax, 0x1de3
cwde
imul eax, ebx
add eax, 0x4000
sub cx, word [esp + 0x24]
sar eax, 0xf
add ecx, eax
movsx ecx, cx
mov dword [esp], ecx
call dbg.bitexact_log2tan
mov edi, dword [esp + 0x68]
mov edx, eax
mov eax, dword [esp + 0x64]
movsx edx, dx
sub eax, 1
shl eax, 7
cwde
imul eax, edx
mov edx, dword [edi]
add eax, 0x4000
sar eax, 0xf
cmp edx, eax
jl 0x402330
neg edx
cmp edx, eax
jle 0x402338
cmp dword [esp + 0x70], 1
jg 0x40256d
xor esi, esi
mov eax, ebp
sar eax, 1
lea edx, [eax + 1]
imul edx, edx
cmp eax, esi
jl 0x4024b0
lea eax, [esi + 1]
mov ecx, esi
imul ecx, eax
sar ecx, 1
add eax, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dbg.ec_encode
jmp 0x4022cb
mov edi, ebp
shr edi, 0x1f
add edi, ebp
sar edi, 1
lea esi, [edi + 1]
lea ebx, [esi + esi*2]
lea eax, [edi + ebx]
mov dword [esp + 0x24], eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym._ec_decode
mov ecx, eax
cmp eax, ebx
jge 0x4024e8
mov esi, 0x55555556
mov eax, ecx
sar ecx, 0x1f
imul esi
mov esi, edx
sub esi, ecx
cmp esi, edi
jg 0x4024d0
lea edx, [esi + esi*2 + 3]
lea eax, [edx - 3]
mov dword [esp + 4], eax
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov dword [esp + 8], edx
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sym._ec_dec_update
test esi, esi
js 0x402362
shl esi, 0xe
xor edx, edx
mov eax, esi
div ebp
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
sub eax, dword [esp + 0x30]
mov ebx, eax
mov eax, dword [esp + 0x68]
sub dword [eax], ebx
test esi, esi
jne 0x40201b
mov dword [esp + 0x78], 0
jmp 0x401dc9
lea eax, [ebp + 1]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_dec_uint
mov esi, eax
jmp 0x4022cb
mov esi, ebp
lea esi, [esi]
cmp dword [esp + 0x70], 1
jle 0x402224
lea eax, [ebp + 1]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_enc_uint
test esi, esi
jns 0x4022d3
mov dword [esp + 8], 0x346
mov dword [esp + 4], str.celt_bands.c
mov dword [esp], str.assertion_failed:_itheta_0
call dbg.celt_fatal
nop
movzx ecx, byte [esp + 0x6c]
mov eax, 1
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x78], 0
mov ebp, 0x7fff
shl eax, cl
sub eax, 1
shl eax, cl
and dword [edi], eax
mov eax, 0x4000
xor edi, edi
jmp 0x401dec
mov ebx, dword [esp + 0x64]
mov eax, dword [esp + 0x38]
mov edx, edi
mov ecx, dword [esp + 0x60]
mov eax, dword [eax + 8]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x3c]
mov dword [esp], ebx
call sym._intensity_stereo.isra.0
mov dword [esp + 0x78], 0
jmp 0x401db1
mov ecx, ebx
lea edx, [ebx - 1]
sub ecx, eax
sub edx, eax
add ecx, esi
add edx, esi
jmp 0x401f99
mov dword [esp + 0x78], 0
mov eax, dword [esp + 0x68]
cmp dword [eax], 0x10
jle 0x402450
cmp dword [ebx + 0x20], 0x10
jle 0x402450
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x402550
mov eax, dword [esp + 0x78]
mov dword [esp + 8], 2
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_enc_bit_logp
jmp 0x402458
mov dword [esp + 0x78], 0
mov ecx, dword [ebx + 0x34]
xor eax, eax
test ecx, ecx
cmove eax, dword [esp + 0x78]
mov dword [esp + 0x78], eax
jmp 0x401db1
cmp esi, 0x2000
jg 0x4024f8
mov eax, 0xffff8001
cdq
idiv ebp
add eax, ecx
sar eax, 0xe
mov ebx, eax
mov eax, 0
cmovs ebx, eax
lea eax, [ebp - 1]
cmp ebx, ebp
cmovge ebx, eax
cmp dword [esp + 0x24], 0x80000000
adc ebx, 0
jmp 0x401f6b
lea eax, [ebp + 1]
lea ebx, [ebp + 2]
mov ecx, edx
sub eax, esi
sub ebx, esi
imul ebx, eax
sar ebx, 1
sub ecx, ebx
jmp 0x402240
mov edx, esi
lea eax, [esi - 1]
sub edx, edi
sub eax, edi
add edx, ebx
add eax, ebx
jmp 0x4022af
sub ecx, ebx
add esi, ecx
jmp 0x4022a0
mov eax, 0x7fff
cdq
idiv ebp
jmp 0x402484
lea eax, [eax*8 + 1]
mov dword [esp], eax
call dbg.isqrt32
lea esi, [eax - 1]
shr esi, 1
lea eax, [esi + 1]
mov edx, esi
imul edx, eax
sar edx, 1
jmp 0x401ed8
mov dword [esp + 8], 0x29d
mov dword [esp + 4], str.celt_bands.c
mov dword [esp], str.assertion_failed:_qn___256
call dbg.celt_fatal
lea esi, [esi]
nop
mov eax, dword [esp + 0x20]
mov dword [esp + 4], 2
mov dword [esp], eax
call dbg.ec_dec_bit_logp
mov dword [esp + 0x78], eax
jmp 0x402458
lea eax, [ebp + 1]
mov dword [esp + 4], 0
xor esi, esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_enc_uint
jmp 0x4022d3
lea eax, [ebp + 1]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_enc_uint
test ebx, ebx
js 0x402362
shl ebx, 0xe
xor edx, edx
mov eax, ebx
div ebp
mov esi, eax
cmp ebx, ebp
jb 0x4023b0
mov eax, dword [esp + 0x64]
test eax, eax
jg 0x401fd0
jmp 0x402003
mov eax, dword [ebx + 0x2c]
mov dword [esp], edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 4], eax
call dbg.stereo_itheta
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dbg.ec_tell_frac
mov dword [esp + 0x30], eax
cmp dword [esp + 0x78], 0
je 0x4022de
cmp esi, 0x2000
jg 0x402656
nop
mov dword [esp + 0x78], 0
mov esi, dword [esp + 0x64]
mov eax, dword [esp + 0x38]
mov edx, edi
mov ecx, dword [esp + 0x60]
mov eax, dword [eax + 8]
mov dword [esp + 8], esi
mov esi, dword [esp + 0x28]
mov dword [esp + 4], esi
mov esi, dword [esp + 0x3c]
mov dword [esp], esi
call sym._intensity_stereo.isra.0
jmp 0x402410
mov ebp, dword [ebx + 0x34]
test ebp, ebp
jne 0x402620
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
lea edx, [eax + ecx*4]
test ecx, ecx
jle 0x402628
lea esi, [esi]
fld dword [eax]
add eax, 4
fchs
fstp dword [eax - 4]
cmp edx, eax
jne 0x402670
jmp 0x402628