Function at 0x10109670
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1b20
call fcn.1012bcf0
mov eax, dword [0x1019c020]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov dword [ebp - 0x1b0c], esi
cmp dword [esi + 4], 0
jne 0x101096a9
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012b4a2
mov esp, ebp
pop ebp
ret 0xc
cmp word [esi + 0x16], 8
movd xmm0, dword [esi + 0x10]
movsd xmm1, qword [0x10192158]
cvtdq2pd xmm0, xmm0
push ebx
push edi
divsd xmm1, xmm0
movsd qword [ebp - 0x1b14], xmm1
jne 0x10109935
call sym.FreeImageRender.dll_public:_bool___thiscall_CxImage::IsGrayScale_void_
test al, al
je 0x10109935
push 0x800
lea eax, [ebp - 0xb04]
push 0
push eax
call fcn.1012df50
xor ebx, ebx
add esp, 0xc
cmp dword [esi + 0x10], ebx
jle 0x10109770
movsd xmm1, qword [ebp - 0x1b14]
nop word [eax + eax]
cmp dword [esi + 0x148], 0
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
jne 0x10109770
xor edi, edi
cmp dword [esi + 0xc], edi
jle 0x1010976a
push ebx
push edi
mov ecx, esi
call sym.FreeImageRender.dll_protected:_unsigned_char___thiscall_CxImage::BlindGetPixelIndex_int__int_
movzx eax, al
inc edi
movsd xmm0, qword [ebp + eax*8 - 0xb04]
addsd xmm0, qword [0x10192018]
movsd qword [ebp + eax*8 - 0xb04], xmm0
cmp edi, dword [esi + 0xc]
jl 0x10109736
movsd xmm1, qword [ebp - 0x1b14]
inc ebx
cmp ebx, dword [esi + 0x10]
jl 0x10109710
xorps xmm2, xmm2
xor eax, eax
movsd xmm0, qword [ebp + eax*8 - 0xb04]
movsd xmm1, qword [ebp + eax*8 - 0xafc]
maxsd xmm0, xmm2
movsd xmm2, qword [ebp + eax*8 - 0xae4]
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + eax*8 - 0xaf4]
maxsd xmm0, xmm1
movsd xmm1, qword [ebp + eax*8 - 0xaec]
add eax, 5
maxsd xmm1, xmm0
maxsd xmm2, xmm1
cmp eax, 0xff
jl 0x10109775
mulsd xmm2, qword [ebp + 0xc]
xor eax, eax
nop word [eax + eax]
comisd xmm2, xmmword [ebp + eax*8 - 0xb04]
jb 0x10109823
comisd xmm2, xmmword [ebp + eax*8 - 0xafc]
jb 0x10109822
comisd xmm2, xmmword [ebp + eax*8 - 0xaf4]
jb 0x1010981d
comisd xmm2, xmmword [ebp + eax*8 - 0xaec]
jb 0x10109818
comisd xmm2, xmmword [ebp + eax*8 - 0xae4]
jb 0x10109813
add eax, 5
cmp eax, 0xff
jl 0x101097d0
jmp 0x10109823
add eax, 4
jmp 0x10109823
add eax, 3
jmp 0x10109823
add eax, 2
jmp 0x10109823
inc eax
mov edi, 0xff
lea ecx, [ebp - 0x31c]
nop
comisd xmm2, xmmword [ecx + 0x10]
jb 0x1010986e
comisd xmm2, xmmword [ecx + 8]
jb 0x1010986d
comisd xmm2, xmmword [ecx]
jb 0x10109868
comisd xmm2, xmmword [ecx - 8]
jb 0x10109863
comisd xmm2, xmmword [ecx - 0x10]
jb 0x1010985e
sub edi, 5
sub ecx, 0x28
test edi, edi
jg 0x10109830
jmp 0x1010986e
sub edi, 4
jmp 0x1010986e
sub edi, 3
jmp 0x1010986e
sub edi, 2
jmp 0x1010986e
dec edi
test eax, eax
jne 0x1010987e
cmp edi, 0xff
je 0x1010a3e5
cmp eax, edi
jge 0x1010a3e5
xor ecx, ecx
sub edi, eax
imul ebx, eax, 0xffffff01
mov eax, ebx
cdq
idiv edi
cmp eax, 0xff
jg 0x101098a4
test eax, eax
jns 0x101098a9
xor eax, eax
jmp 0x101098a9
mov eax, 0xff
mov byte [ebp + ecx - 0x204], al
add ebx, 0xff
inc ecx
cmp ecx, 0x100
jl 0x10109890
xor ebx, ebx
cmp dword [esi + 0x10], ebx
jle 0x1010a3e5
nop word [eax + eax]
cmp dword [esi + 0x148], 0
jne 0x1010a3e5
movd xmm0, ebx
xor edi, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [ebp - 0x1b14]
addsd xmm0, qword [0x10192158]
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
cmp dword [esi + 0xc], edi
jle 0x1010992a
push ebx
push edi
mov ecx, esi
call sym.FreeImageRender.dll_protected:_unsigned_char___thiscall_CxImage::BlindGetPixelIndex_int__int_
movzx eax, al
mov ecx, esi
movzx eax, byte [ebp + eax - 0x204]
push eax
push ebx
push edi
call sym.FreeImageRender.dll_protected:_void___thiscall_CxImage::BlindSetPixelIndex_int__int__unsigned_char_
inc edi
cmp edi, dword [esi + 0xc]
jl 0x10109906
inc ebx
cmp ebx, dword [esi + 0x10]
jl 0x101098d0
jmp 0x1010a3e5
mov eax, dword [ebp + 8]
push 0x800
push 0
sub eax, 1
je 0x1010a10e
sub eax, 1
lea eax, [ebp - 0xb04]
push eax
je 0x10109c25
call fcn.1012df50
xor ebx, ebx
add esp, 0xc
cmp dword [esi + 0x10], ebx
jle 0x10109a13
movsd xmm1, qword [ebp - 0x1b14]
nop dword [eax]
nop word [eax + eax]
cmp dword [esi + 0x148], 0
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
jne 0x10109a13
xor edi, edi
cmp dword [esi + 0xc], edi
jle 0x10109a09
push 1
push ebx
push edi
lea eax, [ebp - 0x1b0c]
mov ecx, esi
push eax
call sym.FreeImageRender.dll_protected:_struct_tagRGBQUAD___thiscall_CxImage::BlindGetPixelColor_int__int__bool_
mov eax, dword [ebp - 0x1b0c]
inc edi
movzx ecx, ah
imul edx, ecx, 0x259
movzx ecx, byte [ebp - 0x1b0a]
imul ecx, ecx, 0x132
movzx eax, al
imul eax, eax, 0x75
add edx, ecx
add edx, eax
shr edx, 0xa
movsd xmm0, qword [ebp + edx*8 - 0xb04]
addsd xmm0, qword [0x10192018]
movsd qword [ebp + edx*8 - 0xb04], xmm0
cmp edi, dword [esi + 0xc]
jl 0x101099a6
movsd xmm1, qword [ebp - 0x1b14]
inc ebx
cmp ebx, dword [esi + 0x10]
jl 0x10109980
xorps xmm2, xmm2
xor eax, eax
nop dword [eax + eax]
movsd xmm0, qword [ebp + eax*8 - 0xb04]
movsd xmm1, qword [ebp + eax*8 - 0xafc]
maxsd xmm0, xmm2
movsd xmm2, qword [ebp + eax*8 - 0xae4]
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + eax*8 - 0xaf4]
maxsd xmm0, xmm1
movsd xmm1, qword [ebp + eax*8 - 0xaec]
add eax, 5
maxsd xmm1, xmm0
maxsd xmm2, xmm1
cmp eax, 0xff
jl 0x10109a20
mulsd xmm2, qword [ebp + 0xc]
xor eax, eax
comisd xmm2, xmmword [ebp + eax*8 - 0xb04]
jb 0x10109ac5
comisd xmm2, xmmword [ebp + eax*8 - 0xafc]
jb 0x10109ac4
comisd xmm2, xmmword [ebp + eax*8 - 0xaf4]
jb 0x10109abf
comisd xmm2, xmmword [ebp + eax*8 - 0xaec]
jb 0x10109aba
comisd xmm2, xmmword [ebp + eax*8 - 0xae4]
jb 0x10109ab5
add eax, 5
cmp eax, 0xff
jl 0x10109a72
jmp 0x10109ac5
add eax, 4
jmp 0x10109ac5
add eax, 3
jmp 0x10109ac5
add eax, 2
jmp 0x10109ac5
inc eax
mov edi, 0xff
lea ecx, [ebp - 0x31c]
comisd xmm2, xmmword [ecx + 0x10]
jb 0x10109b0e
comisd xmm2, xmmword [ecx + 8]
jb 0x10109b0d
comisd xmm2, xmmword [ecx]
jb 0x10109b08
comisd xmm2, xmmword [ecx - 8]
jb 0x10109b03
comisd xmm2, xmmword [ecx - 0x10]
jb 0x10109afe
sub edi, 5
sub ecx, 0x28
test edi, edi
jg 0x10109ad0
jmp 0x10109b0e
sub edi, 4
jmp 0x10109b0e
sub edi, 3
jmp 0x10109b0e
sub edi, 2
jmp 0x10109b0e
dec edi
test eax, eax
jne 0x10109b1e
cmp edi, 0xff
je 0x1010a3e5
cmp eax, edi
jge 0x1010a3e5
xor ecx, ecx
sub edi, eax
imul ebx, eax, 0xffffff01
mov eax, ebx
cdq
idiv edi
cmp eax, 0xff
jg 0x10109b44
test eax, eax
jns 0x10109b49
xor eax, eax
jmp 0x10109b49
mov eax, 0xff
mov byte [ebp + ecx - 0x204], al
add ebx, 0xff
inc ecx
cmp ecx, 0x100
jl 0x10109b30
xor ebx, ebx
cmp dword [esi + 0x10], ebx
jle 0x1010a3e5
movsd xmm1, qword [ebp - 0x1b14]
nop dword [eax]
nop word [eax + eax]
cmp dword [esi + 0x148], 0
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm0, qword [0x10192158]
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
jne 0x1010a3e5
xor edi, edi
cmp dword [esi + 0xc], edi
jle 0x10109c16
push 1
push ebx
push edi
lea eax, [ebp - 0x1b08]
mov ecx, esi
push eax
call sym.FreeImageRender.dll_protected:_struct_tagRGBQUAD___thiscall_CxImage::BlindGetPixelColor_int__int__bool_
push dword [ebp - 0x1b08]
call sym.FreeImageRender.dll_public:_static_struct_tagRGBQUAD___cdecl_CxImage::RGBtoYUV_struct_tagRGBQUAD_
mov dword [ebp - 0x1b0c], eax
shr eax, 0x10
movzx eax, al
mov al, byte [ebp + eax - 0x204]
mov byte [ebp - 0x1b0a], al
push dword [ebp - 0x1b0c]
call sym.FreeImageRender.dll_public:_static_struct_tagRGBQUAD___cdecl_CxImage::YUVtoRGB_struct_tagRGBQUAD_
add esp, 8
mov dword [ebp - 0x1b08], eax
mov ecx, esi
push 0
push eax
push ebx
push edi
call sym.FreeImageRender.dll_protected:_void___thiscall_CxImage::BlindSetPixelColor_int__int__struct_tagRGBQUAD__bool_
inc edi
cmp edi, dword [esi + 0xc]
jl 0x10109bb2
movsd xmm1, qword [ebp - 0x1b14]
inc ebx
cmp ebx, dword [esi + 0x10]
jl 0x10109b80
jmp 0x1010a3e5
call fcn.1012df50
push 0x800
lea eax, [ebp - 0x1304]
push 0
push eax
call fcn.1012df50
push 0x800
lea eax, [ebp - 0x1b04]
push 0
push eax
call fcn.1012df50
xor edi, edi
add esp, 0x24
cmp dword [esi + 0x10], edi
jle 0x10109d27
movsd xmm1, qword [ebp - 0x1b14]
nop word [eax + eax]
cmp dword [esi + 0x148], 0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
jne 0x10109d27
xor ebx, ebx
cmp dword [esi + 0xc], ebx
jle 0x10109d1d
nop
push 1
push edi
push ebx
lea eax, [ebp - 0x1b08]
mov ecx, esi
push eax
call sym.FreeImageRender.dll_protected:_struct_tagRGBQUAD___thiscall_CxImage::BlindGetPixelColor_int__int__bool_
movzx eax, byte [ebp - 0x1b06]
inc ebx
movsd xmm1, qword [0x10192018]
movsd xmm0, qword [ebp + eax*8 - 0xb04]
addsd xmm0, xmm1
movsd qword [ebp + eax*8 - 0xb04], xmm0
mov eax, dword [ebp - 0x1b08]
movzx ecx, al
movzx eax, ah
movsd xmm0, qword [ebp + ecx*8 - 0x1b04]
addsd xmm0, xmm1
movsd qword [ebp + ecx*8 - 0x1b04], xmm0
movsd xmm0, qword [ebp + eax*8 - 0x1304]
addsd xmm0, xmm1
movsd qword [ebp + eax*8 - 0x1304], xmm0
cmp ebx, dword [esi + 0xc]
jl 0x10109ca0
movsd xmm1, qword [ebp - 0x1b14]
inc edi
cmp edi, dword [esi + 0x10]
jl 0x10109c70
xorps xmm3, xmm3
xor eax, eax
movaps xmm2, xmm3
nop
movsd xmm0, qword [ebp + eax*8 - 0xb04]
movsd xmm1, qword [ebp + eax*8 - 0xafc]
maxsd xmm0, xmm2
movsd xmm2, qword [ebp + eax*8 - 0xae4]
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + eax*8 - 0xaf4]
maxsd xmm0, xmm1
movsd xmm1, qword [ebp + eax*8 - 0xaec]
add eax, 5
maxsd xmm1, xmm0
maxsd xmm2, xmm1
cmp eax, 0xff
jl 0x10109d30
movsd xmm4, qword [ebp + 0xc]
xor eax, eax
mulsd xmm2, xmm4
nop word [eax + eax]
comisd xmm2, xmmword [ebp + eax*8 - 0xb04]
jb 0x10109da3
inc eax
cmp eax, 0xff
jl 0x10109d90
mov edx, 0xff
nop dword [eax + eax]
comisd xmm2, xmmword [ebp + edx*8 - 0xb04]
jb 0x10109dc0
dec edx
test edx, edx
jg 0x10109db0
movaps xmm2, xmm3
xor ecx, ecx
movsd xmm0, qword [ebp + ecx*8 - 0x1304]
movsd xmm1, qword [ebp + ecx*8 - 0x12fc]
maxsd xmm0, xmm2
movsd xmm2, qword [ebp + ecx*8 - 0x12e4]
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + ecx*8 - 0x12f4]
maxsd xmm0, xmm1
movsd xmm1, qword [ebp + ecx*8 - 0x12ec]
add ecx, 5
maxsd xmm1, xmm0
maxsd xmm2, xmm1
cmp ecx, 0xff
jl 0x10109dc5
mulsd xmm2, xmm4
xor ecx, ecx
nop word [eax + eax]
comisd xmm2, xmmword [ebp + ecx*8 - 0x1304]
jb 0x10109e34
inc ecx
cmp ecx, 0xff
jl 0x10109e20
mov ebx, 0xff
mov dword [ebp - 0x1b08], ebx
nop
comisd xmm2, xmmword [ebp + ebx*8 - 0x1304]
jb 0x10109e50
dec ebx
test ebx, ebx
jg 0x10109e40
mov dword [ebp - 0x1b08], ebx
xor edi, edi
nop dword [eax + eax]
movsd xmm0, qword [ebp + edi*8 - 0x1b04]
movsd xmm1, qword [ebp + edi*8 - 0x1afc]
maxsd xmm0, xmm3
movsd xmm3, qword [ebp + edi*8 - 0x1ae4]
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + edi*8 - 0x1af4]
maxsd xmm0, xmm1
movsd xmm1, qword [ebp + edi*8 - 0x1aec]
add edi, 5
maxsd xmm1, xmm0
maxsd xmm3, xmm1
cmp edi, 0xff
jl 0x10109e60
xor ebx, ebx
mulsd xmm3, xmm4
mov dword [ebp - 0x1b20], ebx
nop dword [eax + eax]
comisd xmm3, xmmword [ebp + ebx*8 - 0x1b04]
jb 0x10109ed4
inc ebx
cmp ebx, 0xff
jl 0x10109ec0
mov edi, 0xff
mov dword [ebp - 0x1b20], ebx
mov dword [ebp - 0x1b18], edi
comisd xmm3, xmmword [ebp + edi*8 - 0x1b04]
jb 0x10109ef5
dec edi
test edi, edi
jg 0x10109ee5
mov dword [ebp - 0x1b18], edi
test eax, eax
jne 0x10109f1f
cmp edx, 0xff
jne 0x10109f1f
test ecx, ecx
jne 0x10109f1f
cmp dword [ebp - 0x1b08], edx
jne 0x10109f1f
test ebx, ebx
jne 0x10109f1f
cmp edi, edx
je 0x1010a3e5
sub dl, al
je 0x10109f80
movzx edx, dl
xor edi, edi
mov dword [ebp - 0x1b1c], edx
mov ebx, 0xff
imul esi, eax, 0xffffff01
nop dword [eax]
mov eax, esi
cdq
idiv dword [ebp - 0x1b1c]
cmp eax, 0xff
jg 0x10109f5d
test eax, eax
jns 0x10109f58
xor eax, eax
jmp 0x10109f60
cmp eax, 0xff
cmovg eax, ebx
mov byte [ebp + edi - 0x104], al
add esi, ebx
inc edi
cmp edi, 0x100
jl 0x10109f40
mov esi, dword [ebp - 0x1b0c]
mov ebx, dword [ebp - 0x1b20]
jmp 0x10109f87
mov byte [ebp + eax - 0x104], al
mov eax, dword [ebp - 0x1b08]
sub al, cl
je 0x10109fe1
movzx eax, al
xor edi, edi
mov dword [ebp - 0x1b1c], eax
mov esi, 0xff
imul ecx, ecx, 0xffffff01
mov eax, ecx
cdq
idiv dword [ebp - 0x1b1c]
cmp eax, 0xff
jg 0x10109fc4
test eax, eax
jns 0x10109fbf
xor eax, eax
jmp 0x10109fc7
cmp eax, 0xff
cmovg eax, esi
mov byte [ebp + edi - 0x204], al
add ecx, esi
inc edi
cmp edi, 0x100
jl 0x10109fa7
mov esi, dword [ebp - 0x1b0c]
jmp 0x10109fe8
mov byte [ebp + ecx - 0x204], cl
mov eax, dword [ebp - 0x1b18]
sub al, bl
je 0x1010a046
movzx eax, al
xor ecx, ecx
imul edi, ebx, 0xffffff01
mov esi, 0xff
mov dword [ebp - 0x1b1c], eax
mov ebx, eax
nop word [eax + eax]
mov eax, edi
cdq
idiv ebx
cmp eax, 0xff
jg 0x1010a029
test eax, eax
jns 0x1010a024
xor eax, eax
jmp 0x1010a02c
cmp eax, 0xff
cmovg eax, esi
mov byte [ebp + ecx - 0x304], al
add edi, esi
inc ecx
cmp ecx, 0x100
jl 0x1010a010
mov esi, dword [ebp - 0x1b0c]
jmp 0x1010a04d
mov byte [ebp + ebx - 0x304], bl
xor ebx, ebx
cmp dword [esi + 0x10], ebx
jle 0x1010a3e5
movsd xmm1, qword [ebp - 0x1b14]
cmp dword [esi + 0x148], 0
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm0, qword [0x10192158]
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
jne 0x1010a3e5
xor edi, edi
cmp dword [esi + 0xc], edi
jle 0x1010a0ff
push 1
push ebx
push edi
lea eax, [ebp - 0x1b08]
mov ecx, esi
push eax
call sym.FreeImageRender.dll_protected:_struct_tagRGBQUAD___thiscall_CxImage::BlindGetPixelColor_int__int__bool_
movzx eax, byte [ebp - 0x1b06]
mov ecx, esi
push 0
mov al, byte [ebp + eax - 0x104]
mov byte [ebp - 0x1b06], al
movzx eax, byte [ebp - 0x1b08]
mov al, byte [ebp + eax - 0x304]
mov byte [ebp - 0x1b08], al
movzx eax, byte [ebp - 0x1b07]
mov al, byte [ebp + eax - 0x204]
mov byte [ebp - 0x1b07], al
push dword [ebp - 0x1b08]
push ebx
push edi
call sym.FreeImageRender.dll_protected:_void___thiscall_CxImage::BlindSetPixelColor_int__int__struct_tagRGBQUAD__bool_
inc edi
cmp edi, dword [esi + 0xc]
jl 0x1010a092
movsd xmm1, qword [ebp - 0x1b14]
inc ebx
cmp ebx, dword [esi + 0x10]
jl 0x1010a060
jmp 0x1010a3e5
lea eax, [ebp - 0xb04]
push eax
call fcn.1012df50
xor edi, edi
add esp, 0xc
cmp dword [esi + 0x10], edi
jle 0x1010a1e7
movsd xmm1, qword [ebp - 0x1b14]
cmp dword [esi + 0x148], 0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
jne 0x1010a1e7
xor ebx, ebx
cmp dword [esi + 0xc], ebx
jle 0x1010a1dd
nop
push 1
push edi
push ebx
lea eax, [ebp - 0x1b18]
mov ecx, esi
push eax
call sym.FreeImageRender.dll_protected:_struct_tagRGBQUAD___thiscall_CxImage::BlindGetPixelColor_int__int__bool_
movzx eax, byte [ebp - 0x1b16]
inc ebx
movsd xmm1, qword [0x10192018]
movsd xmm0, qword [ebp + eax*8 - 0xb04]
addsd xmm0, xmm1
movsd qword [ebp + eax*8 - 0xb04], xmm0
mov eax, dword [ebp - 0x1b18]
movzx ecx, al
movzx eax, ah
movsd xmm0, qword [ebp + ecx*8 - 0xb04]
addsd xmm0, xmm1
movsd qword [ebp + ecx*8 - 0xb04], xmm0
movsd xmm0, qword [ebp + eax*8 - 0xb04]
addsd xmm0, xmm1
movsd qword [ebp + eax*8 - 0xb04], xmm0
cmp ebx, dword [esi + 0xc]
jl 0x1010a160
movsd xmm1, qword [ebp - 0x1b14]
inc edi
cmp edi, dword [esi + 0x10]
jl 0x1010a130
xorps xmm2, xmm2
xor eax, eax
nop dword [eax]
movsd xmm0, qword [ebp + eax*8 - 0xb04]
movsd xmm1, qword [ebp + eax*8 - 0xafc]
maxsd xmm0, xmm2
movsd xmm2, qword [ebp + eax*8 - 0xae4]
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + eax*8 - 0xaf4]
maxsd xmm0, xmm1
movsd xmm1, qword [ebp + eax*8 - 0xaec]
add eax, 5
maxsd xmm1, xmm0
maxsd xmm2, xmm1
cmp eax, 0xff
jl 0x1010a1f0
mulsd xmm2, qword [ebp + 0xc]
xor eax, eax
comisd xmm2, xmmword [ebp + eax*8 - 0xb04]
jb 0x1010a295
comisd xmm2, xmmword [ebp + eax*8 - 0xafc]
jb 0x1010a294
comisd xmm2, xmmword [ebp + eax*8 - 0xaf4]
jb 0x1010a28f
comisd xmm2, xmmword [ebp + eax*8 - 0xaec]
jb 0x1010a28a
comisd xmm2, xmmword [ebp + eax*8 - 0xae4]
jb 0x1010a285
add eax, 5
cmp eax, 0xff
jl 0x1010a242
jmp 0x1010a295
add eax, 4
jmp 0x1010a295
add eax, 3
jmp 0x1010a295
add eax, 2
jmp 0x1010a295
inc eax
mov edi, 0xff
lea ecx, [ebp - 0x31c]
comisd xmm2, xmmword [ecx + 0x10]
jb 0x1010a2de
comisd xmm2, xmmword [ecx + 8]
jb 0x1010a2dd
comisd xmm2, xmmword [ecx]
jb 0x1010a2d8
comisd xmm2, xmmword [ecx - 8]
jb 0x1010a2d3
comisd xmm2, xmmword [ecx - 0x10]
jb 0x1010a2ce
sub edi, 5
sub ecx, 0x28
test edi, edi
jg 0x1010a2a0
jmp 0x1010a2de
sub edi, 4
jmp 0x1010a2de
sub edi, 3
jmp 0x1010a2de
sub edi, 2
jmp 0x1010a2de
dec edi
test eax, eax
jne 0x1010a2ee
cmp edi, 0xff
je 0x1010a3e5
cmp eax, edi
jge 0x1010a3e5
xor ecx, ecx
sub edi, eax
imul ebx, eax, 0xffffff01
mov eax, ebx
cdq
idiv edi
cmp eax, 0xff
jg 0x1010a314
test eax, eax
jns 0x1010a319
xor eax, eax
jmp 0x1010a319
mov eax, 0xff
mov byte [ebp + ecx - 0x104], al
add ebx, 0xff
inc ecx
cmp ecx, 0x100
jl 0x1010a300
xor ebx, ebx
cmp dword [esi + 0x10], ebx
jle 0x1010a3e5
nop word [eax + eax]
cmp dword [esi + 0x148], 0
jne 0x1010a3e5
movd xmm0, ebx
xor edi, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [ebp - 0x1b14]
addsd xmm0, qword [0x10192158]
cvttsd2si eax, xmm0
mov dword [esi + 0x144], eax
cmp dword [esi + 0xc], edi
jle 0x1010a3db
push 1
push ebx
push edi
lea eax, [ebp - 0x1b08]
mov ecx, esi
push eax
call sym.FreeImageRender.dll_protected:_struct_tagRGBQUAD___thiscall_CxImage::BlindGetPixelColor_int__int__bool_
movzx eax, byte [ebp - 0x1b06]
mov ecx, esi
push 0
mov al, byte [ebp + eax - 0x104]
mov byte [ebp - 0x1b06], al
movzx eax, byte [ebp - 0x1b08]
mov al, byte [ebp + eax - 0x104]
mov byte [ebp - 0x1b08], al
movzx eax, byte [ebp - 0x1b07]
mov al, byte [ebp + eax - 0x104]
mov byte [ebp - 0x1b07], al
push dword [ebp - 0x1b08]
push ebx
push edi
call sym.FreeImageRender.dll_protected:_void___thiscall_CxImage::BlindSetPixelColor_int__int__struct_tagRGBQUAD__bool_
inc edi
cmp edi, dword [esi + 0xc]
jl 0x1010a376
inc ebx
cmp ebx, dword [esi + 0x10]
jl 0x1010a340
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.1012b4a2
mov esp, ebp
pop ebp
ret 0xc