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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x7c]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x20], eax
test ebx, ebx
jle 0x40374e
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x7c]
mov ecx, dword [eax + 0x2c]
mov eax, dword [esp + 0x7c]
movsx edx, word [ebx + esi*2 - 2]
movsx eax, word [ebx + eax*2]
sub eax, edx
imul eax, dword [esp + 0x84]
cmp eax, 8
jle 0x4036ed
imul ecx, dword [esp + 0x84]
mov dword [esp + 0x28], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x34], 0
lea esi, [esi]
xor ebp, ebp
jmp 0x40351d
add ebp, 1
cmp dword [esp + 0x7c], ebp
je 0x403616
mov esi, dword [esp + 0x20]
movsx eax, word [esi + ebp*2]
movsx edx, word [esi + ebp*2 + 2]
sub edx, eax
imul edx, dword [esp + 0x84]
mov dword [esp + 0x1c], edx
mov edi, edx
cmp edx, 8
jle 0x403510
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x24], edi
xor esi, esi
imul eax, dword [esp + 0x84]
fild dword [esp + 0x24]
lea edx, [eax + ecx]
mov eax, dword [esp + 0x64]
xor ecx, ecx
lea eax, [eax + edx*4]
add edx, edi
lea edi, [ebx + edx*4]
xor ebx, ebx
lea esi, [esi]
fld dword [eax]
xor edx, edx
fmul st(0)
fmul st(1)
fld dword [0x41e23c]
fcompi st(1)
fld dword [0x41e240]
seta dl
add ecx, edx
xor edx, edx
fcompi st(1)
fld dword [0x41e244]
seta dl
add ebx, edx
xor edx, edx
fcompi st(1)
fstp st(0)
seta dl
add eax, 4
add esi, edx
cmp edi, eax
jne 0x403570
fstp st(0)
mov eax, dword [esp + 0x60]
mov eax, dword [eax + 8]
mov dword [esp + 0x24], eax
sub eax, 3
cmp eax, ebp
jg 0x4035d0
lea eax, [ebx + ecx]
xor edx, edx
shl eax, 5
div dword [esp + 0x1c]
add dword [esp + 0x38], eax
mov edi, dword [esp + 0x1c]
add esi, esi
xor edx, edx
mov eax, dword [esp + 0x88]
cmp esi, edi
mov eax, dword [eax + ebp*4]
setge dl
add ebx, ebx
cmp ebx, edi
setge bl
add ecx, ecx
movzx ebx, bl
add ebx, edx
xor edx, edx
cmp ecx, edi
setge dl
add dword [esp + 0x30], eax
add ebp, 1
add ebx, edx
imul ebx, eax
add dword [esp + 0x2c], ebx
cmp dword [esp + 0x7c], ebp
jne 0x40351d
add dword [esp + 0x34], 1
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
add dword [esp + 0x28], ebx
cmp eax, dword [esp + 0x80]
jl 0x403508
mov ecx, dword [esp + 0x78]
test ecx, ecx
jne 0x4036b0
mov edx, dword [esp + 0x30]
test edx, edx
jle 0x403732
mov eax, dword [esp + 0x2c]
test eax, eax
js 0x40376a
mov eax, dword [esp + 0x2c]
xor edx, edx
mov ecx, dword [esp + 0x68]
shl eax, 8
div dword [esp + 0x30]
mov edx, 3
sub edx, dword [esp + 0x6c]
shl edx, 7
add eax, dword [ecx]
sar eax, 1
mov dword [ecx], eax
lea eax, [eax + eax*2]
lea edx, [edx + eax + 0x42]
mov eax, 3
mov ecx, edx
sar ecx, 2
cmp edx, 0x13f
jle 0x4036a8
mov eax, 2
cmp ecx, 0xff
jle 0x4036a8
xor eax, eax
cmp ecx, 0x17f
setle al
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x40370b
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x38]
add eax, dword [ecx]
sar eax, 1
mov dword [ecx], eax
mov ecx, dword [esp + 0x74]
mov edx, dword [ecx]
cmp edx, 2
je 0x40372d
lea ecx, [eax - 4]
test edx, edx
cmove eax, ecx
cmp eax, 0x16
jle 0x4036f7
mov eax, dword [esp + 0x74]
mov dword [eax], 2
jmp 0x40363c
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x12
mov ecx, dword [esp + 0x74]
setg al
movzx eax, al
mov dword [ecx], eax
jmp 0x40363c
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x7c]
xor edx, edx
sub eax, dword [ecx + 8]
lea ecx, [eax + 4]
mov eax, ebx
imul ecx, dword [esp + 0x80]
div ecx
mov dword [esp + 0x38], eax
jmp 0x4036b8
add eax, 4
jmp 0x4036d9
mov dword [esp + 8], 0x221
mov dword [esp + 4], str.celt_bands.c
mov dword [esp], str.assertion_failed:_nbBands_0
call dbg.celt_fatal
mov dword [esp + 8], 0x1e9
mov dword [esp + 4], str.celt_bands.c
mov dword [esp], str.assertion_failed:_end_0
call dbg.celt_fatal
mov dword [esp + 8], 0x222
mov dword [esp + 4], str.celt_bands.c
mov dword [esp], str.assertion_failed:_sum_0
call dbg.celt_fatal
lea esi, [esi]
lea esi, [esi]