Function at 0x4508c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x28
call fcn.00596bf0
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, 1
push edi
shl esi, cl
mov edi, edx
mov dword [ebp - 4], edi
cmp eax, dword [ebx + 8]
jle 0x45091d
push eax
push ebx
call fcn.00412c50
add esp, 8
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x45098d
cmp dword [ebx], 0
je 0x450912
push 1
push ebx
call fcn.00412a00
mov eax, dword [ebp - 0x1c]
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ebx], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 8], eax
cmp ecx, 3
jg 0x450996
xor eax, eax
mov dword [ebp + 0x14], eax
cmp dword [ebp + 0xc], eax
jle 0x450ad4
xor edx, edx
xor ecx, ecx
test esi, esi
jle 0x450964
mov eax, ecx
xor eax, dword [ebp + 0x10]
inc ecx
lea ebx, [eax - 1]
shr ebx, 0x1f
not eax
shr eax, 0x1f
and ebx, eax
mov eax, dword [edi + ecx*4 - 4]
neg ebx
and ebx, 1
neg ebx
and ebx, eax
or edx, ebx
cmp ecx, esi
jl 0x450938
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebx]
mov dword [ecx + eax*4], edx
inc eax
lea ecx, [esi*4]
add edi, ecx
mov dword [ebp + 0x14], eax
cmp eax, dword [ebp + 0xc]
jl 0x450930
mov eax, dword [ebp + 0xc]
pop edi
mov dword [ebx + 4], eax
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
add ecx, 0xfffffffe
mov eax, edx
sar eax, cl
mov edi, 1
shl edi, cl
lea ecx, [edi - 1]
and edx, ecx
mov dword [ebp + 0x10], edx
mov edx, eax
not edx
shr edx, 0x1f
lea ecx, [eax - 1]
shr ecx, 0x1f
and ecx, edx
neg ecx
and ecx, 1
neg ecx
mov dword [ebp - 0x24], ecx
mov ecx, eax
xor ecx, 1
lea edx, [ecx - 1]
not ecx
shr ecx, 0x1f
shr edx, 0x1f
and edx, ecx
mov ecx, eax
xor ecx, 2
lea ebx, [ecx - 1]
not ecx
shr ecx, 0x1f
shr ebx, 0x1f
and ebx, ecx
xor eax, 3
lea ecx, [eax - 1]
shr ecx, 0x1f
not eax
shr eax, 0x1f
and ecx, eax
neg edx
neg ebx
neg ecx
and edx, 1
and ebx, 1
and ecx, 1
xor eax, eax
neg edx
neg ebx
neg ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp + 0x14], eax
cmp dword [ebp + 0xc], eax
jle 0x450ad1
lea edx, [esi*4]
mov dword [ebp - 0x28], edx
xor esi, esi
mov dword [ebp - 0x14], esi
cmp edi, esi
jle 0x450ab3
mov eax, dword [ebp - 4]
lea edx, [eax + edi*4]
mov dword [ebp - 0x10], edx
lea edx, [eax + edi*8]
mov dword [ebp - 0xc], edx
lea edx, [edi + edi*2]
lea eax, [eax + edx*4]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
mov edx, dword [edx]
and edx, ecx
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx]
and ecx, ebx
or ecx, edx
mov edx, dword [ebp - 0x10]
mov edx, dword [edx]
and edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x18]
or edx, ecx
mov eax, esi
xor eax, dword [ebp + 0x10]
inc esi
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + esi*4 - 4]
and eax, dword [ebp - 0x24]
neg ecx
and ecx, 1
neg ecx
or eax, edx
and ecx, eax
or dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x1c]
mov eax, 4
add dword [ebp - 8], eax
add dword [ebp - 0xc], eax
add dword [ebp - 0x10], eax
cmp esi, edi
jl 0x450a53
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov esi, dword [ebp - 0x14]
mov dword [edx + eax*4], esi
mov edx, dword [ebp - 0x28]
add dword [ebp - 4], edx
inc eax
mov dword [ebp + 0x14], eax
cmp eax, dword [ebp + 0xc]
jl 0x450a32
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
pop edi
mov dword [ebx + 4], eax
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret