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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, edx
push edi
mov dword [esp + 0x38], ebp
call sym.FreeImage.dll__FreeImage_GetWidth_4
push ebp
mov dword [esp + 0x20], eax
call sym.FreeImage.dll__FreeImage_GetWidth_4
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x48]
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x6c]
test eax, eax
push edi
cmovne ecx, eax
mov dword [esp + 0x28], ecx
call sym.FreeImage.dll__FreeImage_GetLine_4
push edi
mov esi, eax
call sym.FreeImage.dll__FreeImage_GetWidth_4
mov ecx, eax
xor edx, edx
mov eax, esi
div ecx
push dword [esp + 0x5c]
mov esi, eax
mov ebx, esi
mov dword [esp + 0x30], esi
push edi
shr ebx, 1
call sym.FreeImage.dll__FreeImage_GetScanLine_8
push dword [esp + 0x5c]
mov edi, eax
push ebp
mov dword [esp + 0x18], edi
call sym.FreeImage.dll__FreeImage_GetScanLine_8
mov ebp, dword [esp + 0x60]
mov ecx, eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x30], ecx
test eax, eax
je 0x10066d6f
test ebp, ebp
jle 0x10066d5e
mov edi, ecx
push esi
push eax
push edi
call fcn.101f8da0
mov eax, dword [esp + 0x78]
add esp, 0xc
add edi, esi
sub ebp, 1
jne 0x10066d40
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x60]
push esi
mov edx, eax
lea ecx, [esp + 0x44]
call fcn.100357e0
add esp, 4
jmp 0x10066d94
test ebp, ebp
jle 0x10066d84
mov eax, esi
imul eax, ebp
push eax
push 0
push ecx
call fcn.101f9320
add esp, 0xc
push esi
lea eax, [esp + 0x44]
push 0
push eax
call fcn.101f9320
add esp, 0xc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10066ef9
movsd xmm2, qword [esp + 0x64]
movsd xmm3, qword [0x103d7c40]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], eax
push esi
mov edx, edi
lea ecx, [esp + 0x3c]
call fcn.100357e0
add esp, 4
test ebx, ebx
je 0x10066e21
mov ecx, dword [esp + 0x24]
lea ebp, [esp + 0x38]
lea eax, [esp + 0x50]
sub ebp, ecx
sub eax, ecx
mov edx, ecx
mov edi, ebx
mov esi, eax
nop
movzx ecx, word [edx]
movzx eax, word [edx + ebp]
sub eax, ecx
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, xmm2
addsd xmm1, xmm0
addsd xmm1, xmm3
cvttsd2si eax, xmm1
mov word [esi + edx], ax
add edx, 2
sub edi, 1
jne 0x10066de0
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
test ebp, ebp
js 0x10066eca
cmp ebp, dword [esp + 0x20]
jge 0x10066eca
xor ecx, ecx
test ebx, ebx
je 0x10066eb4
cmp ebx, 0x10
jb 0x10066e8f
mov eax, ebx
and eax, 0xfffffff0
nop dword [eax]
nop word [eax + eax]
movups xmm1, xmmword [esp + ecx*2 + 0x38]
movups xmm0, xmmword [esp + ecx*2 + 0x50]
psubw xmm1, xmm0
movups xmm0, xmmword [esp + ecx*2 + 0x40]
paddw xmm1, xmm0
movups xmm0, xmmword [esp + ecx*2 + 0x60]
movups xmmword [esp + ecx*2 + 0x38], xmm1
movups xmm1, xmmword [esp + ecx*2 + 0x48]
psubw xmm1, xmm0
movups xmm0, xmmword [esp + ecx*2 + 0x50]
paddw xmm1, xmm0
movups xmmword [esp + ecx*2 + 0x48], xmm1
add ecx, 0x10
cmp ecx, eax
jb 0x10066e50
cmp ecx, ebx
jae 0x10066eb4
nop dword [eax]
nop word [eax + eax]
mov ax, word [esp + ecx*2 + 0x40]
sub ax, word [esp + ecx*2 + 0x50]
add word [esp + ecx*2 + 0x38], ax
inc ecx
cmp ecx, ebx
jb 0x10066ea0
mov ecx, esi
lea edx, [esp + 0x38]
imul ecx, ebp
push esi
add ecx, dword [esp + 0x34]
call fcn.100357e0
add esp, 4
push esi
lea edx, [esp + 0x54]
lea ecx, [esp + 0x44]
call fcn.100357e0
add edi, esi
inc ebp
add esp, 4
mov dword [esp + 0x10], edi
sub dword [esp + 0x18], 1
mov dword [esp + 0x14], ebp
jne 0x10066db6
mov ebp, dword [esp + 0x60]
mov eax, dword [esp + 0x1c]
lea ebx, [eax + ebp]
test ebx, ebx
js 0x10066f70
mov ebp, dword [esp + 0x20]
cmp ebx, ebp
jge 0x10066f70
push dword [esp + 0x5c]
push dword [esp + 0x38]
call sym.FreeImage.dll__FreeImage_GetScanLine_8
mov edi, ebx
lea edx, [esp + 0x40]
imul edi, esi
push esi
add edi, eax
mov ecx, edi
call fcn.100357e0
mov eax, dword [esp + 0x70]
add esp, 4
add edi, esi
sub ebp, ebx
test eax, eax
je 0x10066f5e
lea ebx, [ebp - 1]
test ebx, ebx
je 0x10066f70
nop
push esi
push eax
push edi
call fcn.101f8da0
mov eax, dword [esp + 0x78]
add esp, 0xc
add edi, esi
sub ebx, 1
jne 0x10066f40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
lea eax, [ebp - 1]
imul eax, esi
push eax
push 0
push edi
call fcn.101f9320
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret