Function at 0x4229c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x30
call fcn.0054e110
push ebx
push ebp
push esi
mov esi, ecx
mov ebp, edx
mov ecx, dword [esp + 0x48]
mov ebx, 1
shl ebx, cl
push edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x14], esi
cmp ebp, dword [esi + 8]
jg 0x4229f2
mov eax, esi
jmp 0x4229fd
mov ecx, esi
call fcn.004128b0
mov ecx, dword [esp + 0x4c]
test eax, eax
jne 0x422a09
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
cmp ecx, 3
jg 0x422a78
xor ecx, ecx
mov dword [esp + 0x4c], ecx
test ebp, ebp
jle 0x422bd2
lea esp, [esp]
xor esi, esi
xor eax, eax
test ebx, ebx
jle 0x422a58
jmp 0x422a30
mov ecx, eax
xor ecx, dword [esp + 0x48]
lea edx, [ecx - 1]
not ecx
shr edx, 0x1f
shr ecx, 0x1f
and edx, ecx
neg edx
and edx, 1
neg edx
and edx, dword [edi + eax*4]
inc eax
or esi, edx
cmp eax, ebx
jl 0x422a30
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
mov dword [eax + ecx*4], esi
inc ecx
lea eax, [ebx*4]
mov dword [esp + 0x4c], ecx
add edi, eax
cmp ecx, ebp
jl 0x422a20
jmp 0x422bce
mov edx, dword [esp + 0x48]
add ecx, 0xfffffffe
sar edx, cl
mov esi, 1
shl esi, cl
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x34], esi
lea eax, [esi - 1]
and ecx, eax
mov eax, edx
mov dword [esp + 0x20], ecx
not eax
shr eax, 0x1f
lea ecx, [edx - 1]
shr ecx, 0x1f
and ecx, eax
mov eax, edx
neg ecx
xor eax, 1
and ecx, 1
neg ecx
mov dword [esp + 0x30], ecx
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
mov eax, edx
neg ecx
xor eax, 2
and ecx, 1
xor edx, 3
neg ecx
mov dword [esp + 0x2c], ecx
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
lea eax, [edx - 1]
shr eax, 0x1f
neg ecx
not edx
and ecx, 1
shr edx, 0x1f
neg ecx
and eax, edx
mov dword [esp + 0x28], ecx
neg eax
xor ecx, ecx
and eax, 1
mov dword [esp + 0x1c], ecx
neg eax
mov dword [esp + 0x24], eax
test ebp, ebp
jle 0x422bce
shl ebx, 2
mov dword [esp + 0x3c], ebx
lea ecx, [ecx]
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x4c], edx
test esi, esi
jle 0x422bb4
lea eax, [esi + esi*2]
lea ecx, [edi + esi*8]
lea eax, [edi + eax*4]
mov dword [esp + 0x18], ecx
lea ebp, [edi + esi*4]
mov dword [esp + 0x44], eax
mov eax, dword [eax]
lea ebp, [ebp + 4]
mov ecx, dword [ecx]
mov esi, ebx
and ecx, dword [esp + 0x28]
and eax, dword [esp + 0x24]
xor esi, dword [esp + 0x20]
or ecx, eax
mov edx, dword [ebp - 4]
and edx, dword [esp + 0x2c]
mov eax, dword [edi + ebx*4]
or edx, ecx
and eax, dword [esp + 0x30]
lea ecx, [esi - 1]
shr ecx, 0x1f
not esi
shr esi, 0x1f
or eax, edx
mov edx, dword [esp + 0x4c]
and ecx, esi
mov esi, dword [esp + 0x34]
neg ecx
and ecx, 1
inc ebx
neg ecx
and ecx, eax
mov eax, dword [esp + 0x44]
or edx, ecx
add eax, 4
mov ecx, dword [esp + 0x18]
add ecx, 4
mov dword [esp + 0x4c], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x18], ecx
cmp ebx, esi
jl 0x422b44
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add edi, dword [esp + 0x3c]
mov eax, dword [eax]
mov dword [eax + ecx*4], edx
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, ebp
jl 0x422b20
mov esi, dword [esp + 0x14]
mov dword [esi + 4], ebp
test ebp, ebp
jle 0x422bf4
mov eax, dword [esi]
lea ecx, [ebp - 1]
lea ecx, [eax + ecx*4]
mov eax, dword [ecx]
lea ecx, [ecx - 4]
test eax, eax
jne 0x422bef
dec ebp
test ebp, ebp
jg 0x422be1
mov dword [esi + 4], ebp
test ebp, ebp
jne 0x422bfd
mov dword [esi + 0xc], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x30
ret