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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push edi
push 0x10
pop edi
push edi
mov ebx, 0x5bed04
lea eax, [esi + 0x3d4]
push ebx
push eax
mov dword [esi + 0x3c8], edi
mov dword [esi + 0x3cc], edi
call fcn.0055bea0
push dword [esi + 0x3cc]
lea eax, [esi + 0x3f4]
push ebx
push eax
call fcn.0055bea0
mov eax, dword [esi + 0x3c8]
add esp, 0x18
cmp eax, edi
je 0x42021b
cmp eax, 0x18
je 0x420209
mov dword [esi + 0x3d0], 0xe
jmp 0x42023e
xor eax, eax
cmp dword [esi + 0x3cc], 0x20
sete al
lea eax, [eax + eax + 0xc]
jmp 0x420238
mov eax, dword [esi + 0x3cc]
cmp eax, edi
jne 0x42022a
push 0xa
pop eax
jmp 0x420238
xor ecx, ecx
cmp eax, 0x18
setne cl
lea ecx, [ecx + ecx + 0xc]
mov eax, ecx
mov dword [esi + 0x3d0], eax
mov eax, dword [esi + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
xor edx, edx
cmp dword [esi + 0x3d0], edx
mov dword [ebp - 4], eax
jl 0x420278
lea ebx, [esi + 8]
test eax, eax
jle 0x42026c
mov ecx, eax
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 4]
inc edx
add ebx, 0x20
cmp edx, dword [esi + 0x3d0]
jle 0x42025d
xor edx, edx
cmp dword [esi + 0x3d0], edx
jl 0x4202a3
lea ebx, [esi + 0x1e8]
test eax, eax
jle 0x420297
mov ecx, eax
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 4]
inc edx
add ebx, 0x20
cmp edx, dword [esi + 0x3d0]
jle 0x420288
mov ebx, dword [esi + 0x3d0]
mov ecx, dword [ebp + 8]
inc ebx
imul ebx, eax
mov eax, dword [esi + 0x3c8]
cdq
and edx, 3
add eax, edx
mov edi, eax
sar edi, 2
mov dword [ebp - 0x18], ebx
lea eax, [esi + 0x414]
test edi, edi
jle 0x4202fa
mov dword [ebp + 8], edi
movzx edx, byte [ecx]
shl edx, 0x18
mov dword [eax], edx
inc ecx
movzx edx, byte [ecx]
shl edx, 0x10
or dword [eax], edx
inc ecx
movzx edx, byte [ecx]
shl edx, 8
or dword [eax], edx
inc ecx
movzx edx, byte [ecx]
or dword [eax], edx
inc ecx
add eax, 4
dec dword [ebp + 8]
jne 0x4202d1
and dword [ebp + 8], 0
test edi, edi
jle 0x420349
lea eax, [esi + 0x414]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
cmp eax, ebx
jge 0x420349
cdq
idiv dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov dword [ebp - 0x10], eax
lea eax, [edx + eax*8]
mov dword [esi + eax*4 + 8], ecx
mov eax, dword [esi + 0x3d0]
sub eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
inc dword [ebp + 8]
mov ecx, dword [ecx]
add dword [ebp - 8], 4
cmp dword [ebp + 8], edi
lea eax, [edx + eax*8]
mov dword [esi + eax*4 + 0x1e8], ecx
jl 0x42030b
cmp dword [ebp + 8], ebx
mov ecx, 0xff
jge 0x4204b1
mov dword [ebp - 0xc], 0x5b9280
mov eax, dword [esi + edi*4 + 0x410]
mov ebx, dword [ebp - 0xc]
movsx ebx, byte [ebx]
mov edx, eax
sar edx, 0x10
and edx, ecx
movsx edx, byte [edx + str.cw]
xor edx, ebx
mov ebx, eax
sar ebx, 8
and ebx, ecx
movzx ebx, byte [ebx + str.cw]
shl edx, 8
xor edx, ebx
mov ebx, eax
and ebx, ecx
movzx ebx, byte [ebx + str.cw]
sar eax, 0x18
shl edx, 8
and eax, ecx
movzx eax, byte [eax + str.cw]
xor edx, ebx
shl edx, 8
xor edx, eax
xor dword [esi + 0x414], edx
inc dword [ebp - 0xc]
cmp edi, 8
je 0x4203dc
cmp edi, 1
jle 0x420452
lea eax, [esi + 0x418]
lea edx, [edi - 1]
mov ebx, dword [eax - 4]
xor dword [eax], ebx
add eax, 4
dec edx
jne 0x4203cf
jmp 0x420452
push 3
lea eax, [esi + 0x418]
pop edx
mov ebx, dword [eax - 4]
xor dword [eax], ebx
add eax, 4
dec edx
jne 0x4203e5
mov eax, dword [esi + 0x420]
mov edx, eax
sar edx, 0x18
and edx, ecx
movsx edx, byte [edx + str.cw]
mov ebx, eax
sar ebx, 0x10
and ebx, ecx
movzx ebx, byte [ebx + str.cw]
shl edx, 8
xor edx, ebx
mov ebx, eax
sar ebx, 8
and ebx, ecx
movzx ebx, byte [ebx + str.cw]
shl edx, 8
and eax, ecx
movzx eax, byte [eax + str.cw]
xor edx, ebx
shl edx, 8
xor edx, eax
xor dword [esi + 0x424], edx
push 3
lea eax, [esi + 0x428]
pop edx
mov ebx, dword [eax - 4]
xor dword [eax], ebx
add eax, 4
dec edx
jne 0x420447
and dword [ebp - 0x14], 0
test edi, edi
jle 0x4204a5
lea eax, [esi + 0x414]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x18]
jge 0x4204b1
cdq
idiv dword [ebp - 4]
mov ebx, dword [ebp - 8]
mov ebx, dword [ebx]
mov dword [ebp - 0x10], eax
lea eax, [edx + eax*8]
mov dword [esi + eax*4 + 8], ebx
mov eax, dword [esi + 0x3d0]
sub eax, dword [ebp - 0x10]
inc dword [ebp - 0x14]
lea eax, [edx + eax*8]
mov edx, dword [ebp - 8]
add dword [ebp - 8], 4
mov edx, dword [edx]
inc dword [ebp + 8]
cmp dword [ebp - 0x14], edi
mov dword [esi + eax*4 + 0x1e8], edx
jl 0x420463
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x18]
jl 0x42035e
xor eax, eax
inc eax
cmp dword [esi + 0x3d0], eax
mov dword [ebp - 0x14], eax
jle 0x420526
lea eax, [esi + 0x208]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
test eax, eax
jle 0x420514
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [edx]
mov edi, eax
sar edi, 0x18
and edi, ecx
mov edi, dword [edi*4 + 0x5b8280]
mov ebx, eax
sar ebx, 0x10
and ebx, ecx
xor edi, dword [ebx*4 + 0x5b8680]
mov ebx, eax
sar ebx, 8
and ebx, ecx
xor edi, dword [ebx*4 + 0x5b8a80]
and eax, ecx
xor edi, dword [eax*4 + 0x5b8e80]
mov dword [edx], edi
add edx, 4
dec dword [ebp - 0x18]
jne 0x4204d5
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
add dword [ebp + 8], 0x20
cmp eax, dword [esi + 0x3d0]
jl 0x4204c8
pop edi
mov byte [esi + 4], 1
pop ebx
leave
ret 4