Function at 0x1021c380
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov eax, dword [0x105436c4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, 4
mov dword [ebp - 0x45c], ecx
cmp dword [ecx + 0x18], esi
lea eax, [edx + 8]
push edi
cmovl esi, dword [ecx + 0x18]
xor ecx, ecx
mov dword [ebp - 0x454], edx
mov dword [ebp - 0x458], esi
mov dword [ebp - 0x440], ecx
nop
cmp dword [eax - 8], 0
jne 0x1021c3fe
cmp dword [eax - 4], 0
jne 0x1021c3f7
cmp dword [eax], 0
jne 0x1021c3f2
cmp dword [eax + 4], 0
jne 0x1021c3ed
add ecx, 4
add eax, 0x10
mov dword [ebp - 0x440], ecx
cmp ecx, 0xff
jle 0x1021c3c0
jmp 0x1021c3fe
add ecx, 3
jmp 0x1021c3f8
add ecx, 2
jmp 0x1021c3f8
inc ecx
mov dword [ebp - 0x440], ecx
mov eax, 0xff
mov dword [ebp - 0x450], eax
cmp ecx, eax
jge 0x1021c421
nop dword [eax]
cmp dword [edx + eax*4], 0
jne 0x1021c41b
dec eax
cmp eax, ecx
jg 0x1021c410
mov dword [ebp - 0x450], eax
mov ebx, eax
xor edi, edi
sub ebx, ecx
test esi, esi
jle 0x1021c45a
lea eax, [esi + esi]
mov dword [ebp - 0x44c], eax
lea eax, [ebx + ebx]
mov dword [ebp - 0x43c], eax
nop dword [eax]
mov eax, ebx
add ebx, dword [ebp - 0x43c]
cdq
idiv dword [ebp - 0x44c]
add eax, ecx
mov dword [ebp + edi*4 - 0x14], eax
inc edi
cmp edi, esi
jl 0x1021c440
mov dword [ebp - 0x44c], 0
test esi, esi
jle 0x1021c48b
lea edx, [esi*4]
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x24]
shr ecx, 2
rep stosd dword es:[edi], eax
shr edx, 2
lea edi, [ebp - 0x34]
mov ecx, edx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x440]
xor edi, edi
mov ebx, ecx
cmp ecx, dword [ebp - 0x450]
jg 0x1021c52f
mov eax, dword [ebp - 0x454]
lea edx, [eax + ecx*4]
lea eax, [ebp - 0x438]
mov dword [ebp - 0x444], edx
sub eax, dword [ebp - 0x454]
mov dword [ebp - 0x448], eax
nop dword [eax]
mov eax, dword [edx]
mov dword [ebp - 0x43c], eax
test eax, eax
je 0x1021c51d
lea ecx, [edi + 1]
cmp ecx, esi
jge 0x1021c507
mov eax, ebx
sub eax, dword [ebp + edi*4 - 0x10]
cdq
mov esi, eax
mov eax, ebx
sub eax, dword [ebp + edi*4 - 0x14]
xor esi, edx
sub esi, edx
cdq
xor eax, edx
sub eax, edx
cmp esi, eax
mov esi, dword [ebp - 0x458]
jge 0x1021c4fb
inc ecx
inc edi
cmp ecx, esi
jl 0x1021c4d3
mov edx, dword [ebp - 0x444]
mov eax, dword [ebp - 0x43c]
mov ecx, dword [ebp - 0x448]
imul eax, ebx
mov dword [ecx + edx], edi
add dword [ebp + edi*4 - 0x34], eax
mov eax, dword [edx]
add dword [ebp + edi*4 - 0x24], eax
inc ebx
add edx, 4
mov dword [ebp - 0x444], edx
cmp ebx, dword [ebp - 0x450]
jle 0x1021c4c0
xor ebx, ebx
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x448], ebx
mov dword [ebp - 0x444], ebx
mov dword [ebp - 0x43c], ecx
test esi, esi
jle 0x1021c5a5
nop dword [eax + eax]
mov ebx, dword [ebp + edi*4 - 0x24]
test ebx, ebx
je 0x1021c59a
mov eax, ebx
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + edi*4 - 0x34]
sar ecx, 1
add eax, ecx
cdq
idiv ebx
mov ecx, eax
mov eax, dword [ebp + edi*4 - 0x14]
sub eax, ecx
mov dword [ebp + edi*4 - 0x14], ecx
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x448], eax
mov eax, ebx
imul eax, ecx
mov ecx, dword [ebp - 0x43c]
add dword [ebp - 0x444], eax
add ecx, ebx
mov dword [ebp - 0x43c], ecx
inc edi
cmp edi, esi
jl 0x1021c550
mov ebx, dword [ebp - 0x448]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x444]
cdq
idiv ecx
mov dword [ebp - 0x43c], eax
cmp ebx, 5
jl 0x1021c5dc
mov eax, dword [ebp - 0x44c]
mov ecx, dword [ebp - 0x440]
inc eax
mov dword [ebp - 0x44c], eax
cmp eax, 6
jl 0x1021c464
mov ebx, dword [ebp - 0x45c]
xor edi, edi
mov eax, dword [ebx + 0x2c]
imul eax, dword [ebx + 0x28]
test eax, eax
jle 0x1021c623
nop
mov eax, dword [ebx + 0x5858]
lea edx, [eax + edi*8]
inc edi
movzx eax, byte [edx + 4]
mov ecx, dword [ebp + eax*4 - 0x438]
mov eax, ecx
shl eax, 5
xor eax, dword [edx]
and eax, 0x60
xor dword [edx], eax
mov al, byte [ebp + ecx*4 - 0x14]
mov byte [edx + 4], al
mov eax, dword [ebx + 0x2c]
imul eax, dword [ebx + 0x28]
cmp edi, eax
jl 0x1021c5f0
cmp esi, 1
jle 0x1021c637
mov eax, dword [ebx]
test byte [eax + 0x44], 1
je 0x1021c637
mov ecx, ebx
call fcn.1021c870
push dword [ebp - 0x43c]
lea edx, [ebp - 0x14]
mov ecx, ebx
call fcn.1021c6d0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.101dd8e4
mov esp, ebp
pop ebp
ret