Function at 0x42ca88
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffbc0
mov esi, eax
mov al, byte [esi + 0x14]
dec al
je 0x42caa4
sub al, 2
je 0x42cb1c
jmp 0x42cf87
mov eax, dword [esi + 4]
mov eax, dword [eax]
call fcn.006536c4
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x438], ebx
fild dword [esp + 0x438]
fld xword [0x42cf94]
fmulp st(1)
add esp, 0xfffffff4
fstp xword [esp]
wait
mov dword [esp + 0x448], edi
fild dword [esp + 0x448]
fld xword [0x42cfa0]
fmulp st(1)
fld xword [0x42cfac]
fmulp st(1)
fdivr dword [0x42cfb8]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.006535e8
fmul dword [0x42cfbc]
call fcn.00402588
mov byte [esi + ebx + 0x20], al
inc ebx
cmp ebx, 0x100
jne 0x42cab2
jmp 0x42cf87
mov ecx, esi
mov dl, 1
mov eax, dword [0x4046f0]
call fcn.00408618
mov dword [esp + 0x1c], eax
xor edx, edx
mov eax, dword [esp + 0x1c]
call fcn.006514e4
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, esi
call fcn.0042d79c
mov dword [esp + 8], eax
mov eax, esi
call fcn.0042d458
mov edi, eax
lea ebx, [edi + 1]
mov eax, ebx
call fcn.00401e58
mov dword [esp + 4], eax
mov eax, ebx
call fcn.00653710
mov dword [esp], eax
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + 4]
call fcn.006536c4
push eax
mov eax, dword [esi + 0x1c]
mov eax, dword [eax]
call fcn.006536c4
mov edx, eax
mov eax, dword [esi + 0x18]
pop ecx
call fcn.0064bb04
mov eax, dword [esi + 0x1c]
mov dl, byte [eax + 9]
sub dl, 1
jb 0x42cba7
dec dl
je 0x42cc02
dec edx
sub dl, 2
jb 0x42cba7
dec dl
je 0x42cc02
jmp case.0x42cbb6.0
movzx eax, byte [eax + 8]
cmp eax, 0x10
ja case.0x42cbb6.0
mov al, byte [eax + 0x42cbbd]
jmp dword [eax*4 + 0x42cbce]
mov dl, 1
mov eax, dword [esi + 0x18]
call fcn.0064b9cc
jmp case.0x42cbb6.0
mov dl, 2
mov eax, dword [esi + 0x18]
call fcn.0064b9cc
jmp case.0x42cbb6.0
mov dl, 3
mov eax, dword [esi + 0x18]
call fcn.0064b9cc
jmp case.0x42cbb6.0
mov al, byte [eax + 8]
sub al, 8
je 0x42cc0d
sub al, 8
jne case.0x42cbb6.0
mov eax, dword [esi + 0x18]
call fcn.0064bb68
mov edx, dword [esi + 0x1c]
mov al, byte [edx + 9]
sub al, 1
jb 0x42cc2f
sub al, 2
je 0x42ccff
dec al
jne 0x42cd23
mov word [esp + 0x34], 0x300
mov word [esp + 0x36], pe_nt_image_headers32
mov al, byte [edx + 8]
cmp al, 0x10
je 0x42cc52
mov ecx, eax
mov ax, 1
shl ax, cl
mov word [esp + 0x36], ax
movzx eax, word [esp + 0x36]
dec eax
test eax, eax
jl 0x42ccaf
inc eax
mov dword [esp + 0x24], eax
xor ebx, ebx
lea eax, [esp + 0x38]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
mov ebp, eax
movzx eax, word [esp + 0x36]
dec eax
push eax
push 0xff
push ebx
call sub.kernel32.dll_MulDiv
mov byte [ebp], al
mov al, byte [ebp]
mov byte [ebp + 1], al
mov byte [ebp + 2], al
mov eax, dword [esp + 0x28]
mov edx, eax
mov eax, dword [0x6724d8]
call fcn.0042d320
mov byte [ebp + 3], 4
inc ebx
add dword [esp + 0x28], 4
dec dword [esp + 0x24]
jne 0x42cc6b
mov eax, dword [esi + 0x1c]
cmp byte [eax + 8], 2
jne 0x42cce9
cmp word [esp + 0x36], 0x10
jae 0x42cce9
mov word [esp + 0x36], 0x10
mov ebx, 1
mov eax, ebx
shl eax, 2
lea edx, [esp + eax*4 + 0x38]
lea eax, [esp + 0x38]
mov ecx, 0x15
call fcn.004023c8
inc ebx
cmp ebx, 4
jne 0x42cccc
lea eax, [esp + 0x34]
push eax
call sub.gdi32.dll_CreatePalette
mov edx, eax
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
jmp 0x42cd23
cmp dword [0x6724dc], 0
jne 0x42cd0f
call fcn.00656a70
jmp 0x42cd23
mov eax, dword [0x6724dc]
call fcn.0042d348
mov edx, eax
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [esi + 0x18]
call fcn.0064af14
mov dword [esp + 0x20], eax
mov bl, 1
mov eax, dword [esi + 0x1c]
cmp byte [eax + 0xc], 1
jne 0x42cedb
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], 0x65f0e4
mov edi, 0x65f11c
mov dword [esp + 0x30], 0x65f0c8
mov dword [esp + 0x28], 0x65f100
mov eax, dword [esi + 0x18]
mov edx, dword [eax]
call dword [edx + 0x28]
mov edx, dword [esp + 0x2c]
sub eax, dword [edx]
add eax, dword [edi]
dec eax
cdq
idiv dword [edi]
mov edx, dword [esi + 0x1c]
xor ecx, ecx
mov cl, byte [edx + 9]
cmp ecx, 6
ja case.0x42cd86.1
jmp dword [ecx*4 + 0x42cd8d]
movzx edx, byte [edx + 8]
imul edx, eax
add edx, 8
dec edx
test edx, edx
jns 0x42cdbb
add edx, 7
sar edx, 3
mov dword [esp + 0x18], edx
jmp case.0x42cd86.1
lea eax, [eax + eax*2]
movzx edx, byte [edx + 8]
imul edx
test eax, eax
jns 0x42cdd4
add eax, 7
sar eax, 3
mov dword [esp + 0x18], eax
jmp case.0x42cd86.1
shl eax, 2
movzx edx, byte [edx + 8]
imul edx
test eax, eax
jns 0x42cded
add eax, 7
sar eax, 3
mov dword [esp + 0x18], eax
jmp case.0x42cd86.1
add eax, eax
movzx edx, byte [edx + 8]
imul edx
test eax, eax
jns 0x42ce05
add eax, 7
sar eax, 3
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov dword [esp + 0x14], eax
jmp 0x42cea3
mov ecx, dword [esp + 0x18]
inc ecx
xor eax, eax
mov al, bl
mov edx, dword [esp + eax*4]
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
call dword [ebp + 4]
mov eax, ebx
xor al, 1
and eax, 0x7f
mov eax, dword [esp + eax*4]
inc eax
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0x20]
push eax
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
lea ecx, [eax + 1]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
mov dl, byte [eax]
mov eax, esi
call fcn.0042d4d4
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
push eax
mov eax, dword [edi]
push eax
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0x1c]
mov edx, dword [esp + 0x24]
mov edx, dword [eax + edx*4]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0x10]
lea ecx, [eax + 1]
mov eax, esi
call fcn.0042d9a4
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
add dword [esp + 0x14], eax
xor bl, 1
mov eax, dword [esi + 0x18]
mov edx, dword [eax]
call dword [edx + 0x1c]
cmp eax, dword [esp + 0x14]
jg 0x42ce1b
inc dword [esp + 0x10]
add dword [esp + 0x28], 4
add dword [esp + 0x30], 4
add edi, 4
add dword [esp + 0x2c], 4
cmp dword [esp + 0x10], 7
jne 0x42cd61
jmp 0x42cf64
mov eax, dword [esi + 0x18]
mov edx, dword [eax]
call dword [edx + 0x1c]
dec eax
test eax, eax
jl 0x42cf64
inc eax
mov dword [esp + 0x24], eax
mov dword [esp + 0xc], 0
lea ecx, [edi + 1]
xor eax, eax
mov al, bl
mov edx, dword [esp + eax*4]
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
call dword [ebp + 4]
mov eax, ebx
xor al, 1
and eax, 0x7f
mov eax, dword [esp + eax*4]
inc eax
push eax
mov eax, dword [esp + 0xc]
push eax
push edi
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
lea ecx, [eax + 1]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
mov dl, byte [eax]
mov eax, esi
call fcn.0042d4d4
push edi
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x1c]
mov edx, dword [esp + 0x10]
mov edx, dword [eax + edx*4]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 4]
lea ecx, [eax + 1]
mov eax, esi
call fcn.0042d7fc
xor bl, 1
inc dword [esp + 0xc]
dec dword [esp + 0x24]
jne 0x42cef5
mov eax, dword [esp + 0x20]
call fcn.0064edac
mov eax, dword [esp + 4]
call fcn.00401fac
mov eax, dword [esp]
call fcn.00401fac
mov eax, dword [esp + 0x1c]
call fcn.004028c0
add esp, 0x440
pop ebp
pop edi
pop esi
pop ebx
ret