Function at 0x100204b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push str.CSC_:_CalcDiff_Start
mov dword [ebp - 8], ecx
call fcn.10025e80
push str.CSC_:_CalcDiff____Allocation_memory_Start
call fcn.10025e80
xor ecx, ecx
mov eax, esi
mov edi, 8
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100c00fe
mov dword [ebp - 4], eax
xor ecx, ecx
mov eax, esi
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100c00fe
push str.CSC_:_CalcDiff____Allocation_memory_End
mov dword [ebp - 0xc], eax
lea ebx, [edi - 5]
call fcn.10025e80
mov eax, dword [ebp + 0x14]
add esp, 0x14
cmp eax, dword [ebp + 0x1c]
mov edx, eax
mov ecx, dword [ebp + 0x10]
cmovge edx, dword [ebp + 0x1c]
mov dword [ebp - 0x14], edx
lea edx, [ecx - 1]
sub ecx, eax
mov eax, dword [ebp + 0x18]
add eax, dword [ebp + 0x14]
cmp eax, edx
jle 0x1002053b
lea eax, [ecx - 1]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp - 0x14]
mov edi, dword [ebp + 0x14]
cmp eax, 5
mov dword [ebp + 0x10], eax
mov eax, 5
cmovl eax, dword [ebp + 0x10]
add edi, ebx
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x18]
add eax, edi
mov edi, dword [ebp - 8]
cmp eax, edx
jle 0x1002056a
mov ebx, ecx
sub ebx, dword [ebp + 0x18]
dec ebx
push str.CSC_:_CalcDiff____Caculation_Gradation_Start
call fcn.10025e80
xor ecx, ecx
add esp, 4
mov dword [ebp - 0x10], ecx
test esi, esi
jle 0x1002067b
mov eax, dword [ebp + 0x14]
mov edi, eax
sub edi, dword [ebp - 0x14]
add eax, ebx
sub edi, dword [ebp + 0x1c]
add eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
nop word [eax + eax]
xor eax, eax
xor edx, edx
mov dword [ebp + 0x1c], eax
cmp edi, dword [ebp + 0x10]
jge 0x100205f1
mov ebx, dword [ebp + 8]
lea eax, [esi + esi]
mov dword [ebp - 0x20], eax
mov eax, edi
imul eax, esi
add eax, ecx
lea ebx, [ebx + eax*2]
lea eax, [edi + 1]
mov edi, dword [ebp + 0x10]
imul eax, esi
add eax, ecx
mov ecx, dword [ebp + 8]
sub edi, dword [ebp - 0x1c]
mov dword [ebp + 0x1c], edi
lea esi, [ecx + eax*2]
movzx ecx, word [esi]
movzx eax, word [ebx]
add esi, dword [ebp - 0x20]
sub ecx, eax
add ebx, dword [ebp - 0x20]
add edx, ecx
sub edi, 1
jne 0x100205d6
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x14]
add edi, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x10]
cmp edi, dword [ebp - 0x18]
jge 0x1002064f
mov ebx, dword [ebp + 8]
lea eax, [esi + esi]
mov dword [ebp - 0x24], eax
mov eax, edi
imul eax, esi
add eax, ecx
lea ebx, [ebx + eax*2]
lea eax, [edi + 1]
mov dword [ebp - 0x20], ebx
mov edi, dword [ebp - 0x18]
imul eax, esi
add eax, ecx
mov ecx, dword [ebp + 8]
lea esi, [ecx + eax*2]
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
sub edi, eax
add dword [ebp + 0x1c], edi
movzx eax, word [ebx]
movzx ecx, word [esi]
add esi, dword [ebp - 0x24]
sub ecx, eax
add ebx, dword [ebp - 0x24]
add edx, ecx
sub edi, 1
jne 0x10020631
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x1c]
movd xmm0, eax
movd xmm1, edx
cvtdq2ps xmm1, xmm1
mov eax, dword [ebp + 0x2c]
mov edi, dword [ebp - 0x1c]
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [eax + ecx*4], xmm1
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, esi
jl 0x100205a0
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____Caculation_Gradation_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x100206c1
xor ebx, ebx
test esi, esi
jle 0x100206c1
lea eax, [edi + 0x3c]
mov dword [ebp + 0x1c], eax
mov edi, eax
nop dword [eax]
mov eax, dword [ebp + 0x2c]
lea ecx, [ebp + 0x1c]
push 2
push ecx
mov ecx, edi
cvttss2si eax, dword [eax + ebx*4]
cwde
mov dword [ebp + 0x1c], eax
mov eax, dword [edi]
call dword [eax + 0x3c]
inc ebx
cmp ebx, esi
jl 0x100206a0
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____MedFilt_1_Start
call fcn.10025e80
add esp, 4
mov ecx, edi
push 0x19
push esi
push dword [ebp + 0x2c]
call fcn.10021b00
push str.CSC_:_CalcDiff____MedFilt_1_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x10020731
push str.CSC_:_CalcDiff____Writing_Log_2
call fcn.10025e80
add esp, 4
xor ebx, ebx
test esi, esi
jle 0x10020731
lea eax, [edi + 0x3c]
mov dword [ebp + 0x1c], eax
mov edi, eax
nop dword [eax]
mov eax, dword [ebp + 0x2c]
lea ecx, [ebp + 0x1c]
push 2
push ecx
mov ecx, edi
cvttss2si eax, dword [eax + ebx*4]
cwde
mov dword [ebp + 0x1c], eax
mov eax, dword [edi]
call dword [eax + 0x3c]
inc ebx
cmp ebx, esi
jl 0x10020710
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____Memory_fill_Start
call fcn.10025e80
add esp, 4
xor edx, edx
test esi, esi
jle 0x10020837
mov eax, dword [ebp - 0x14]
add eax, dword [ebp + 0x18]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x28]
movsd xmm3, qword [0x1031f0d8]
movd xmm5, eax
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
imul eax, esi
movsd xmm4, qword [0x1031f0e0]
cvtdq2ps xmm5, xmm5
mov dword [ebp + 0x1c], ecx
lea ebx, [ebx + eax*2]
mov eax, dword [ebp + 0x10]
imul eax, esi
mov esi, dword [ebp + 8]
lea eax, [esi + eax*2]
mov esi, dword [ebp + 0xc]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x2c]
sub eax, ecx
mov dword [ebp + 0x2c], eax
movzx eax, word [ebx]
movd xmm2, eax
mov eax, dword [ebp + 0x2c]
cvtdq2ps xmm2, xmm2
movss xmm1, dword [eax + ecx]
mov eax, dword [ebp + 0x18]
mulss xmm1, xmm5
movzx eax, word [eax]
movd xmm0, eax
mov eax, dword [ebp - 4]
cvtdq2ps xmm0, xmm0
addss xmm1, xmm0
subss xmm2, xmm1
cvtps2pd xmm0, xmm2
movsd qword [eax + edx*8], xmm0
movzx eax, word [ebx]
movd xmm0, eax
xor eax, eax
cvtdq2pd xmm0, xmm0
cmp dword [0x103c9a60], eax
je 0x100207fb
comisd xmm0, xmm3
setb al
mov dword [ecx], eax
xor ecx, ecx
movzx eax, word [ebx]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm0, xmm3
jmp 0x10020815
comisd xmm0, xmm4
setb al
mov dword [ecx], eax
xor ecx, ecx
movzx eax, word [ebx]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm0, xmm4
mov eax, dword [edi + 0x60]
setb cl
add dword [ebp + 0x18], 2
add ebx, 2
mov dword [eax + edx*4], ecx
inc edx
mov ecx, dword [ebp + 0x1c]
add ecx, 4
mov dword [ebp + 0x1c], ecx
cmp edx, esi
jl 0x10020794
push str.CSC_:_CalcDiff____Memory_fill_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x100208b1
push str.CSC_:_CalcDiff____Writing_Log_3
call fcn.10025e80
add esp, 4
xor ebx, ebx
test esi, esi
jle 0x10020885
lea ecx, [edi + 0x3c]
mov edi, dword [ebp - 4]
mov dword [ebp + 0x14], ecx
cvttsd2si eax, qword [edi + ebx*8]
push 2
lea edx, [ebp + 0x18]
push edx
cwde
mov dword [ebp + 0x18], eax
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x14]
inc ebx
cmp ebx, esi
jl 0x10020866
mov edi, dword [ebp - 8]
xor ebx, ebx
test esi, esi
jle 0x100208b1
lea ecx, [edi + 0x3c]
mov edi, dword [ebp + 0x28]
mov dword [ebp + 0x14], ecx
movsx eax, word [edi + ebx*4]
lea edx, [ebp + 0x18]
mov dword [ebp + 0x18], eax
mov eax, dword [ecx]
push 2
push edx
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x14]
inc ebx
cmp ebx, esi
jl 0x10020894
mov edi, dword [ebp - 8]
cmp byte [edi + 0x65], 0
mov dword [edi + 0x20], 0x2bd
je 0x100208f1
xor ebx, ebx
test esi, esi
jle 0x100208f1
lea eax, [edi + 0x3c]
mov dword [ebp + 0x18], eax
mov edi, eax
nop dword [eax]
mov eax, dword [ebp - 0xc]
lea ecx, [ebp + 0x18]
push 2
push ecx
mov ecx, edi
cvttsd2si eax, qword [eax + ebx*8]
cwde
mov dword [ebp + 0x18], eax
mov eax, dword [edi]
call dword [eax + 0x3c]
inc ebx
cmp ebx, esi
jl 0x100208d0
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____Flatten_Grad_area_Start
call fcn.10025e80
mov edx, dword [ebp - 4]
add esp, 4
xor ebx, ebx
cmp esi, 4
jl 0x1002096a
mov edi, dword [ebp - 0xc]
lea ecx, [edx + 0x18]
mov ebx, edx
sub ebx, edi
mov dword [ebp + 0x18], ebx
lea ebx, [esi - 4]
shr ebx, 2
lea eax, [edi + 8]
inc ebx
lea edi, [ebx*4]
mov dword [ebp + 0x14], edi
mov edi, dword [ebp + 0x18]
nop dword [eax]
movsd xmm0, qword [ecx - 0x18]
lea eax, [eax + 0x20]
movsd qword [eax - 0x28], xmm0
lea ecx, [ecx + 0x20]
movsd xmm0, qword [eax + edi - 0x20]
movsd qword [eax - 0x20], xmm0
movsd xmm0, qword [ecx - 0x28]
movsd qword [eax - 0x18], xmm0
movsd xmm0, qword [ecx - 0x20]
movsd qword [eax - 0x10], xmm0
sub ebx, 1
jne 0x10020930
mov edi, dword [ebp - 8]
mov ebx, dword [ebp + 0x14]
cmp ebx, esi
jge 0x10020992
mov ecx, dword [ebp - 0xc]
sub edx, ecx
lea eax, [ecx + ebx*8]
mov ecx, esi
sub ecx, ebx
nop word [eax + eax]
movsd xmm0, qword [eax + edx]
lea eax, [eax + 8]
movsd qword [eax - 8], xmm0
sub ecx, 1
jne 0x10020980
mov ebx, dword [ebp - 0xc]
mov ecx, edi
push 0xb
push esi
push ebx
call fcn.100201f0
lea eax, [esi - 5]
mov dword [ebp + 0x18], eax
test eax, eax
jle 0x10020a27
movsd xmm0, qword [ebx + 8]
add ebx, 8
movsd xmm4, qword [0x1031f0d0]
mov esi, eax
nop dword [eax]
movsd xmm1, qword [ebx - 8]
lea ecx, [ebx + 8]
movsd xmm2, qword [ecx]
subsd xmm0, xmm1
subsd xmm2, xmm1
addsd xmm2, xmm0
movsd xmm0, qword [ebx + 0x10]
subsd xmm0, xmm1
addsd xmm2, xmm0
movsd xmm0, qword [ebx + 0x18]
subsd xmm0, xmm1
addsd xmm2, xmm0
movsd xmm0, qword [ebx + 0x20]
subsd xmm0, xmm1
addsd xmm2, xmm0
divsd xmm2, xmm4
cvttsd2si eax, xmm2
cdq
xor eax, edx
sub eax, edx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movsd qword [ebx - 8], xmm0
mov ebx, ecx
movsd xmm0, qword [ecx]
sub esi, 1
jne 0x100209c0
mov esi, dword [ebp + 0xc]
push str.CSC_:_CalcDiff____Flatten_Grad_area_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x10020a69
xor ebx, ebx
test esi, esi
jle 0x10020a69
lea eax, [edi + 0x3c]
mov dword [ebp + 0x18], eax
mov edi, eax
mov eax, dword [ebp - 0xc]
lea ecx, [ebp + 0x18]
push 2
push ecx
mov ecx, edi
cvttsd2si eax, qword [eax + ebx*8]
cwde
mov dword [ebp + 0x18], eax
mov eax, dword [edi]
call dword [eax + 0x3c]
inc ebx
cmp ebx, esi
jl 0x10020a48
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____Processing_Masked_Avg_Start
call fcn.10025e80
mov ebx, dword [ebp + 0x28]
add esp, 4
mov ecx, edi
push esi
push ebx
push dword [ebp - 0xc]
call fcn.100236f0
fstp qword [ebp - 0x28]
cvttsd2si eax, qword [ebp - 0x28]
xor edx, edx
test esi, esi
jle 0x10020ada
movd xmm2, eax
cvtdq2ps xmm2, xmm2
mulss xmm2, dword [0x1031f0b0]
mov ecx, dword [ebp - 0xc]
xorps xmm1, xmm1
cvtss2sd xmm1, xmm2
movsd xmm0, qword [ecx + edx*8]
comisd xmm0, xmm1
jbe 0x10020abb
xor eax, eax
jmp 0x10020abe
mov eax, dword [ebx + edx*4]
mov dword [ebx + edx*4], eax
movsd xmm0, qword [ecx + edx*8]
xor ecx, ecx
mov eax, dword [edi + 0x5c]
comisd xmm0, xmm1
setbe cl
mov dword [eax + edx*4], ecx
inc edx
cmp edx, esi
jl 0x10020aa2
push str.CSC_:_CalcDiff____Processing_Masked_Avg_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x10020b1d
xor ebx, ebx
test esi, esi
jle 0x10020b1d
lea ecx, [edi + 0x3c]
mov edi, dword [ebp + 0x28]
mov dword [ebp + 0x14], ecx
nop dword [eax]
movsx eax, word [edi + ebx*4]
lea edx, [ebp + 0x18]
mov dword [ebp + 0x18], eax
mov eax, dword [ecx]
push 2
push edx
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x14]
inc ebx
cmp ebx, esi
jl 0x10020b00
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____Masked_Med__Avg_Filt_Start
call fcn.10025e80
add esp, 4
mov ecx, edi
push 0x15
push esi
push dword [edi + 0x5c]
call fcn.100216e0
mov ebx, dword [ebp - 4]
mov ecx, edi
push 0x12d
push esi
push dword [edi + 0x5c]
push ebx
call fcn.10021360
push str.CSC_:_CalcDiff____Masked_Med__Avg_Filt_End
call fcn.10025e80
push str.CSC_:_CalcDiff____Avg_Start
call fcn.10025e80
add esp, 8
mov ecx, edi
push esi
push ebx
call fcn.10023600
fstp qword [ebp - 0x28]
cvttsd2si edx, qword [ebp - 0x28]
xor ecx, ecx
cmp esi, 4
jl 0x10020be5
movd xmm0, edx
lea eax, [esi - 3]
cvtdq2pd xmm0, xmm0
mov dword [ebp + 0x18], eax
lea edx, [ebx + 0x10]
mov esi, eax
nop dword [eax]
mov eax, dword [edi + 0x60]
mov ebx, eax
cmp dword [eax + ecx*4], 0
jne 0x10020ba5
movsd qword [edx - 0x10], xmm0
mov eax, dword [edi + 0x60]
mov ebx, eax
cmp dword [eax + ecx*4 + 4], 0
jne 0x10020bb6
movsd qword [edx - 8], xmm0
mov eax, dword [edi + 0x60]
mov ebx, eax
cmp dword [eax + ecx*4 + 8], 0
jne 0x10020bc4
movsd qword [edx], xmm0
mov ebx, dword [edi + 0x60]
cmp dword [ebx + ecx*4 + 0xc], 0
jne 0x10020bd0
movsd qword [edx + 8], xmm0
add ecx, 4
add edx, 0x20
cmp ecx, esi
jl 0x10020b90
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp - 4]
cvttsd2si edx, qword [ebp - 0x28]
cmp ecx, esi
jge 0x10020c0b
nop dword [eax]
mov eax, dword [edi + 0x60]
cmp dword [eax + ecx*4], 0
jne 0x10020c06
movd xmm0, edx
cvtdq2pd xmm0, xmm0
movsd qword [ebx + ecx*8], xmm0
inc ecx
cmp ecx, esi
jl 0x10020bf0
push str.CSC_:_CalcDiff____Avg_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x10020c4f
xor ebx, ebx
test esi, esi
jle 0x10020c4f
lea ecx, [edi + 0x3c]
mov edi, dword [ebp - 4]
mov dword [ebp + 0x14], ecx
nop dword [eax]
cvttsd2si eax, qword [edi + ebx*8]
push 2
lea edx, [ebp + 0x18]
push edx
cwde
mov dword [ebp + 0x18], eax
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x14]
inc ebx
cmp ebx, esi
jl 0x10020c30
mov edi, dword [ebp - 8]
push str.CSC_:_CalcDiff____Avg_Filter_Start
call fcn.10025e80
mov eax, dword [edi + 0x20]
add esp, 4
cmp byte [ebp + 0x20], 0
mov ecx, edi
push eax
push esi
push dword [ebp - 4]
jne 0x10020c73
call fcn.100201f0
jmp 0x10020c78
call fcn.10022270
push str.CSC_:_CalcDiff____Avg_Filter_End
call fcn.10025e80
add esp, 4
cmp byte [edi + 0x65], 0
je 0x10020cbe
xor ebx, ebx
test esi, esi
jle 0x10020cbe
lea ecx, [edi + 0x3c]
mov edi, dword [ebp - 4]
mov dword [ebp + 0x18], ecx
nop word [eax + eax]
cvttsd2si eax, qword [edi + ebx*8]
push 2
lea edx, [ebp + 0x20]
push edx
cwde
mov dword [ebp + 0x20], eax
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x18]
inc ebx
cmp ebx, esi
jl 0x10020ca0
jmp 0x10020cc1
mov edi, dword [ebp - 4]
xor ecx, ecx
test esi, esi
jle 0x10020d5d
mov ebx, dword [ebp + 0x24]
cmp esi, 8
jb 0x10020d44
lea eax, [esi - 1]
lea eax, [edi + eax*8]
lea edx, [ebx - 4]
lea edx, [edx + esi*4]
cmp ebx, eax
ja 0x10020ce7
cmp edx, edi
jae 0x10020d44
mov eax, esi
and eax, reloc.OLEAUT32.dll_VariantInit
jns 0x10020cf5
dec eax
or eax, 0xfffffff8
inc eax
mov edx, esi
sub edx, eax
lea eax, [ebx + 0x10]
mov dword [ebp + 0x20], edx
lea edx, [edi + 0x20]
movups xmm0, xmmword [edx - 0x20]
add ecx, 8
lea edx, [edx + 0x40]
lea eax, [eax + 0x20]
cvttpd2dq xmm0, xmm0
movq qword [eax - 0x30], xmm0
movups xmm0, xmmword [edx - 0x50]
cvttpd2dq xmm0, xmm0
movq qword [eax - 0x28], xmm0
movups xmm0, xmmword [edx - 0x40]
cvttpd2dq xmm0, xmm0
movq qword [eax - 0x20], xmm0
movups xmm0, xmmword [edx - 0x30]
cvttpd2dq xmm0, xmm0
movq qword [eax - 0x18], xmm0
cmp ecx, dword [ebp + 0x20]
jl 0x10020d02
cmp ecx, esi
jge 0x10020d5d
nop dword [eax + eax]
cvttsd2si eax, qword [edi + ecx*8]
mov dword [ebx + ecx*4], eax
inc ecx
cmp ecx, esi
jl 0x10020d50
push str.CSC_:_CalcDiff____De_allocation_memory_Start
call fcn.10025e80
push edi
call fcn.100c0107
push dword [ebp - 0xc]
call fcn.100c0107
push str.CSC_:_CalcDiff____De_allocation_memory_End
call fcn.10025e80
cvttsd2si eax, qword [ebp - 0x28]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28