Function at 0x10042100
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x24
push ebx
push ebp
push esi
xor esi, esi
push edi
cmp eax, esi
je 0x1004214f
mov eax, dword [eax]
lea ecx, [eax + 0x128]
mov edx, ecx
and edx, 0xf
je 0x10042129
mov eax, 0x10
sub eax, edx
jmp 0x1004212b
xor eax, eax
mov eax, dword [eax + ecx + 0xc]
mov edx, ecx
and edx, 0xf
mov dword [esp + 0x18], eax
je 0x10042234
mov eax, 0x10
sub eax, edx
mov ecx, dword [eax + ecx + 0x10]
mov dword [esp + 0x1c], ecx
jmp 0x10042157
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x18]
cdq
mov edi, eax
mov eax, dword [esp + 0x1c]
xor edi, edx
sub edi, edx
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
cmp edi, esi
jle 0x100423a1
cmp ebx, esi
jle 0x100423a1
push 4
call fcn.1014f4ab
mov ebp, eax
add esp, 4
mov dword [esp + 0x20], ebp
cmp ebp, esi
je 0x100423a1
xor eax, eax
push edi
push esi
lea ecx, [eax + 8]
mov edx, ebx
call fcn.100013a0
mov esi, eax
add esp, 8
test esi, esi
je 0x10042398
push 0x10
push esi
call fcn.1014f831
add esp, 8
mov dword [ebp], eax
test eax, eax
je 0x10042398
push esi
push 0
push eax
call fcn.101527d0
mov esi, dword [ebp]
add esp, 0xc
xor eax, eax
push 0x100
lea edx, [esi + 0x10]
mov dword [esi], 1
mov dword [esi + 4], eax
push 0xff
push edx
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
call fcn.101527d0
add esp, 0xc
push ebp
mov dword [esi + 0x120], 1
call sym.FreeImage.dll__FreeImage_GetICCProfile_4
xor ecx, ecx
push 0x1029a760
push 0x20
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov word [eax], cx
call fcn.1014f8fe
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x10042243
push ebp
call fcn.10003cb0
jmp 0x10042245
xor eax, eax
mov ecx, dword [eax + ecx + 0x10]
mov dword [esp + 0x1c], ecx
jmp 0x10042157
xor ebp, ebp
mov dword [esi + 0x11c], ebp
mov ebp, dword [esp + 0x20]
push ebp
mov dword [esi + 0x124], 0
call sym.FreeImage.dll__FreeImage_GetInfoHeader_4
mov esi, eax
mov eax, 8
mov dword [esi + 4], edi
mov edx, 1
xor edi, edi
mov ecx, eax
mov dword [esi], 0x28
mov dword [esi + 8], ebx
mov word [esi + 0xc], dx
mov dword [esi + 0x10], edi
mov word [esi + 0xe], ax
call fcn.10001380
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov eax, 0xb13
push ebp
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
call sym.FreeImage.dll__FreeImage_GetPalette_4
xor ecx, ecx
inc eax
mov byte [eax + 1], cl
mov byte [eax], cl
mov byte [eax - 1], cl
inc ecx
add eax, 4
cmp ecx, 0x100
jl 0x100422a5
mov ebx, dword [esp + 0x3c]
mov ecx, ebx
mov ebp, 1
shl ebp, cl
mov dword [esp + 0x24], ebp
imul ebp, ebp
push ebp
mov dword [esp + 0x30], ebp
call fcn.1014f4ab
add esp, 4
mov dword [esp + 0x28], eax
test ebp, ebp
jle 0x10042371
fild dword [esp + 0x2c]
fld qword [0x1023a7b8]
fld qword [0x1023a968]
mov eax, edi
cdq
idiv dword [esp + 0x24]
mov esi, ebx
mov ecx, edx
mov edx, eax
xor eax, eax
mov dword [esp + 0x14], eax
test ebx, ebx
jle 0x10042332
mov ebp, edx
xor ebp, ecx
add eax, eax
and ebp, 1
or ebp, eax
mov eax, ecx
add ebp, ebp
and eax, 1
dec esi
or eax, ebp
sar edx, 1
sar ecx, 1
test esi, esi
jg 0x1004230d
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov edx, dword [esp + 0x28]
fnstcw word [esp + 0x14]
inc edi
fadd st(2)
movzx eax, word [esp + 0x14]
or eax, 0xc00
cmp edi, ebp
mov dword [esp + 0x30], eax
fdiv st(3)
fmul st(1)
fldcw word [esp + 0x30]
fistp dword [esp + 0x30]
mov cl, byte [esp + 0x30]
mov byte [edi + edx - 1], cl
fldcw word [esp + 0x14]
jl 0x100422f6
fstp st(1)
fstp st(0)
fstp st(0)
xor ebp, ebp
cmp dword [esp + 0x1c], ebp
mov dword [esp + 0x2c], ebp
jle 0x100424ac
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x10042394
mov eax, dword [ebx]
cmp dword [eax + 0x120], 0
jne 0x100423ab
xor ebx, ebx
jmp 0x100423f9
push ebp
call fcn.1014f3ce
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
add eax, 0x128
mov edx, eax
and edx, 0xf
je 0x100423c0
mov ecx, 0x10
sub ecx, edx
jmp 0x100423c2
xor ecx, ecx
mov edi, dword [ecx + eax + 0xc]
mov edx, eax
and edx, 0xf
je 0x100423d6
mov ecx, 0x10
sub ecx, edx
jmp 0x100423d8
xor ecx, ecx
movzx esi, word [ecx + eax + 0x16]
imul esi, edi
add esi, 7
shr esi, 3
add esi, 3
push ebx
and esi, 0xfffffffc
call sym.FreeImage.dll__FreeImage_GetBits_4
imul esi, ebp
mov ebx, eax
add ebx, esi
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
cmp dword [eax + 0x120], 0
jne 0x1004240c
xor ecx, ecx
jmp 0x1004245e
add eax, 0x128
mov edx, eax
and edx, 0xf
je 0x10042421
mov ecx, 0x10
sub ecx, edx
jmp 0x10042423
xor ecx, ecx
mov edi, dword [ecx + eax + 0xc]
mov edx, eax
and edx, 0xf
je 0x10042437
mov ecx, 0x10
sub ecx, edx
jmp 0x10042439
xor ecx, ecx
movzx esi, word [ecx + eax + 0x16]
mov ecx, dword [esp + 0x20]
imul esi, edi
add esi, 7
shr esi, 3
add esi, 3
push ecx
and esi, 0xfffffffc
call sym.FreeImage.dll__FreeImage_GetBits_4
imul esi, ebp
mov ecx, eax
add ecx, esi
xor esi, esi
cmp dword [esp + 0x18], esi
jle 0x1004249d
mov eax, ebp
mov ebp, dword [esp + 0x24]
cdq
idiv ebp
mov edi, edx
imul edi, ebp
sub ebx, ecx
jmp 0x1004247c
mov ebp, dword [esp + 0x24]
mov eax, esi
cdq
idiv ebp
mov al, byte [ebx + ecx]
mov ebp, dword [esp + 0x28]
add edx, edi
cmp byte [edx + ebp], al
sbb dl, dl
mov byte [ecx], dl
inc esi
inc ecx
cmp esi, dword [esp + 0x18]
jl 0x10042478
mov ebp, dword [esp + 0x2c]
inc ebp
cmp ebp, dword [esp + 0x1c]
mov dword [esp + 0x2c], ebp
jl 0x10042381
mov eax, dword [esp + 0x28]
push eax
call fcn.1014f3ce
mov eax, dword [esp + 0x24]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret