Function at 0x456700
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, ecx
push edi
mov edi, edx
push esi
mov esi, eax
push ebx
sub esp, 0x6c
mov dword [esp + 4], edx
mov ebx, dword [esp + 0x80]
mov dword [esp], eax
mov dword [esp + 0x58], eax
call fcn.0045c2d0
test eax, eax
je 0x456a0c
cmp dword [esp + 0x84], 3
jg 0x4568a0
test edi, edi
jle 0x456884
mov eax, dword [esi]
movzx ecx, byte [esp + 0x84]
mov edx, ebx
mov esi, ebx
not edx
xor esi, 0xfffffffe
mov dword [esp + 0x1c], eax
mov eax, 4
shl eax, cl
mov dword [esp + 0x20], eax
lea eax, [ebx - 1]
and eax, edx
cdq
mov eax, ebx
xor eax, 1
mov dword [esp + 0x24], edx
sub eax, 1
and eax, esi
mov esi, ebx
cdq
mov eax, ebx
xor esi, 0xfffffffd
xor eax, 2
mov dword [esp + 0x28], edx
sub eax, 1
and eax, esi
mov esi, ebx
cdq
mov eax, ebx
xor esi, 0xfffffffc
xor eax, 3
mov dword [esp + 0x30], edx
sub eax, 1
and eax, esi
mov esi, ebx
cdq
mov eax, ebx
xor esi, 0xfffffffb
xor eax, 4
mov dword [esp + 0x2c], edx
sub eax, 1
and eax, esi
mov esi, ebx
cdq
mov eax, ebx
xor esi, 0xfffffffa
xor eax, 5
mov dword [esp + 0x34], edx
sub eax, 1
and eax, esi
mov esi, ebx
cdq
xor esi, 6
mov eax, ebx
xor eax, 0xfffffff9
sub esi, 1
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x24]
and esi, eax
mov eax, ebx
sar esi, 0x1f
xor eax, 7
xor ebx, 0xfffffff8
xor ecx, ecx
sub eax, 1
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x84]
and ebx, eax
mov eax, dword [ebp]
sar ebx, 0x1f
and edx, eax
mov dword [esp + 0x40], ebx
mov eax, edx
jmp 0x456819
mov eax, dword [ebp]
mov edx, dword [esp + 0x24]
and eax, edx
mov edx, dword [ebp + 4]
mov ebx, dword [esp + 0x28]
and edx, ebx
or edx, eax
cmp esi, 1
je 0x456870
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 0x30]
and eax, ebx
mov ebx, dword [esp + 0x2c]
or eax, edx
mov edx, dword [ebp + 0xc]
and edx, ebx
or edx, eax
cmp esi, 2
je 0x456870
mov eax, dword [ebp + 0x10]
mov ebx, dword [esp + 0x34]
and eax, ebx
mov ebx, dword [esp + 0x38]
or eax, edx
mov edx, dword [ebp + 0x14]
and edx, ebx
mov ebx, dword [esp + 0x3c]
or edx, eax
mov eax, dword [ebp + 0x18]
and eax, ebx
mov ebx, dword [esp + 0x40]
or eax, edx
mov edx, dword [ebp + 0x1c]
and edx, ebx
or edx, eax
mov eax, dword [esp + 0x1c]
mov dword [eax + ecx*4], edx
mov eax, dword [esp + 0x20]
add ecx, 1
add ebp, eax
cmp edi, ecx
jne 0x456810
mov eax, dword [esp + 0x58]
mov dword [eax + 4], edi
add esp, 0x6c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x84]
mov edx, ebx
lea esi, [eax - 2]
mov eax, 1
mov ecx, esi
shl eax, cl
sar edx, cl
mov dword [esp + 0x24], eax
sub eax, 1
mov ecx, edx
and eax, ebx
mov dword [esp + 0x28], eax
mov eax, edx
lea edx, [edx - 1]
not eax
and eax, edx
cdq
mov eax, ecx
mov dword [esp + 0x2c], edx
xor eax, 1
mov edx, ecx
xor edx, 0xfffffffe
sub eax, 1
and eax, edx
cdq
mov eax, ecx
mov dword [esp + 0x30], edx
xor eax, 2
mov edx, ecx
xor edx, 0xfffffffd
sub eax, 1
and eax, edx
cdq
mov eax, ecx
mov dword [esp + 0x34], edx
mov edx, ecx
xor eax, 0xfffffffc
xor edx, 3
sub edx, 1
and edx, eax
sar edx, 0x1f
mov dword [esp + 0x38], edx
test edi, edi
jle 0x456884
movzx ecx, byte [esp + 0x84]
mov eax, 4
mov dword [esp + 0x5c], edi
mov edx, eax
shl edx, cl
mov ecx, esi
shl eax, cl
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x44], eax
mov eax, 8
shl eax, cl
mov ebx, dword [edx]
mov dword [esp + 0x40], eax
mov eax, 0xc
lea edx, [ebx + edi*4]
shl eax, cl
mov dword [esp + 0x54], edx
mov dword [esp + 0x3c], eax
nop
mov dword [esp + 0x20], 0
mov edx, ebp
xor esi, esi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebp
lea esi, [esi]
mov edi, dword [esp + 0x44]
mov ebp, dword [edx]
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
lea ecx, [edi + edx]
mov edi, dword [esp + 0x40]
mov dword [esp + 0x1c], ebp
mov ebp, dword [ecx]
add ebx, edx
lea ecx, [edi + edx]
add edx, 4
and ebp, eax
mov ecx, dword [ecx]
mov eax, dword [esp + 0x34]
mov edi, dword [ebx]
mov ebx, dword [esp + 0x28]
and ecx, eax
mov eax, dword [esp + 0x2c]
or ecx, ebp
mov ebp, dword [esp + 0x1c]
xor ebx, esi
add esi, 1
and ebp, eax
mov eax, ebp
or eax, ecx
mov ecx, dword [esp + 0x38]
and edi, ecx
mov ecx, ebx
sub ebx, 1
not ecx
or eax, edi
and ecx, ebx
sar ecx, 0x1f
and eax, ecx
or dword [esp + 0x20], eax
cmp dword [esp + 0x24], esi
jne 0x456978
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x4c]
mov dword [ebx], eax
mov eax, dword [esp + 0x50]
add ebx, 4
add ebp, eax
mov eax, dword [esp + 0x54]
cmp ebx, eax
jne 0x456960
mov edi, dword [esp + 0x5c]
jmp 0x456884
add esp, 0x6c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret