Function at 0x1004bb70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov dword [esp + 8], edx
mov dword [esp + 0x18], ecx
push ebx
push ebp
push esi
push edi
test ecx, ecx
je 0x1004bbc1
mov esi, dword [ecx]
mov eax, 0x10
lea edx, [esi + 0x130]
and edx, 0xf
lea ecx, [esi + 0x130]
sub eax, edx
neg edx
sbb edx, edx
and ecx, 0xf
and edx, eax
mov eax, 0x10
sub eax, ecx
neg ecx
sbb ecx, ecx
mov edx, dword [edx + esi + 0x13c]
and ecx, eax
mov ecx, dword [ecx + esi + 0x140]
jmp 0x1004bbc5
xor edx, edx
xor ecx, ecx
mov eax, edx
mov dword [esp + 0x20], edx
cdq
mov ebp, eax
mov dword [esp + 0x24], ecx
xor ebp, edx
mov eax, ecx
sub ebp, edx
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
test ebp, ebp
jle 0x1004bf77
test ebx, ebx
jle 0x1004bf77
push 4
call fcn.10271b4d
mov edi, eax
add esp, 4
mov dword [esp + 0x10], edi
test edi, edi
je 0x1004bf77
push 0
push 8
push ebx
mov edx, ebp
xor ecx, ecx
call fcn.10001f40
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1004bf6e
push 0x10
push esi
call fcn.10271841
add esp, 8
mov dword [edi], eax
test eax, eax
je 0x1004bf6e
push esi
push 0
push eax
call fcn.1026e960
mov edi, dword [edi]
push 0x100
push 0xff
lea eax, [edi + 8]
mov dword [edi], 1
mov dword [edi + 4], 0
push eax
mov dword [edi + 0x10c], 0
mov dword [edi + 0x108], 0
call fcn.1026e960
add esp, 0x18
mov dword [edi + 0x120], 1
push dword [esp + 0x10]
call sym.FreeImage.dll__FreeImage_GetICCProfile_4
xor ecx, ecx
push 0x105a20a0
push 8
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov word [eax], cx
call fcn.10269403
mov esi, eax
add esp, 8
test esi, esi
je 0x1004bcca
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.100057f0
mov dword [esi], eax
jmp 0x1004bccc
xor esi, esi
mov dword [edi + 0x11c], esi
mov dword [edi + 0x124], 0
mov dword [edi + 0x128], 0
mov dword [edi + 0x12c], 0
mov edi, dword [esp + 0x10]
push edi
call sym.FreeImage.dll__FreeImage_GetInfoHeader_4
mov edx, eax
mov dword [edx + 4], ebp
mov ebp, 1
mov dword [edx], 0x28
mov dword [edx + 8], ebx
mov dword [edx + 0xc], 0x80001
lea ecx, [ebp + 7]
mov dword [edx + 0x10], 0
call fcn.10001f20
push edi
mov dword [edx + 0x20], eax
mov dword [edx + 0x24], eax
mov dword [edx + 0x18], 0xb13
mov dword [edx + 0x1c], 0xb13
call sym.FreeImage.dll__FreeImage_GetPalette_4
xor ecx, ecx
inc eax
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
mov byte [eax - 5], cl
inc ecx
cmp ecx, 0x100
jl 0x1004bd40
mov ecx, dword [esp + 0x18]
shl ebp, cl
mov esi, ebp
mov dword [esp + 0x1c], ebp
imul esi, ebp
push esi
mov dword [esp + 0x30], esi
call fcn.10271b4d
add esp, 4
mov dword [esp + 0x14], eax
xor ebx, ebx
test esi, esi
jle 0x1004bded
movsd xmm2, qword [0x103f9488]
mov ecx, eax
movsd xmm3, qword [0x103f9668]
movd xmm1, esi
cvtdq2pd xmm1, xmm1
mov eax, ebx
mov esi, dword [esp + 0x18]
cdq
idiv ebp
mov edi, eax
xor eax, eax
test esi, esi
jle 0x1004bdc7
mov ecx, edi
add eax, eax
xor ecx, edx
sar edi, 1
and ecx, 1
dec esi
or ecx, eax
mov eax, edx
add ecx, ecx
sar edx, 1
and eax, 1
or eax, ecx
test esi, esi
jg 0x1004bda6
mov ecx, dword [esp + 0x14]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm0, xmm2
divsd xmm0, xmm1
mulsd xmm0, xmm3
cvttsd2si eax, xmm0
mov byte [ebx + ecx], al
inc ebx
cmp ebx, dword [esp + 0x2c]
jl 0x1004bd95
mov edi, dword [esp + 0x10]
xor ebp, ebp
mov dword [esp + 0x18], ebp
cmp dword [esp + 0x24], ebp
jle 0x1004bf56
jmp 0x1004be04
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1004be89
mov esi, dword [eax]
cmp dword [esi + 0x120], 0
je 0x1004be89
cmp dword [esi + 0x128], 0
je 0x1004be2c
mov ebx, dword [esi + 0x12c]
jmp 0x1004be78
lea edx, [esi + 0x130]
mov eax, 0x10
and edx, 0xf
lea ecx, [esi + 0x130]
sub eax, edx
neg edx
sbb edx, edx
and ecx, 0xf
and edx, eax
mov eax, 0x10
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, dword [esp + 0x28]
movzx ebx, word [ecx + esi + 0x146]
imul ebx, dword [edx + esi + 0x13c]
add ebx, 7
shr ebx, 3
add ebx, 3
and ebx, 0xfffffffc
push eax
call sym.FreeImage.dll__FreeImage_GetBits_4
test eax, eax
je 0x1004be89
imul ebx, ebp
add ebx, eax
jmp 0x1004be8b
xor ebx, ebx
mov esi, dword [edi]
cmp dword [esi + 0x120], 0
je 0x1004bf03
cmp dword [esi + 0x128], 0
je 0x1004bea7
mov edi, dword [esi + 0x12c]
jmp 0x1004beef
lea edx, [esi + 0x130]
mov eax, 0x10
and edx, 0xf
lea ecx, [esi + 0x130]
sub eax, edx
neg edx
sbb edx, edx
and ecx, 0xf
and edx, eax
mov eax, 0x10
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
movzx edi, word [ecx + esi + 0x146]
imul edi, dword [edx + esi + 0x13c]
add edi, 7
shr edi, 3
add edi, 3
and edi, 0xfffffffc
push dword [esp + 0x10]
call sym.FreeImage.dll__FreeImage_GetBits_4
test eax, eax
je 0x1004bf03
imul edi, ebp
add edi, eax
jmp 0x1004bf05
xor edi, edi
xor ecx, ecx
cmp dword [esp + 0x20], ecx
jle 0x1004bf47
mov eax, ebp
cdq
idiv dword [esp + 0x1c]
mov esi, edx
imul esi, dword [esp + 0x1c]
sub ebx, edi
nop dword [eax]
mov eax, ecx
mov ebp, dword [esp + 0x14]
cdq
lea edi, [edi + 1]
idiv dword [esp + 0x1c]
mov al, byte [ebx + edi - 1]
add edx, esi
cmp byte [edx + ebp], al
sbb al, al
inc ecx
mov byte [edi - 1], al
cmp ecx, dword [esp + 0x20]
jl 0x1004bf20
mov ebp, dword [esp + 0x18]
inc ebp
mov dword [esp + 0x18], ebp
cmp ebp, dword [esp + 0x24]
jl 0x1004be00
push dword [esp + 0x14]
call fcn.102718ed
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push edi
call fcn.102718ed
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret