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

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
mov esi, dword [esp + 0x90]
push edi
push dword [esp + 0x80]
push esi
push dword [ecx + 4]
lea ecx, [esp + 0x50]
call fcn.10061170
mov ebp, dword [esp + 0x78]
push ebp
call sym.FreeImage.dll__FreeImage_GetImageType_4
dec eax
cmp eax, 0xb
ja case.0x1006435e.2
movzx eax, byte [eax + 0x10066d88]
jmp dword [eax*4 + 0x10066d70]
mov edi, dword [esp + 0x90]
push edi
call sym.FreeImage.dll__FreeImage_GetPitch_4
push edi
mov dword [esp + 0x84], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ebx, eax
push ebp
mov dword [esp + 0x94], ebx
call sym.FreeImage.dll__FreeImage_GetBPP_4
dec eax
cmp eax, 0x1f
ja case.0x1006435e.2
movzx ecx, byte [eax + 0x10066db0]
jmp dword [ecx*4 + 0x10066d94]
push ebp
call sym.FreeImage.dll__FreeImage_GetPitch_4
push ebp
mov esi, eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ecx, esi
imul ecx, dword [esp + 0x88]
push edi
add eax, ecx
mov ecx, dword [esp + 0x88]
shr ecx, 3
add eax, ecx
mov dword [esp + 0x8c], eax
call sym.FreeImage.dll__FreeImage_GetBPP_4
cmp eax, 8
je 0x1006493a
cmp eax, 0x18
je 0x100645f3
cmp eax, 0x20
jne case.0x1006435e.2
xor ecx, ecx
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x7c], ecx
jbe case.0x1006435e.2
movsd xmm6, qword [0x1039c168]
nop dword [eax + eax]
mov dword [esp + 0x84], ebx
mov eax, 0x80
mov ebx, ecx
and ecx, 7
sar eax, cl
mov ecx, dword [esp + 0x94]
shr ebx, 3
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x100645bc
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x20], 0xff
add ebp, 8
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], 0xff
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0xff
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0xff
mov dword [esp + 0x40], 0
mov dword [esp + 0x78], ecx
nop dword [eax + eax]
mov edx, dword [ebp - 4]
xorps xmm2, xmm2
mov edi, dword [ebp]
xorps xmm3, xmm3
sub edi, edx
xorps xmm4, xmm4
imul edx, esi
xorps xmm5, xmm5
add edx, ebx
add edx, dword [esp + 0x88]
test edi, edi
je 0x100644f8
mov ebx, dword [ebp - 8]
nop dword [eax + eax]
mov al, byte [edx]
and al, byte [esp + 0x18]
movsd xmm1, qword [ebx]
movzx ecx, al
neg ecx
sbb ecx, ecx
add edx, esi
and ecx, 4
add ebx, 8
add ecx, dword [esp + 0x8c]
movzx eax, byte [ecx + 2]
movd xmm0, eax
movzx eax, byte [ecx + 1]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, byte [ecx]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
movzx eax, byte [ecx + 3]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm5, xmm0
sub edi, 1
jne 0x10064480
mov ebx, dword [esp + 0x1c]
addsd xmm2, xmm6
lea edx, [esp + 0x24]
lea ecx, [esp + 0x28]
cvttsd2si eax, xmm2
mov dword [esp + 0x28], eax
lea eax, [esp + 0x20]
push eax
call fcn.1005f2e0
mov edi, dword [esp + 0x88]
addsd xmm3, xmm6
add esp, 4
lea edx, [esp + 0x30]
lea ecx, [esp + 0x84]
mov byte [edi + 2], al
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x2c]
push eax
call fcn.1005f2e0
addsd xmm4, xmm6
mov byte [edi + 1], al
add esp, 4
lea edx, [esp + 0x38]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x34]
push eax
call fcn.1005f2e0
addsd xmm5, xmm6
mov byte [edi], al
add esp, 4
lea edx, [esp + 0x40]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm5
mov dword [esp + 0x84], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov byte [edi + 3], al
add esp, 4
add edi, dword [esp + 0x80]
add ebp, 0xc
sub dword [esp + 0x78], 1
mov dword [esp + 0x84], edi
jne 0x10064450
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x90]
inc ecx
add ebx, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0x90], ebx
cmp ecx, dword [esp + 0x7c]
jb 0x100643d0
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
cmp dword [esp + 0x8c], 0
je 0x100647ed
xor ecx, ecx
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x7c], ecx
jbe case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
nop dword [eax]
mov eax, ecx
mov dword [esp + 0x84], ebx
shr eax, 3
and ecx, 7
mov dword [esp + 0x40], eax
mov eax, 0x80
sar eax, cl
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x3c], eax
test ecx, ecx
je 0x100647b6
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x38], 0xff
add ebp, 8
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x24], 0
mov dword [esp + 0x78], ecx
nop dword [eax + eax]
mov edx, dword [ebp - 4]
xorps xmm2, xmm2
mov edi, dword [ebp]
xorps xmm3, xmm3
sub edi, edx
xorps xmm4, xmm4
imul edx, esi
add edx, dword [esp + 0x40]
add edx, dword [esp + 0x88]
test edi, edi
je 0x1006471d
mov ebx, dword [ebp - 8]
mov al, byte [edx]
and al, byte [esp + 0x3c]
movsd xmm1, qword [ebx]
movzx ecx, al
neg ecx
sbb ecx, ecx
add edx, esi
and ecx, 4
add ebx, 8
add ecx, dword [esp + 0x8c]
movzx eax, byte [ecx + 2]
movd xmm0, eax
movzx eax, byte [ecx + 1]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, byte [ecx]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub edi, 1
jne 0x100646b6
mov ebx, dword [esp + 0x84]
addsd xmm2, xmm5
lea edx, [esp + 0x34]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm2
mov dword [esp + 0x84], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
addsd xmm3, xmm5
mov byte [ebx + 2], al
add esp, 4
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
addsd xmm4, xmm5
mov byte [ebx + 1], al
add esp, 4
lea edx, [esp + 0x24]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x28]
push eax
call fcn.1005f2e0
mov byte [ebx], al
add esp, 4
add ebx, dword [esp + 0x80]
add ebp, 0xc
sub dword [esp + 0x78], 1
mov dword [esp + 0x84], ebx
jne 0x10064690
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x90]
inc ecx
add ebx, 3
mov dword [esp + 0x14], ecx
mov dword [esp + 0x90], ebx
cmp ecx, dword [esp + 0x7c]
jb 0x10064620
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
xor eax, eax
mov dword [esp + 0x78], eax
cmp dword [esp + 0x7c], eax
jbe case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
movsd xmm3, qword [0x1039c418]
nop dword [eax]
mov ecx, eax
mov edx, eax
and ecx, 7
shr edx, 3
mov eax, 0x80
mov dword [esp + 0x34], edx
sar eax, cl
mov ebp, ebx
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x40], eax
test ecx, ecx
je 0x1006490a
mov ebx, dword [esp + 0x44]
add ebx, 8
mov dword [esp + 0x3c], 0xff
mov dword [esp + 0x38], 0
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x84], ecx
nop
mov ecx, dword [ebx - 4]
xorps xmm1, xmm1
mov edi, dword [ebx]
sub edi, ecx
imul ecx, esi
add ecx, edx
add ecx, dword [esp + 0x88]
test edi, edi
je 0x100648ac
mov edx, dword [ebx - 8]
mov ebx, dword [esp + 0x40]
test byte [ecx], bl
mov eax, 0
setne al
add ecx, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub edi, 1
jne 0x10064881
mov ebx, dword [esp + 0x8c]
mulsd xmm1, xmm3
lea edx, [esp + 0x38]
lea ecx, [esp + 0x8c]
addsd xmm1, xmm2
cvttsd2si eax, xmm1
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x38]
add ebx, 0xc
mov byte [ebp + 2], al
add esp, 4
mov byte [ebp + 1], al
mov byte [ebp], al
add ebp, dword [esp + 0x80]
sub dword [esp + 0x84], 1
mov dword [esp + 0x8c], ebx
jne 0x10064860
mov ebx, dword [esp + 0x90]
mov eax, dword [esp + 0x78]
add ebx, 3
inc eax
mov dword [esp + 0x90], ebx
mov dword [esp + 0x78], eax
cmp eax, dword [esp + 0x7c]
jb 0x10064810
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
mov ebp, dword [esp + 0x8c]
test ebp, ebp
je 0x10064a8c
xor ecx, ecx
mov dword [esp + 0x78], ecx
cmp dword [esp + 0x7c], ecx
jbe case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
movsd xmm3, qword [0x1039c418]
nop dword [eax]
lea eax, [ecx + ebx]
mov edx, ecx
mov dword [esp + 0x8c], eax
and ecx, 7
mov eax, 0x80
shr edx, 3
sar eax, cl
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x30], edx
mov dword [esp + 0x40], eax
test ecx, ecx
je 0x10064a66
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x3c], 0xff
add ebx, 8
mov dword [esp + 0x38], 0
mov dword [esp + 0x84], ecx
nop
mov ecx, dword [ebx - 4]
xorps xmm1, xmm1
mov edi, dword [ebx]
sub edi, ecx
imul ecx, esi
add ecx, edx
add ecx, dword [esp + 0x88]
test edi, edi
je 0x10064a0e
mov edx, dword [ebx - 8]
nop dword [eax]
mov al, byte [ecx]
and al, byte [esp + 0x40]
movzx eax, al
neg eax
sbb eax, eax
add ecx, esi
and eax, 4
movzx eax, byte [eax + ebp]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub edi, 1
jne 0x100649e0
mulsd xmm1, xmm3
lea edx, [esp + 0x38]
lea ecx, [esp + 0x34]
addsd xmm1, xmm2
cvttsd2si eax, xmm1
mov dword [esp + 0x34], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x90]
add esp, 4
add ebx, 0xc
mov byte [edx], al
add edx, dword [esp + 0x80]
sub dword [esp + 0x84], 1
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x30]
jne 0x100649c0
mov ebx, dword [esp + 0x90]
mov ecx, dword [esp + 0x78]
inc ecx
mov dword [esp + 0x78], ecx
cmp ecx, dword [esp + 0x7c]
jb 0x10064970
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
xor eax, eax
mov dword [esp + 0x78], eax
cmp dword [esp + 0x7c], eax
jbe case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
movsd xmm3, qword [0x1039c418]
nop dword [eax]
mov ecx, eax
lea ebp, [eax + ebx]
mov edx, eax
and ecx, 7
mov eax, 0x80
shr edx, 3
sar eax, cl
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x34], edx
mov dword [esp + 0x40], eax
test ecx, ecx
je 0x10064ba4
mov ebx, dword [esp + 0x44]
add ebx, 8
mov dword [esp + 0x3c], 0xff
mov dword [esp + 0x38], 0
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x84], ecx
mov ecx, dword [ebx - 4]
xorps xmm1, xmm1
mov edi, dword [ebx]
sub edi, ecx
imul ecx, esi
add ecx, edx
add ecx, dword [esp + 0x88]
test edi, edi
je 0x10064b4c
mov edx, dword [ebx - 8]
mov ebx, dword [esp + 0x40]
test byte [ecx], bl
mov eax, 0
setne al
add ecx, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub edi, 1
jne 0x10064b21
mov ebx, dword [esp + 0x8c]
mulsd xmm1, xmm3
lea edx, [esp + 0x38]
lea ecx, [esp + 0x8c]
addsd xmm1, xmm2
cvttsd2si eax, xmm1
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x38]
add ebx, 0xc
mov byte [ebp], al
add esp, 4
add ebp, dword [esp + 0x80]
sub dword [esp + 0x84], 1
mov dword [esp + 0x8c], ebx
jne 0x10064b00
mov ebx, dword [esp + 0x90]
mov eax, dword [esp + 0x78]
inc eax
mov dword [esp + 0x78], eax
cmp eax, dword [esp + 0x7c]
jb 0x10064ab0
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetPitch_4
push dword [esp + 0x78]
mov ebp, eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ecx, ebp
imul ecx, dword [esp + 0x88]
push edi
add eax, ecx
mov ecx, dword [esp + 0x88]
shr ecx, 1
add eax, ecx
mov dword [esp + 0x8c], eax
call sym.FreeImage.dll__FreeImage_GetBPP_4
cmp eax, 8
je 0x1006507e
cmp eax, 0x18
je 0x10064e7d
cmp eax, 0x20
jne case.0x1006435e.2
mov eax, dword [esp + 0x7c]
xor esi, esi
mov dword [esp + 0x18], esi
test eax, eax
je case.0x1006435e.2
movsd xmm6, qword [0x1039c168]
mov edx, dword [esp + 0x94]
nop dword [eax + eax]
mov ecx, esi
mov dword [esp + 0x84], ebx
shr ecx, 1
mov edi, ebx
mov dword [esp + 0x20], ecx
test edx, edx
je 0x10064e53
mov eax, dword [esp + 0x44]
add eax, 8
mov dword [esp + 0x40], 0xff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x24], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x14], edx
mov edx, dword [eax - 4]
xorps xmm2, xmm2
mov ebx, dword [eax]
xorps xmm3, xmm3
sub ebx, edx
xorps xmm4, xmm4
imul edx, ebp
xorps xmm5, xmm5
add edx, ecx
add edx, dword [esp + 0x88]
test ebx, ebx
je 0x10064d72
mov edi, esi
mov esi, dword [eax - 8]
and edi, 1
movsd xmm1, qword [esi]
movzx ecx, byte [edx]
test edi, edi
je 0x10064ce7
and ecx, 0xf
jmp 0x10064cea
shr ecx, 4
mov eax, dword [esp + 0x8c]
add edx, ebp
add esi, 8
movzx eax, byte [eax + ecx*4 + 2]
movd xmm0, eax
mov eax, dword [esp + 0x8c]
cvtdq2pd xmm0, xmm0
movzx eax, byte [eax + ecx*4 + 1]
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
mov eax, dword [esp + 0x8c]
cvtdq2pd xmm0, xmm0
movzx eax, byte [eax + ecx*4]
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
mov eax, dword [esp + 0x8c]
cvtdq2pd xmm0, xmm0
movzx eax, byte [eax + ecx*4 + 3]
mulsd xmm0, xmm1
addsd xmm4, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm5, xmm0
sub ebx, 1
jne 0x10064cd7
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x84]
addsd xmm2, xmm6
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm2
mov dword [esp + 0x84], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
addsd xmm3, xmm6
mov byte [edi + 2], al
add esp, 4
lea edx, [esp + 0x34]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
addsd xmm4, xmm6
mov byte [edi + 1], al
add esp, 4
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
addsd xmm5, xmm6
mov byte [edi], al
add esp, 4
lea edx, [esp + 0x24]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm5
mov dword [esp + 0x84], eax
lea eax, [esp + 0x28]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x24]
add esp, 4
mov byte [edi + 3], al
mov eax, dword [esp + 0x78]
add edi, dword [esp + 0x80]
add eax, 0xc
sub dword [esp + 0x14], 1
mov dword [esp + 0x84], edi
mov dword [esp + 0x78], eax
jne 0x10064ca8
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
inc esi
add ebx, 4
mov dword [esp + 0x18], esi
mov dword [esp + 0x90], ebx
cmp esi, eax
jb 0x10064c40
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
mov eax, dword [esp + 0x7c]
xor esi, esi
mov dword [esp + 0x14], esi
test eax, eax
je case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
mov edx, dword [esp + 0x94]
nop
mov ecx, esi
mov dword [esp + 0x84], ebx
shr ecx, 1
mov dword [esp + 0x28], ecx
test edx, edx
je 0x1006504d
mov eax, dword [esp + 0x44]
add eax, 8
mov dword [esp + 0x40], 0xff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x18], edx
mov edx, dword [eax - 4]
xorps xmm2, xmm2
mov edi, dword [eax]
xorps xmm3, xmm3
sub edi, edx
xorps xmm4, xmm4
imul edx, ebp
add edx, ecx
add edx, dword [esp + 0x88]
test edi, edi
je 0x10064f9d
mov ebx, esi
mov esi, dword [eax - 8]
and ebx, 1
movsd xmm1, qword [esi]
movzx ecx, byte [edx]
test ebx, ebx
je 0x10064f32
and ecx, 0xf
jmp 0x10064f35
shr ecx, 4
mov eax, dword [esp + 0x8c]
add edx, ebp
add esi, 8
movzx eax, byte [eax + ecx*4 + 2]
movd xmm0, eax
mov eax, dword [esp + 0x8c]
cvtdq2pd xmm0, xmm0
movzx eax, byte [eax + ecx*4 + 1]
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
mov eax, dword [esp + 0x8c]
cvtdq2pd xmm0, xmm0
movzx eax, byte [eax + ecx*4]
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub edi, 1
jne 0x10064f22
mov ebx, dword [esp + 0x84]
mov esi, dword [esp + 0x14]
addsd xmm2, xmm5
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm2
mov dword [esp + 0x84], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
addsd xmm3, xmm5
mov byte [ebx + 2], al
add esp, 4
lea edx, [esp + 0x34]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
addsd xmm4, xmm5
mov byte [ebx + 1], al
add esp, 4
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x2c]
add esp, 4
mov byte [ebx], al
mov eax, dword [esp + 0x78]
add ebx, dword [esp + 0x80]
add eax, 0xc
sub dword [esp + 0x18], 1
mov dword [esp + 0x84], ebx
mov dword [esp + 0x78], eax
jne 0x10064ef6
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x90]
inc esi
add ebx, 3
mov dword [esp + 0x14], esi
mov dword [esp + 0x90], ebx
cmp esi, eax
jb 0x10064ea0
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
xor edi, edi
mov dword [esp + 0x14], edi
cmp dword [esp + 0x7c], edi
jbe case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
nop word [eax + eax]
lea eax, [edi + ebx]
mov dword [esp + 0x84], eax
mov eax, edi
shr eax, 1
mov dword [esp + 0x38], eax
test esi, esi
je 0x10065198
mov ebx, dword [esp + 0x44]
add ebx, 8
mov dword [esp + 0x40], 0xff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x78], ebx
mov dword [esp + 0x18], esi
nop dword [eax]
mov ecx, dword [ebx - 4]
xorps xmm1, xmm1
mov esi, dword [ebx]
sub esi, ecx
imul ecx, ebp
add ecx, eax
add ecx, dword [esp + 0x88]
test esi, esi
je 0x1006513c
mov edx, dword [ebx - 8]
and edi, 1
mov ebx, dword [esp + 0x8c]
movzx eax, byte [ecx]
test edi, edi
je 0x10065113
and eax, 0xf
jmp 0x10065116
shr eax, 4
movzx eax, byte [ebx + eax*4]
add ecx, ebp
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub esi, 1
jne 0x10065107
mov ebx, dword [esp + 0x78]
mov edi, dword [esp + 0x14]
addsd xmm1, xmm2
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x78]
cvttsd2si eax, xmm1
mov dword [esp + 0x78], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x88]
add ebx, 0xc
add esp, 4
mov dword [esp + 0x78], ebx
mov byte [edx], al
add edx, dword [esp + 0x80]
sub dword [esp + 0x18], 1
mov eax, dword [esp + 0x38]
mov dword [esp + 0x84], edx
jne 0x100650e0
mov ebx, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
inc edi
mov dword [esp + 0x14], edi
cmp edi, dword [esp + 0x7c]
jb 0x100650a0
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetPitch_4
push ebp
mov esi, eax
call sym.FreeImage.dll__FreeImage_GetBits_4
add eax, dword [esp + 0x84]
mov ebx, esi
imul ebx, dword [esp + 0x88]
push edi
add ebx, eax
mov dword [esp + 0x8c], ebx
call sym.FreeImage.dll__FreeImage_GetBPP_4
cmp eax, 8
je 0x100657e6
cmp eax, 0x18
je 0x1006543e
cmp eax, 0x20
jne case.0x1006435e.2
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov dword [esp + 0x84], ecx
test eax, eax
je case.0x1006435e.2
mov ebx, dword [esp + 0x8c]
movsd xmm6, qword [0x1039c168]
mov edx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
mov ebp, edx
mov dword [esp + 0x8c], ebp
test edi, edi
je 0x10065411
mov eax, dword [esp + 0x44]
add eax, 8
mov dword [esp + 0x40], 0xff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x24], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x18], edi
mov edx, dword [eax - 4]
xorps xmm2, xmm2
mov edi, dword [eax]
xorps xmm3, xmm3
sub edi, edx
xorps xmm4, xmm4
imul edx, esi
xorps xmm5, xmm5
add edx, ecx
add edx, dword [esp + 0x88]
test edi, edi
je 0x1006532c
mov ebp, dword [eax - 8]
nop
movzx ecx, byte [edx]
add edx, esi
movsd xmm1, qword [ebp]
add ebp, 8
movzx eax, byte [ebx + ecx*4 + 2]
movd xmm0, eax
movzx eax, byte [ebx + ecx*4 + 1]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, byte [ebx + ecx*4]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
movzx eax, byte [ebx + ecx*4 + 3]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm5, xmm0
sub edi, 1
jne 0x100652c0
mov ebp, dword [esp + 0x8c]
addsd xmm2, xmm6
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm2
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
addsd xmm3, xmm6
mov byte [ebp + 2], al
add esp, 4
lea edx, [esp + 0x34]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm3
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
addsd xmm4, xmm6
mov byte [ebp + 1], al
add esp, 4
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm4
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
addsd xmm5, xmm6
mov byte [ebp], al
add esp, 4
lea edx, [esp + 0x24]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm5
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x28]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x88]
add esp, 4
mov byte [ebp + 3], al
mov eax, dword [esp + 0x78]
add ebp, dword [esp + 0x80]
add eax, 0xc
sub dword [esp + 0x18], 1
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x78], eax
jne 0x10065295
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
inc ecx
add edx, 4
mov dword [esp + 0x84], ecx
mov dword [esp + 0x90], edx
cmp ecx, eax
jb 0x10065235
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
mov ebp, dword [esp + 0x8c]
test ebp, ebp
je 0x10065631
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov dword [esp + 0x8c], ecx
test eax, eax
je case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
mov edx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
nop dword [eax + eax]
mov ebx, edx
mov dword [esp + 0x84], ebx
test edi, edi
je 0x10065604
mov eax, dword [esp + 0x44]
add eax, 8
mov dword [esp + 0x40], 0xff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x18], edi
mov edx, dword [eax - 4]
xorps xmm2, xmm2
mov edi, dword [eax]
xorps xmm3, xmm3
sub edi, edx
xorps xmm4, xmm4
imul edx, esi
add edx, ecx
add edx, dword [esp + 0x88]
test edi, edi
je 0x1006554a
mov ebx, dword [eax - 8]
movzx ecx, byte [edx]
add edx, esi
movsd xmm1, qword [ebx]
add ebx, 8
movzx eax, byte [ebp + ecx*4 + 2]
movd xmm0, eax
movzx eax, byte [ebp + ecx*4 + 1]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, byte [ebp + ecx*4]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub edi, 1
jne 0x100654f3
mov ebx, dword [esp + 0x84]
addsd xmm2, xmm5
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm2
mov dword [esp + 0x84], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
addsd xmm3, xmm5
mov byte [ebx + 2], al
add esp, 4
lea edx, [esp + 0x34]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
addsd xmm4, xmm5
mov byte [ebx + 1], al
add esp, 4
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x84]
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x90]
add esp, 4
mov byte [ebx], al
mov eax, dword [esp + 0x78]
add ebx, dword [esp + 0x80]
add eax, 0xc
sub dword [esp + 0x18], 1
mov dword [esp + 0x84], ebx
mov dword [esp + 0x78], eax
jne 0x100654d0
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
inc ecx
add edx, 3
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
cmp ecx, eax
jb 0x10065480
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
mov ecx, dword [esp + 0x7c]
xor eax, eax
mov dword [esp + 0x8c], eax
test ecx, ecx
je case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
mov edx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
nop dword [eax]
mov dword [esp + 0x84], edx
test edi, edi
je 0x100657b9
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x3c], 0xff
mov dword [esp + 0x38], 0
mov dword [esp + 0x78], edi
mov ecx, dword [ebp + 4]
xorps xmm1, xmm1
mov edi, dword [ebp + 8]
sub edi, ecx
imul ecx, esi
add ecx, eax
add ecx, ebx
xor ebx, ebx
cmp edi, 4
jb 0x10065723
mov edx, dword [ebp]
lea ebx, [edi - 4]
shr ebx, 2
add edx, 0x10
inc ebx
lea eax, [ebx*4]
mov dword [esp + 0x40], eax
nop dword [eax]
movzx eax, byte [ecx]
add ecx, esi
movd xmm0, eax
movzx eax, byte [ecx]
add ecx, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx - 0x10]
addsd xmm0, xmm1
movd xmm1, eax
movzx eax, byte [ecx]
add ecx, esi
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [edx - 8]
addsd xmm1, xmm0
movd xmm0, eax
movzx eax, byte [ecx]
add ecx, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
addsd xmm0, xmm1
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [edx + 8]
add edx, 0x20
addsd xmm1, xmm0
sub ebx, 1
jne 0x100656c0
mov ebx, dword [esp + 0x40]
cmp ebx, edi
jae 0x1006574d
mov eax, dword [ebp]
sub edi, ebx
lea edx, [eax + ebx*8]
nop
movzx eax, byte [ecx]
add ecx, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub edi, 1
jne 0x10065730
addsd xmm1, xmm2
lea edx, [esp + 0x38]
lea ecx, [esp + 0x40]
cvttsd2si eax, xmm1
mov dword [esp + 0x40], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x88]
add esp, 4
mov ebx, dword [esp + 0x88]
add ebp, 0xc
mov byte [edx + 2], al
mov byte [edx + 1], al
mov byte [edx], al
add edx, dword [esp + 0x80]
sub dword [esp + 0x78], 1
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x84], edx
jne 0x10065687
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
inc eax
add edx, 3
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], edx
cmp eax, ecx
jb 0x10065660
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
mov ebp, dword [esp + 0x8c]
xor edx, edx
mov dword [esp + 0x8c], edx
test ebp, ebp
je 0x1006590b
cmp dword [esp + 0x7c], edx
jbe case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
mov ecx, dword [esp + 0x94]
nop word [eax + eax]
mov eax, dword [esp + 0x90]
add eax, edx
mov dword [esp + 0x84], eax
test ecx, ecx
je 0x100658e6
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x40], 0xff
add ebx, 8
mov dword [esp + 0x3c], 0
mov dword [esp + 0x78], ecx
mov ecx, dword [ebx - 4]
xorps xmm1, xmm1
mov edi, dword [ebx]
sub edi, ecx
imul ecx, esi
add ecx, edx
add ecx, dword [esp + 0x88]
test edi, edi
je 0x10065892
mov edx, dword [ebx - 8]
movzx eax, byte [ecx]
add ecx, esi
movzx eax, byte [ebp + eax*4]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub edi, 1
jne 0x10065870
addsd xmm1, xmm2
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm1
mov dword [esp + 0x38], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x88]
add esp, 4
add ebx, 0xc
mov byte [edx], al
add edx, dword [esp + 0x80]
sub dword [esp + 0x78], 1
mov dword [esp + 0x84], edx
mov edx, dword [esp + 0x8c]
jne 0x10065853
mov ecx, dword [esp + 0x94]
inc edx
mov dword [esp + 0x8c], edx
cmp edx, dword [esp + 0x7c]
jb 0x10065820
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
cmp dword [esp + 0x7c], edx
jbe case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
nop dword [eax]
mov eax, dword [esp + 0x90]
add eax, edx
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x94]
test eax, eax
je 0x10065a71
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x3c], 0xff
mov dword [esp + 0x38], 0
mov dword [esp + 0x78], eax
mov ecx, dword [ebp + 4]
xorps xmm1, xmm1
mov edi, dword [ebp + 8]
sub edi, ecx
imul ecx, esi
add ecx, edx
add ecx, ebx
xor ebx, ebx
cmp edi, 4
jb 0x100659f3
mov edx, dword [ebp]
lea ebx, [edi - 4]
shr ebx, 2
add edx, 0x10
inc ebx
lea eax, [ebx*4]
mov dword [esp + 0x40], eax
nop dword [eax]
movzx eax, byte [ecx]
add ecx, esi
movd xmm0, eax
movzx eax, byte [ecx]
add ecx, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx - 0x10]
addsd xmm0, xmm1
movd xmm1, eax
movzx eax, byte [ecx]
add ecx, esi
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [edx - 8]
addsd xmm1, xmm0
movd xmm0, eax
movzx eax, byte [ecx]
add ecx, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
addsd xmm0, xmm1
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [edx + 8]
add edx, 0x20
addsd xmm1, xmm0
sub ebx, 1
jne 0x10065990
mov ebx, dword [esp + 0x40]
cmp ebx, edi
jae 0x10065a1d
mov eax, dword [ebp]
sub edi, ebx
lea edx, [eax + ebx*8]
nop
movzx eax, byte [ecx]
add ecx, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub edi, 1
jne 0x10065a00
addsd xmm1, xmm2
lea edx, [esp + 0x38]
lea ecx, [esp + 0x40]
cvttsd2si eax, xmm1
mov dword [esp + 0x40], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x88]
add esp, 4
mov ebx, dword [esp + 0x88]
add ebp, 0xc
mov byte [edx], al
add edx, dword [esp + 0x80]
sub dword [esp + 0x78], 1
mov dword [esp + 0x84], edx
mov edx, dword [esp + 0x8c]
jne 0x10065957
inc edx
mov dword [esp + 0x8c], edx
cmp edx, dword [esp + 0x7c]
jb 0x10065920
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetPitch_4
mov esi, eax
shr esi, 1
push ebp
mov dword [esp + 0x1c], esi
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ecx, esi
imul ecx, dword [esp + 0x88]
push ebp
add ecx, dword [esp + 0x88]
lea edi, [eax + ecx*2]
mov dword [esp + 0x90], edi
call sym.FreeImage.dll__FreeImage_GetRedMask_4
cmp eax, 0xf800
jne 0x10065d06
push ebp
call sym.FreeImage.dll__FreeImage_GetGreenMask_4
cmp eax, 0x7e0
jne 0x10065d06
push ebp
call sym.FreeImage.dll__FreeImage_GetBlueMask_4
cmp eax, 0x1f
jne 0x10065d06
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov dword [esp + 0x88], ecx
test eax, eax
je case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
movsd xmm6, qword [0x1039c418]
movsd xmm7, qword [0x1039c378]
mov edx, dword [esp + 0x94]
nop word [eax + eax]
mov ebp, ebx
mov dword [esp + 0x84], ebp
test edx, edx
je 0x10065cd9
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x40], 0xff
add ebx, 8
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x78], edx
nop dword [eax]
mov eax, dword [ebx - 4]
xorps xmm2, xmm2
mov edx, dword [ebx]
xorps xmm3, xmm3
sub edx, eax
xorps xmm4, xmm4
imul eax, esi
add eax, ecx
lea edi, [edi + eax*2]
test edx, edx
je 0x10065c03
lea ebp, [esi + esi]
mov esi, dword [ebx - 8]
movzx ecx, word [edi]
add edi, ebp
movsd xmm1, qword [esi]
mov ax, cx
shr ax, 0xb
add esi, 8
movzx eax, ax
movd xmm0, eax
mov eax, ecx
cvtdq2pd xmm0, xmm0
shr eax, 5
and ecx, 0x1f
and eax, 0x3f
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub edx, 1
jne 0x10065ba2
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x84]
mulsd xmm2, xmm6
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x84]
divsd xmm2, xmm7
addsd xmm2, xmm5
cvttsd2si eax, xmm2
mov dword [esp + 0x84], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
mulsd xmm3, xmm6
lea edx, [esp + 0x38]
mov byte [ebp + 2], al
lea ecx, [esp + 0x88]
add esp, 4
divsd xmm3, qword [0x1039c3c0]
addsd xmm3, xmm5
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
mulsd xmm4, xmm6
lea edx, [esp + 0x30]
mov byte [ebp + 1], al
lea ecx, [esp + 0x88]
add esp, 4
divsd xmm4, xmm7
addsd xmm4, xmm5
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x8c]
add esp, 4
mov edi, dword [esp + 0x8c]
add ebx, 0xc
mov byte [ebp], al
add ebp, dword [esp + 0x80]
sub dword [esp + 0x78], 1
mov dword [esp + 0x84], ebp
jne 0x10065b80
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
inc ecx
add ebx, 3
mov dword [esp + 0x88], ecx
mov dword [esp + 0x90], ebx
cmp ecx, eax
jb 0x10065b30
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov dword [esp + 0x88], ecx
test eax, eax
je case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
movsd xmm6, qword [0x1039c418]
movsd xmm7, qword [0x1039c378]
mov edx, dword [esp + 0x94]
nop word [eax + eax]
mov dword [esp + 0x84], ebx
test edx, edx
je 0x10065edc
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x40], 0xff
add ebp, 8
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x78], edx
nop word [eax + eax]
mov eax, dword [ebp - 4]
xorps xmm2, xmm2
mov edx, dword [ebp]
xorps xmm3, xmm3
sub edx, eax
xorps xmm4, xmm4
imul eax, esi
add eax, ecx
lea edi, [edi + eax*2]
test edx, edx
je 0x10065e12
lea ebx, [esi + esi]
mov esi, dword [ebp - 8]
movzx ecx, word [edi]
add edi, ebx
movsd xmm1, qword [esi]
mov eax, ecx
shr eax, 0xa
add esi, 8
and eax, 0x1f
movd xmm0, eax
mov eax, ecx
cvtdq2pd xmm0, xmm0
shr eax, 5
and ecx, 0x1f
and eax, 0x1f
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub edx, 1
jne 0x10065db3
mov ebx, dword [esp + 0x84]
mov esi, dword [esp + 0x18]
mulsd xmm2, xmm6
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x84]
divsd xmm2, xmm7
addsd xmm2, xmm5
cvttsd2si eax, xmm2
mov dword [esp + 0x84], eax
lea eax, [esp + 0x40]
push eax
call fcn.1005f2e0
mulsd xmm3, xmm6
lea edx, [esp + 0x38]
mov byte [ebx + 2], al
lea ecx, [esp + 0x88]
add esp, 4
divsd xmm3, xmm7
addsd xmm3, xmm5
cvttsd2si eax, xmm3
mov dword [esp + 0x84], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
mulsd xmm4, xmm6
lea edx, [esp + 0x30]
mov byte [ebx + 1], al
lea ecx, [esp + 0x88]
add esp, 4
divsd xmm4, xmm7
addsd xmm4, xmm5
cvttsd2si eax, xmm4
mov dword [esp + 0x84], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x8c]
add esp, 4
mov edi, dword [esp + 0x8c]
add ebp, 0xc
mov byte [ebx], al
add ebx, dword [esp + 0x80]
sub dword [esp + 0x78], 1
mov dword [esp + 0x84], ebx
jne 0x10065d90
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x90]
inc ecx
add ebx, 3
mov dword [esp + 0x88], ecx
mov dword [esp + 0x90], ebx
cmp ecx, eax
jb 0x10065d40
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetPitch_4
push ebp
mov ebx, eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ecx, dword [esp + 0x84]
mov edx, ebx
imul edx, dword [esp + 0x88]
lea ecx, [ecx + ecx*2]
add edx, eax
add edx, ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x88], edx
mov dword [esp + 0x84], ecx
test ecx, ecx
je case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
xor eax, eax
mov dword [esp + 0x7c], eax
nop
mov ebp, dword [esp + 0x90]
add ebp, eax
test esi, esi
je 0x100660b6
mov edi, dword [esp + 0x44]
mov dword [esp + 0x78], 0xff
add edi, 8
mov dword [esp + 0x40], 0
mov dword [esp + 0x38], 0xff
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0xff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x8c], esi
nop
mov ecx, dword [edi - 4]
xorps xmm2, xmm2
mov esi, dword [edi]
xorps xmm3, xmm3
sub esi, ecx
xorps xmm4, xmm4
imul ecx, ebx
add ecx, eax
add ecx, edx
test esi, esi
je 0x10066019
mov edx, dword [edi - 8]
nop
movzx eax, byte [ecx + 2]
movsd xmm1, qword [edx]
add edx, 8
movd xmm0, eax
movzx eax, byte [ecx + 1]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, byte [ecx]
add ecx, ebx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub esi, 1
jne 0x10065fd0
addsd xmm2, xmm5
lea edx, [esp + 0x40]
lea ecx, [esp + 0x3c]
cvttsd2si eax, xmm2
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x78]
push eax
call fcn.1005f2e0
addsd xmm3, xmm5
mov byte [ebp + 2], al
add esp, 4
lea edx, [esp + 0x34]
lea ecx, [esp + 0x3c]
cvttsd2si eax, xmm3
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
push eax
call fcn.1005f2e0
addsd xmm4, xmm5
mov byte [ebp + 1], al
add esp, 4
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x3c]
cvttsd2si eax, xmm4
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x30]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x8c]
add esp, 4
mov byte [ebp], al
add edi, 0xc
add ebp, dword [esp + 0x80]
sub dword [esp + 0x8c], 1
mov eax, dword [esp + 0x7c]
jne 0x10065fb0
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x94]
add eax, 3
sub ecx, 1
mov dword [esp + 0x7c], eax
mov dword [esp + 0x84], ecx
jne 0x10065f60
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetPitch_4
push ebp
mov ebx, eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ecx, ebx
imul ecx, dword [esp + 0x88]
add eax, ecx
mov ecx, dword [esp + 0x84]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x84], eax
xor eax, eax
mov dword [esp + 0x88], eax
test ecx, ecx
je case.0x1006435e.2
movsd xmm6, qword [0x1039c168]
mov edx, dword [esp + 0x90]
nop
shl eax, 2
mov dword [esp + 0x24], eax
lea ebp, [eax + edx]
test esi, esi
je 0x100662fc
mov edi, dword [esp + 0x44]
mov dword [esp + 0x78], 0xff
add edi, 8
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0xff
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0xff
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0xff
mov dword [esp + 0x28], 0
mov dword [esp + 0x8c], esi
mov ecx, dword [edi - 4]
xorps xmm2, xmm2
mov edx, dword [edi]
xorps xmm3, xmm3
sub edx, ecx
xorps xmm4, xmm4
imul ecx, ebx
xorps xmm5, xmm5
add ecx, eax
add ecx, dword [esp + 0x84]
test edx, edx
je 0x10066224
mov esi, dword [edi - 8]
nop word [eax + eax]
movzx eax, byte [ecx + 2]
movsd xmm1, qword [esi]
add esi, 8
movd xmm0, eax
movzx eax, byte [ecx + 1]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, byte [ecx]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
movzx eax, byte [ecx + 3]
add ecx, ebx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm5, xmm0
sub edx, 1
jne 0x100661c0
mov esi, dword [esp + 0x8c]
addsd xmm2, xmm6
lea edx, [esp + 0x40]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm2
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x78]
push eax
call fcn.1005f2e0
addsd xmm3, xmm6
mov byte [ebp + 2], al
add esp, 4
lea edx, [esp + 0x38]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm3
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
addsd xmm4, xmm6
mov byte [ebp + 1], al
add esp, 4
lea edx, [esp + 0x30]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm4
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x34]
push eax
call fcn.1005f2e0
addsd xmm5, xmm6
mov byte [ebp], al
add esp, 4
lea edx, [esp + 0x28]
lea ecx, [esp + 0x8c]
cvttsd2si eax, xmm5
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x2c]
push eax
call fcn.1005f2e0
mov byte [ebp + 3], al
add esp, 4
add ebp, dword [esp + 0x80]
add edi, 0xc
mov eax, dword [esp + 0x24]
sub esi, 1
mov dword [esp + 0x8c], esi
jne 0x10066190
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
mov eax, dword [esp + 0x88]
inc eax
mov dword [esp + 0x88], eax
cmp eax, ecx
jb 0x10066130
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetLine_4
mov ecx, dword [esp + 0x7c]
xor edx, edx
div ecx
mov esi, dword [esp + 0x90]
shr eax, 1
push esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x7c], eax
call sym.FreeImage.dll__FreeImage_GetPitch_4
shr eax, 1
push esi
mov dword [esp + 0x38], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ebx, eax
push ebp
mov dword [esp + 0x84], ebx
call sym.FreeImage.dll__FreeImage_GetPitch_4
mov edi, eax
shr edi, 1
push ebp
mov dword [esp + 0x90], edi
call sym.FreeImage.dll__FreeImage_GetBits_4
mov esi, dword [esp + 0x78]
mov edx, edi
imul edx, dword [esp + 0x88]
mov ecx, esi
imul ecx, dword [esp + 0x84]
add edx, ecx
lea edx, [eax + edx*2]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x90], edx
test eax, eax
je case.0x1006435e.2
movsd xmm2, qword [0x1039c168]
lea ebp, [esi + esi]
xor ecx, ecx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x7c], ecx
nop dword [eax]
cmp dword [esp + 0x94], 0
mov dword [esp + 0x88], ebx
jbe 0x1006653c
mov eax, dword [esp + 0x94]
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x3c], 0xffff
mov dword [esp + 0x38], 0
mov dword [esp + 0x84], eax
mov eax, dword [ebp + 4]
xor ebx, ebx
mov esi, dword [ebp + 8]
xorps xmm1, xmm1
sub esi, eax
imul eax, edi
add eax, ecx
lea ecx, [edx + eax*2]
cmp esi, 4
jb 0x1006649a
mov edx, dword [ebp]
lea ebx, [esi - 4]
shr ebx, 2
add edi, edi
add edx, 0x10
inc ebx
lea eax, [ebx*4]
mov dword [esp + 0x40], eax
nop
movzx eax, word [ecx]
add ecx, edi
movd xmm0, eax
movzx eax, word [ecx]
add ecx, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx - 0x10]
addsd xmm0, xmm1
movd xmm1, eax
movzx eax, word [ecx]
add ecx, edi
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [edx - 8]
addsd xmm1, xmm0
movd xmm0, eax
movzx eax, word [ecx]
add ecx, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
addsd xmm0, xmm1
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [edx + 8]
add edx, 0x20
addsd xmm1, xmm0
sub ebx, 1
jne 0x10066430
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x8c]
cmp ebx, esi
jae 0x100664cd
mov eax, dword [ebp]
add edi, edi
sub esi, ebx
lea edx, [eax + ebx*8]
nop dword [eax + eax]
movzx eax, word [ecx]
add ecx, edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [edx]
add edx, 8
addsd xmm1, xmm0
sub esi, 1
jne 0x100664b0
addsd xmm1, xmm2
lea edx, [esp + 0x38]
lea ecx, [esp + 0x40]
cvttsd2si eax, xmm1
mov dword [esp + 0x40], eax
lea eax, [esp + 0x3c]
push eax
call fcn.1005f2e0
mov edx, dword [esp + 0x8c]
add esp, 4
mov ecx, dword [esp + 0x34]
add ebp, 0xc
sub dword [esp + 0x84], 1
mov edi, dword [esp + 0x8c]
mov word [edx], ax
lea edx, [edx + ecx*2]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x90]
jne 0x100663f7
mov ebx, dword [esp + 0x80]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x78]
mov ebp, dword [esp + 0x30]
add ecx, esi
add ebx, ebp
sub eax, 1
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x18], eax
jne 0x100663c0
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetLine_4
mov ecx, dword [esp + 0x7c]
xor edx, edx
div ecx
mov esi, dword [esp + 0x90]
shr eax, 1
push esi
mov dword [esp + 0x84], ecx
mov dword [esp + 0x7c], eax
call sym.FreeImage.dll__FreeImage_GetPitch_4
shr eax, 1
push esi
mov dword [esp + 0x28], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ebx, eax
push ebp
mov dword [esp + 0x94], ebx
call sym.FreeImage.dll__FreeImage_GetPitch_4
mov edi, eax
shr edi, 1
push ebp
mov dword [esp + 0x44], edi
call sym.FreeImage.dll__FreeImage_GetBits_4
mov esi, dword [esp + 0x78]
mov edx, edi
imul edx, dword [esp + 0x88]
mov ecx, esi
imul ecx, dword [esp + 0x84]
add edx, ecx
lea edx, [eax + edx*2]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x88], edx
test eax, eax
je case.0x1006435e.2
movsd xmm5, qword [0x1039c168]
xor ecx, ecx
mov dword [esp + 0x7c], ecx
nop word [eax + eax]
cmp dword [esp + 0x94], 0
mov ebp, ebx
jbe 0x10066775
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x94]
add ebx, 8
mov dword [esp + 0x84], 0xffff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x34], 0xffff
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0xffff
mov dword [esp + 0x28], 0
mov dword [esp + 0x8c], eax
mov eax, dword [ebx - 4]
xorps xmm2, xmm2
mov esi, dword [ebx]
xorps xmm3, xmm3
sub esi, eax
xorps xmm4, xmm4
imul eax, edi
add eax, ecx
lea ecx, [edx + eax*2]
test esi, esi
je 0x100666cd
mov edx, dword [ebx - 8]
add edi, edi
nop dword [eax]
movzx eax, word [ecx]
movsd xmm1, qword [edx]
add edx, 8
movd xmm0, eax
movzx eax, word [ecx + 2]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, word [ecx + 4]
add ecx, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
sub esi, 1
jne 0x10066680
mov edi, dword [esp + 0x40]
addsd xmm2, xmm5
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm2
mov dword [esp + 0x38], eax
lea eax, [esp + 0x84]
push eax
call fcn.1005f2e0
addsd xmm3, xmm5
mov word [ebp], ax
add esp, 4
lea edx, [esp + 0x30]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm3
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
call fcn.1005f2e0
addsd xmm4, xmm5
mov word [ebp + 2], ax
add esp, 4
lea edx, [esp + 0x28]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm4
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x28]
add esp, 4
mov edx, dword [esp + 0x88]
add ebx, 0xc
sub dword [esp + 0x8c], 1
mov word [ebp + 4], ax
lea ebp, [ebp + ecx*2]
mov ecx, dword [esp + 0x7c]
jne 0x10066658
mov ebx, dword [esp + 0x90]
mov eax, dword [esp + 0x80]
mov esi, dword [esp + 0x78]
add ecx, esi
lea ebx, [ebx + esi*2]
sub eax, 1
mov dword [esp + 0x7c], ecx
lea ebp, [esi + esi]
mov dword [esp + 0x90], ebx
mov dword [esp + 0x80], eax
jne 0x10066600
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetLine_4
mov ecx, dword [esp + 0x7c]
xor edx, edx
div ecx
mov esi, dword [esp + 0x90]
mov edi, eax
mov dword [esp + 0x80], ecx
shr edi, 1
push esi
mov dword [esp + 0x7c], edi
call sym.FreeImage.dll__FreeImage_GetPitch_4
shr eax, 1
push esi
mov dword [esp + 0x20], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov ebx, eax
push ebp
mov dword [esp + 0x94], ebx
call sym.FreeImage.dll__FreeImage_GetPitch_4
mov esi, eax
shr esi, 1
push ebp
mov dword [esp + 0x44], esi
call sym.FreeImage.dll__FreeImage_GetBits_4
mov edx, esi
mov ecx, edi
imul ecx, dword [esp + 0x84]
imul edx, dword [esp + 0x88]
add edx, ecx
lea ecx, [eax + edx*2]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x8c], ecx
test eax, eax
je case.0x1006435e.2
mov edx, dword [esp + 0x78]
xor edi, edi
movsd xmm6, qword [0x1039c168]
mov dword [esp + 0x88], edi
nop
cmp dword [esp + 0x94], 0
mov ebp, ebx
jbe 0x100669fe
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x94]
add ebx, 8
mov dword [esp + 0x84], 0xffff
mov dword [esp + 0x3c], 0
mov dword [esp + 0x34], 0xffff
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0xffff
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0xffff
mov dword [esp + 0x20], 0
mov dword [esp + 0x7c], eax
mov eax, dword [ebx - 4]
xorps xmm2, xmm2
mov edx, dword [ebx]
xorps xmm3, xmm3
sub edx, eax
xorps xmm4, xmm4
imul eax, esi
xorps xmm5, xmm5
add eax, edi
lea ecx, [ecx + eax*2]
test edx, edx
je 0x10066938
lea edi, [esi + esi]
mov esi, dword [ebx - 8]
nop word [eax + eax]
movzx eax, word [ecx]
movsd xmm1, qword [esi]
add esi, 8
movd xmm0, eax
movzx eax, word [ecx + 2]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm2, xmm0
movd xmm0, eax
movzx eax, word [ecx + 4]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm3, xmm0
movd xmm0, eax
movzx eax, word [ecx + 6]
add ecx, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm5, xmm0
sub edx, 1
jne 0x100668d0
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x88]
addsd xmm2, xmm6
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm2
mov dword [esp + 0x38], eax
lea eax, [esp + 0x84]
push eax
call fcn.1005f2e0
addsd xmm3, xmm6
mov word [ebp], ax
add esp, 4
lea edx, [esp + 0x30]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm3
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
call fcn.1005f2e0
addsd xmm4, xmm6
mov word [ebp + 2], ax
add esp, 4
lea edx, [esp + 0x28]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm4
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
call fcn.1005f2e0
addsd xmm5, xmm6
mov word [ebp + 4], ax
add esp, 4
lea edx, [esp + 0x20]
lea ecx, [esp + 0x38]
cvttsd2si eax, xmm5
mov dword [esp + 0x38], eax
lea eax, [esp + 0x24]
push eax
call fcn.1005f2e0
mov ecx, dword [esp + 0x20]
add esp, 4
mov word [ebp + 6], ax
add ebx, 0xc
sub dword [esp + 0x7c], 1
lea ebp, [ebp + ecx*2]
mov ecx, dword [esp + 0x8c]
jne 0x100668a5
mov ebx, dword [esp + 0x90]
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x78]
add edi, edx
lea ebx, [ebx + edx*2]
sub eax, 1
mov dword [esp + 0x88], edi
lea ebp, [edx + edx]
mov dword [esp + 0x90], ebx
mov dword [esp + 0x80], eax
jne 0x10066840
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20
push ebp
call sym.FreeImage.dll__FreeImage_GetLine_4
mov ecx, dword [esp + 0x7c]
xor edx, edx
div ecx
mov esi, dword [esp + 0x90]
mov edi, eax
mov dword [esp + 0x18], ecx
push esi
shr edi, 2
call sym.FreeImage.dll__FreeImage_GetPitch_4
shr eax, 2
push esi
mov dword [esp + 0x40], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov esi, eax
push ebp
mov dword [esp + 0x84], esi
call sym.FreeImage.dll__FreeImage_GetPitch_4
mov ebx, eax
shr ebx, 2
push ebp
mov dword [esp + 0x94], ebx
call sym.FreeImage.dll__FreeImage_GetBits_4
mov edx, ebx
mov ecx, edi
imul edx, dword [esp + 0x88]
imul ecx, dword [esp + 0x84]
add edx, ecx
lea eax, [eax + edx*4]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x7c]
test eax, eax
je case.0x1006435e.2
mov ebp, dword [esp + 0x94]
lea ecx, [edi*4]
xor edx, edx
mov dword [esp + 0x8c], edx
nop dword [eax]
mov ebx, esi
mov dword [esp + 0x88], ebx
test ebp, ebp
je 0x10066d3d
mov esi, dword [esp + 0x44]
add esi, 8
mov dword [esp + 0x78], ebp
mov dword [esp + 0x84], esi
mov ecx, dword [esi - 4]
xorps xmm0, xmm0
mov ebp, dword [esi]
mov eax, ecx
imul eax, dword [esp + 0x90]
movups xmmword [esp + 0x50], xmm0
movups xmmword [esp + 0x60], xmm0
add eax, edx
mov edx, dword [esp + 0x40]
lea edx, [edx + eax*4]
cmp ecx, ebp
jae 0x10066c7d
mov eax, dword [esp + 0x90]
mov ebx, dword [esi - 8]
shl eax, 2
sub ebp, ecx
mov dword [esp + 0x7c], eax
movsd xmm2, qword [ebx]
xor ecx, ecx
movaps xmm3, xmm2
unpcklpd xmm3, xmm3
test edi, edi
je 0x10066c61
cmp edi, 4
jb 0x10066bb6
lea eax, [edi - 1]
lea esi, [esp + 0x50]
lea eax, [edx + eax*4]
cmp esi, eax
lea esi, [esp + edi*8 + 0x48]
ja 0x10066b63
cmp esi, edx
jae 0x10066bb2
mov eax, edi
and eax, 0xfffffffc
nop dword [eax + eax]
movsd xmm0, qword [edx + ecx*4]
movaps xmm1, xmm0
movups xmm0, xmmword [esp + ecx*8 + 0x50]
cvtps2pd xmm1, xmm1
mulpd xmm1, xmm3
addpd xmm1, xmm0
movsd xmm0, qword [edx + ecx*4 + 8]
movups xmmword [esp + ecx*8 + 0x50], xmm1
movaps xmm1, xmm0
movups xmm0, xmmword [esp + ecx*8 + 0x60]
cvtps2pd xmm1, xmm1
mulpd xmm1, xmm3
addpd xmm1, xmm0
movups xmmword [esp + ecx*8 + 0x60], xmm1
add ecx, 4
cmp ecx, eax
jb 0x10066b70
mov eax, dword [esp + 0x7c]
cmp ecx, edi
jae 0x10066c61
mov eax, edi
sub eax, ecx
cmp eax, 4
jb 0x10066c39
lea eax, [ecx + 2]
lea esi, [edi - 3]
lea eax, [edx + eax*4]
movss xmm0, dword [eax - 8]
cvtps2pd xmm0, xmm0
mulsd xmm0, xmm2
addsd xmm0, qword [esp + ecx*8 + 0x50]
movsd qword [esp + ecx*8 + 0x50], xmm0
movss xmm0, dword [eax - 4]
cvtps2pd xmm0, xmm0
mulsd xmm0, xmm2
addsd xmm0, qword [esp + ecx*8 + 0x58]
movsd qword [esp + ecx*8 + 0x58], xmm0
movss xmm0, dword [eax]
cvtps2pd xmm0, xmm0
mulsd xmm0, xmm2
addsd xmm0, qword [esp + ecx*8 + 0x60]
movsd qword [esp + ecx*8 + 0x60], xmm0
movss xmm0, dword [eax + 4]
add eax, 0x10
cvtps2pd xmm0, xmm0
mulsd xmm0, xmm2
addsd xmm0, qword [esp + ecx*8 + 0x68]
movsd qword [esp + ecx*8 + 0x68], xmm0
add ecx, 4
cmp ecx, esi
jb 0x10066bd0
cmp ecx, edi
jae 0x10066c5d
nop dword [eax]
movss xmm0, dword [edx + ecx*4]
cvtps2pd xmm0, xmm0
mulsd xmm0, xmm2
addsd xmm0, qword [esp + ecx*8 + 0x50]
movsd qword [esp + ecx*8 + 0x50], xmm0
inc ecx
cmp ecx, edi
jb 0x10066c40
mov eax, dword [esp + 0x7c]
add edx, eax
add ebx, 8
sub ebp, 1
jne 0x10066b33
mov ebx, dword [esp + 0x88]
mov esi, dword [esp + 0x84]
xor eax, eax
cmp edi, 4
jb 0x10066cd6
lea edx, [edi - 3]
lea ecx, [ebx + 8]
nop word [eax + eax]
movsd xmm0, qword [esp + eax*8 + 0x50]
lea ecx, [ecx + 0x10]
cvtpd2ps xmm0, xmm0
movss dword [ecx - 0x18], xmm0
movsd xmm0, qword [esp + eax*8 + 0x58]
cvtpd2ps xmm0, xmm0
movss dword [ecx - 0x14], xmm0
movsd xmm0, qword [esp + eax*8 + 0x60]
cvtpd2ps xmm0, xmm0
movss dword [ecx - 0x10], xmm0
movsd xmm0, qword [esp + eax*8 + 0x68]
add eax, 4
cvtpd2ps xmm0, xmm0
movss dword [ecx - 0xc], xmm0
cmp eax, edx
jb 0x10066c90
cmp eax, edi
jae 0x10066cf4
nop word [eax + eax]
movsd xmm0, qword [esp + eax*8 + 0x50]
cvtpd2ps xmm0, xmm0
movss dword [ebx + eax*4], xmm0
inc eax
cmp eax, edi
jb 0x10066ce0
mov ecx, dword [esp + 0x3c]
add esi, 0xc
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x84], esi
lea eax, [ecx*4]
add ebx, eax
sub dword [esp + 0x78], 1
mov dword [esp + 0x88], ebx
jne 0x10066af3
mov esi, dword [esp + 0x80]
lea ecx, [edi*4]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x94]
add edx, edi
add esi, ecx
sub eax, 1
mov dword [esp + 0x8c], edx
mov dword [esp + 0x80], esi
mov dword [esp + 0x18], eax
jne 0x10066ad0
lea ecx, [esp + 0x44]
call fcn.10061510
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x20