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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x154
push ebx
mov ebx, dword [ebp + 0x18]
mov edx, dword [ebx + 4]
push esi
push edi
mov esi, ecx
mov ecx, dword [ebx + 0xc]
lea eax, [esp + 0x80]
push eax
sub ecx, dword [ebx + 8]
dec ecx
push ecx
sub edx, dword [ebx]
dec edx
push edx
push 1
push 1
mov dword [esp + 0x5c], esi
call fcn.00443a00
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x94]
push eax
mov ecx, eax
push edi
push ecx
call fcn.00443ca0
lea edx, [esp + 0x140]
push edx
lea eax, [esp + 0xa4]
push edi
push eax
call fcn.00409280
mov edi, dword [ebp + 0x14]
add esp, 0x2c
test eax, eax
jle 0x40d830
lea esi, [esp + 0x120]
mov dword [esp + 0x14], eax
mov ecx, edi
mov edx, dword [ecx]
mov eax, dword [ecx + 4]
mov dword [esp + 0x60], edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x64], eax
mov eax, dword [ecx + 0xc]
lea ecx, [esp + 0x60]
push ecx
mov dword [esp + 0x6c], edx
mov edx, dword [ebp + 0xc]
push esi
push edx
mov dword [esp + 0x78], eax
call fcn.004459e0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
add esp, 0xc
push ebx
lea eax, [esp + 0x64]
push eax
push ecx
mov ecx, dword [esp + 0x54]
push esi
push edx
call fcn.00407cb0
mov eax, dword [esp + 0x14]
add esi, 0x10
dec eax
mov dword [esp + 0x14], eax
jne 0x40d7d7
mov esi, dword [esp + 0x48]
xor ebx, ebx
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebx + eax]
push ecx
call fcn.00401010
mov dword [esp + ebx + 0x100], eax
add ebx, 4
add esp, 4
cmp ebx, 0x24
jl 0x40d832
fld dword [0x68a9c0]
fld dword [esi + 0x24]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40d879
fld dword [0x68aafc]
fdiv dword [esi + 0x24]
call fcn.00519000
mov ebx, 1
sub ebx, eax
jmp 0x40d87e
mov ebx, 1
fld dword [esi + 0x28]
call fcn.00519000
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
pxor mm0, mm0
mov dword [esp + 0x2c], ecx
mov dx, 0xff
movq qword [esp + 0xa0], mm0
movq qword [esp + 0x90], mm0
movd mm0, edx
mov dword [esp + 0x30], ecx
movq mm1, mm0
punpcklwd mm1, mm0
mov dword [esp + 0x34], ecx
movq mm0, mm1
mov dword [esp + 0x38], ecx
punpcklwd mm1, mm0
movq qword [esp + 0x60], mm1
lea edx, [esp + 0xb0]
mov dword [esp + 0x3c], ecx
mov edi, edi
mov esi, dword [esp + ecx + 0xfc]
movd mm0, esi
pshufw mm0, mm0, 0
movq qword [edx], mm0
add ecx, 4
add edx, 8
cmp ecx, 0x24
jl 0x40d8e0
mov edx, dword [edi]
mov ecx, dword [edi + 8]
movd mm0, ebx
pshufw mm0, mm0, 0
movq qword [esp + 0x98], mm0
movd mm0, eax
mov eax, dword [edi + 4]
mov dword [esp + 0x4c], edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x54], ecx
push eax
lea ecx, [esp + 0x84]
mov dword [esp + 0x5c], edx
mov edx, dword [ebp + 0xc]
push ecx
pshufw mm0, mm0, 0
push edx
movq qword [esp + 0xb4], mm0
call fcn.004459e0
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
sub eax, esi
mov esi, dword [esp + 0x64]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x24]
push eax
sub esi, edx
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x90]
push ecx
push edx
mov dword [esp + 0x74], esi
call fcn.0044cb90
mov edx, dword [esp + 0x30]
mov dword [esp + 0x8c], eax
sar edx, 2
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x34], edx
mov edx, dword [ebp + 0x10]
push ecx
push edx
call fcn.0044cb90
mov ecx, dword [esp + 0x64]
sar ecx, 2
add esp, 0x24
test esi, esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x14], 0
jle 0x40dcf8
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x74]
dec eax
imul eax, ecx
mov esi, dword [edx + eax*4]
lea eax, [edx + eax*4 - 4]
mov edi, dword [eax + 8]
mov ebx, dword [eax + ecx*4 + 8]
mov edx, dword [eax]
mov dword [esp + 0x20], esi
lea esi, [eax + 8]
mov dword [esp + 0x24], edi
mov edi, dword [eax + ecx*4]
mov dword [esp + 0x28], edi
mov edi, dword [eax + ecx*4 + 4]
mov dword [esp + 0x2c], edi
mov edi, dword [eax + ecx*8]
mov dword [esp + 0x34], edi
mov edi, dword [eax + ecx*8 + 4]
mov dword [esp + 0x38], edi
mov edi, dword [eax + ecx*8 + 8]
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 8
mov dword [esp + 0x1c], edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], edi
jne 0x40da6b
xor ecx, ecx
mov dword [esp + 0xc], ecx
lea esp, [esp]
mov eax, dword [esp + ecx*4 + 0x1c]
mov edx, eax
and edx, 0xff000000
cmp edx, 0xff000000
je 0x40da5d
push eax
call fcn.0044ca10
mov ecx, dword [esp + 0x10]
mov dword [esp + ecx*4 + 0x20], eax
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0x34]
add esp, 4
inc ecx
cmp ecx, 9
mov dword [esp + 0xc], ecx
jl 0x40da30
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x44]
xor ecx, ecx
test eax, eax
mov dword [esp + 0xc], ecx
jle 0x40dcd4
jmp 0x40da83
mov edx, dword [esp + 0x1c]
test edx, edx
movq mm0, qword [esp + 0xa0]
movq mm1, qword [esp + 0x90]
je 0x40daa5
movd mm0, edx
punpcklbw mm0, mm1
pmullw mm0, qword [esp + 0xb0]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40dabe
movd mm2, eax
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xb8]
paddw mm0, mm2
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40dad7
movd mm2, eax
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xc0]
paddw mm0, mm2
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40daf0
movd mm2, eax
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xc8]
paddw mm0, mm2
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40db09
movd mm2, eax
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xd0]
paddw mm0, mm2
test ebx, ebx
je 0x40db1e
movd mm2, ebx
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xd8]
paddw mm0, mm2
mov edx, dword [esp + 0x34]
test edx, edx
je 0x40db37
movd mm2, edx
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xe0]
paddw mm0, mm2
mov edx, dword [esp + 0x38]
test edx, edx
je 0x40db50
movd mm2, edx
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xe8]
paddw mm0, mm2
test edi, edi
je 0x40db65
movd mm2, edi
punpcklbw mm2, mm1
pmullw mm2, qword [esp + 0xf0]
paddw mm0, mm2
pmulhw mm0, qword [esp + 0x98]
paddw mm0, qword [esp + 0xa8]
mov edx, dword [ebp + 0x10]
cmp dword [edx + 4], 8
pmaxsw mm0, mm1
pminsw mm0, qword [esp + 0x60]
jne 0x40dbff
mov edx, dword [esp + 0x48]
cmp byte [edx + 0x2c], 0
je 0x40db95
shr eax, 0x18
jmp 0x40db99
pextrw eax, mm0, 3
cmp eax, 0xff
je 0x40dbff
test eax, eax
jne 0x40dbb1
mov eax, dword [esp + 0x10]
mov dword [eax + ecx*4], 0
jmp 0x40dc11
movd mm2, eax
pshufw mm2, mm2, 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0xff0000
movq mm3, qword [esp + 0x78]
por mm0, mm3
pmullw mm0, mm2
mov dx, 1
movd mm2, edx
movq mm3, mm2
punpcklwd mm3, mm2
movq mm2, mm3
punpcklwd mm3, mm2
movq mm2, mm0
psrlw mm2, 8
paddw mm0, mm2
paddw mm0, mm3
psrlw mm0, 8
packuswb mm0, mm1
movd eax, mm0
jmp 0x40dc0a
packuswb mm0, mm1
movd eax, mm0
or eax, 0xff000000
mov edx, dword [esp + 0x10]
mov dword [edx + ecx*4], eax
mov eax, dword [esp + 0x44]
dec eax
cmp ecx, eax
je 0x40dcc3
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
add esi, 4
mov dword [esp + 0x28], eax
mov eax, dword [esi]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], edx
mov edx, dword [ebp + 8]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esi + eax*4]
mov dword [esp + 0x38], edi
mov edi, dword [esi + eax*8]
cmp dword [edx + 4], 8
jne 0x40dcc3
mov eax, dword [esp + 0x24]
mov edx, eax
and edx, 0xff000000
cmp edx, 0xff000000
je 0x40dc87
push eax
call fcn.0044ca10
mov ecx, dword [esp + 0x10]
add esp, 4
mov dword [esp + 0x24], eax
mov eax, ebx
and eax, 0xff000000
cmp eax, 0xff000000
je 0x40dca4
push ebx
call fcn.0044ca10
mov ecx, dword [esp + 0x10]
add esp, 4
mov ebx, eax
mov edx, edi
and edx, 0xff000000
cmp edx, 0xff000000
je 0x40dcc3
push edi
call fcn.0044ca10
mov ecx, dword [esp + 0x10]
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x44]
inc ecx
cmp ecx, eax
mov dword [esp + 0xc], ecx
jl 0x40da7f
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
lea edx, [eax + ecx*4]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x5c]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
jl 0x40d9c4
emms
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x14