Function at 0x10085890
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x18
push ebx
push ebp
push esi
push edi
cmp eax, 5
jne 0x100859d9
mov ecx, dword [esp + 0x30]
mov ebp, ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], ecx
test eax, eax
je 0x100858bb
cmp eax, 1
jne 0x10085935
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
test esi, esi
je 0x1008593d
lea edx, [ebx - 1]
mov ecx, esi
lea eax, [ebx*4]
mov dword [esp + 0x14], edx
mov dword [esp + 0x2c], ecx
mov ebx, eax
nop dword [eax]
mov eax, edx
cmp eax, 1
jl 0x10085922
nop word [eax + eax]
mov edi, dword [ebp + eax*4]
mov esi, edi
mov ecx, dword [ebp + eax*4 - 4]
sub edi, dword [ebp + eax*4 - 4]
and ecx, 0xff800000
sub esi, ecx
xor edi, esi
and edi, 0x7fffff
xor edi, esi
mov dword [ebp + eax*4], edi
dec eax
cmp eax, 1
jge 0x100858f0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
add ebp, ebx
sub ecx, 1
mov dword [esp + 0x2c], ecx
jne 0x100858e0
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
test eax, eax
je 0x1008594a
cmp eax, 2
jne 0x10085b6e
test ebx, ebx
je 0x10085b6e
lea edx, [esi - 1]
mov dword [esp + 0x2c], ebx
mov ebp, edx
mov dword [esp + 0x14], edx
imul ebp, ebx
mov eax, ebx
mov dword [esp + 0x1c], ebp
mov edi, ebp
cmp edx, 1
jl 0x100859c1
lea eax, [ebx*4]
mov ebp, edx
mov dword [esp + 0x18], eax
mov eax, edi
sub eax, ebx
lea ebx, [ecx + eax*4]
mov esi, dword [ecx + edi*4]
mov ecx, esi
mov eax, dword [ebx]
sub esi, dword [ebx]
and eax, 0xff800000
sub ebx, dword [esp + 0x18]
sub ecx, eax
xor esi, ecx
and esi, 0x7fffff
xor esi, ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + edi*4], esi
sub edi, dword [esp + 0x34]
sub ebp, 1
jne 0x10085983
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
add ecx, 4
sub eax, 1
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], eax
jne 0x10085968
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
cmp eax, 6
jne 0x10085b6e
mov edx, dword [esp + 0x30]
mov ecx, edx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
test eax, eax
je 0x10085a01
cmp eax, 1
jne 0x10085aa0
mov ebp, dword [esp + 0x38]
test ebp, ebp
je 0x10085aa4
mov eax, dword [esp + 0x34]
lea ebx, [eax - 1]
shl eax, 3
mov dword [esp + 0x2c], eax
mov eax, ebp
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
nop dword [eax]
mov ebp, ebx
cmp ebp, 1
jl 0x10085a89
mov esi, dword [ecx + ebp*8 - 4]
mov eax, esi
mov edi, dword [ecx + ebp*8]
and eax, 0xfffff
mov ebx, dword [ecx + ebp*8 + 4]
mov edx, edi
sub edx, dword [ecx + ebp*8 - 8]
mov ecx, ebx
sbb ecx, eax
and esi, 0xfff00000
sub edi, 0
sbb ebx, esi
xor eax, eax
xor ebx, ecx
xor eax, edx
and ebx, 0xfff00000
xor ebx, ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + ebp*8], eax
mov dword [ecx + ebp*8 + 4], ebx
dec ebp
cmp ebp, 1
jge 0x10085a37
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x1c]
add ecx, edx
sub eax, 1
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jne 0x10085a30
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x38]
test eax, eax
je 0x10085ab1
cmp eax, 2
jne 0x10085b6e
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x10085b6e
lea ebx, [ebp - 1]
mov dword [esp + 0x10], ecx
mov ebp, ebx
mov dword [esp + 0x20], ebx
imul ebp, ecx
mov eax, ecx
mov dword [esp + 0x24], ebp
cmp ebx, 1
jl 0x10085b56
lea eax, [ecx*8]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], eax
mov eax, ebp
sub eax, ecx
lea ecx, [edx + eax*8]
mov dword [esp + 0x2c], ecx
mov edi, dword [ecx + 4]
mov eax, edi
mov ebx, dword [edx + ebp*8 + 4]
and eax, 0xfffff
mov esi, dword [edx + ebp*8]
mov edx, esi
sub edx, dword [ecx]
mov ecx, ebx
sbb ecx, eax
and edi, 0xfff00000
sub esi, 0
sbb ebx, edi
xor eax, eax
xor ebx, ecx
xor eax, edx
mov edx, dword [esp + 0x18]
and ebx, 0xfff00000
xor ebx, ecx
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov dword [edx + ebp*8], eax
mov dword [edx + ebp*8 + 4], ebx
sub ebp, dword [esp + 0x34]
sub dword [esp + 0x14], 1
jne 0x10085af6
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
add edx, 8
sub eax, 1
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], eax
jne 0x10085ad3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret