Function at 0x10020980
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x100530f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ebx
mov dword [ebp - 0x90], ebx
push edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x100209a4
sub esi, ecx
mov edi, 0x10056594
shr esi, 1
cmp dword [0x10056598], 0
je 0x100209cd
nop dword [eax]
cmp dword [edi], ebx
je 0x100209f6
mov edi, dword [edi + 4]
cmp dword [edi + 4], 0
jne 0x100209c0
push esi
call fcn.1002bdcf
add esp, 4
mov dword [ebp - 0x8c], eax
test eax, eax
jne 0x10020a0a
pop edi
pop esi
mov eax, str.Not_enought_memory
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10021562
mov esp, ebp
pop ebp
ret
lea eax, [edi + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10021562
mov esp, ebp
pop ebp
ret
lea eax, [esi + 8]
push eax
call fcn.1002bdcf
add esp, 4
mov dword [edi + 4], eax
test eax, eax
jne 0x10020a42
mov eax, dword [ebp - 0x8c]
push eax
call fcn.1002bdb4
add esp, 4
mov eax, str.Not_enought_memory
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10021562
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x8c]
mov edi, 1
mov dword [eax + 4], 0
mov dword [eax], ebx
add eax, 8
mov cl, byte [ebx]
mov dword [ebp - 0x88], eax
lea eax, [ebx + 1]
mov dword [ebp - 0x94], eax
mov al, byte [eax]
sub al, cl
dec cl
shl cl, 4
or al, cl
mov byte [edx], al
cmp esi, edi
jbe 0x10020ad8
nop dword [eax + eax]
movsx eax, byte [ebx + edi*2 - 1]
movsx ecx, byte [ebx + edi*2]
sub ecx, eax
lea eax, [ecx + 0x5e]
movzx ebx, al
movzx eax, cl
cmovns ebx, eax
mov eax, dword [ebp - 0x94]
shl bl, 4
mov byte [edi + edx], bl
movsx edx, byte [eax + edi*2]
mov eax, dword [ebp - 0x90]
movsx eax, byte [eax + edi*2]
sub edx, eax
lea eax, [edx + 0x5e]
movzx ecx, al
movzx eax, dl
mov edx, dword [ebp - 0x8c]
cmovns ecx, eax
and cl, 0xf
or cl, bl
mov ebx, dword [ebp - 0x90]
mov byte [edi + edx], cl
inc edi
cmp edi, esi
jl 0x10020a80
push dword [edx]
call fcn.1002cf45
push 0x60
lea eax, [ebp - 0x84]
push 0
push eax
lea edi, [esi - 4]
call fcn.10023840
mov ecx, dword [ebp - 0x88]
add esp, 0x10
test ecx, ecx
je 0x10020c7c
cmp esi, edi
jb 0x10020c7c
mov eax, dword [ebp - 0x8c]
push edi
add eax, 4
push eax
push ecx
call fcn.100232c0
add esp, 0xc
xor esi, esi
call fcn.1002cf24
mov byte [ebp + esi - 0x24], al
inc esi
cmp esi, 0x20
jb 0x10020b21
xor ecx, ecx
mov bl, 1
lea edx, [ecx + 0x20]
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x24]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x45], al
mov byte [ebp + ecx - 0x65], al
sub edx, 1
jne 0x10020b40
mov bh, 7
nop word [eax + eax]
movzx eax, byte [ebp - 0x27]
lea ecx, [ebp - 0x40]
mov edx, 3
movzx eax, byte [eax + str.cw]
xor al, byte [ebp - 0x44]
xor al, bl
mov byte [ebp - 0x44], al
movzx eax, byte [ebp - 0x26]
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x43], al
movzx eax, byte [ebp - 0x25]
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x42], al
movzx eax, byte [ebp - 0x28]
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x41], al
mov al, bl
shr al, 7
add bl, bl
movzx eax, al
imul eax, eax, 0x1b
xor bl, al
movzx eax, byte [ecx - 4]
lea ecx, [ecx + 4]
xor byte [ecx - 4], al
movzx eax, byte [ecx - 7]
xor byte [ecx - 3], al
movzx eax, byte [ecx - 6]
xor byte [ecx - 2], al
movzx eax, byte [ecx - 5]
xor byte [ecx - 1], al
sub edx, 1
jne 0x10020bb4
movzx eax, byte [ebp - 0x38]
mov edx, 3
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x34], al
movzx eax, byte [ebp - 0x37]
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x33], al
movzx eax, byte [ebp - 0x36]
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x32], al
movzx eax, byte [ebp - 0x35]
movzx eax, byte [eax + str.cw]
xor byte [ebp - 0x31], al
lea eax, [ebp - 0x30]
nop dword [eax + eax]
movzx ecx, byte [eax - 4]
lea eax, [eax + 4]
xor byte [eax - 4], cl
movzx ecx, byte [eax - 7]
xor byte [eax - 3], cl
movzx ecx, byte [eax - 6]
xor byte [eax - 2], cl
movzx ecx, byte [eax - 5]
xor byte [eax - 1], cl
sub edx, 1
jne 0x10020c20
add bh, 0xff
jne 0x10020b60
mov ebx, dword [ebp - 0x88]
xor esi, esi
test edi, edi
je 0x10020c82
nop dword [eax]
lea eax, [esi + ebx]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.10020fe0
add esi, 0x10
add esp, 8
cmp esi, edi
jb 0x10020c60
jmp 0x10020c82
mov ebx, dword [ebp - 0x88]
push dword [ebp - 0x8c]
call fcn.1002bdb4
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10021562
mov esp, ebp
pop ebp
ret