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

Disassembly:
push 0xffffffffffffffff
push 0x64b678
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [esp + 0x48]
push ebx
push ebp
push esi
push edi
mov ebx, ecx
push str.initCrypt_aes2
push eax
lea ecx, [esp + 0x18]
call fcn.004f0370
mov esi, dword [esp + 0x50]
mov dword [esp + 0x44], 0
mov eax, dword [esi + 4]
cmp eax, 3
je 0x530349
cmp eax, 6
je 0x530349
cmp eax, 2
je 0x530349
cmp eax, 5
je 0x530349
cmp eax, 4
jne 0x53034d
mov al, 1
jmp 0x530351
mov al, byte [esp + 0x4c]
mov byte [ebx + 0x88], al
mov eax, dword [esi + 0xc]
cmp eax, 0xc1
jl 0x53036a
mov dword [esi + 0xc], 0x100
jmp 0x530381
xor ecx, ecx
cmp eax, 0x81
setl cl
dec ecx
and ecx, 0x40
add ecx, 0x80
mov dword [esi + 0xc], ecx
mov ebp, dword [esi + 0xc]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
add esi, 0x10
mov ecx, esi
call fcn.004dda10
test eax, eax
je 0x5303f2
mov ecx, esi
call fcn.005a8750
test eax, eax
je 0x5303f2
mov ecx, esi
call fcn.005a8750
cmp eax, 0x20
mov ecx, esi
jbe 0x5303cc
call fcn.004dda10
mov ecx, 8
mov esi, eax
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
jmp 0x5303f2
call fcn.005a8750
mov ecx, esi
mov edi, eax
call fcn.004dda10
mov edx, edi
mov esi, eax
lea edi, [esp + 0x1c]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, ebp
sub eax, 0x80
je 0x530435
sub eax, 0x40
je 0x530429
sub eax, 0x40
je 0x53041d
lea ecx, [esp + 0x10]
mov dword [esp + 0x44], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5308f6
mov dword [ebx + 0x28c], 0xe
jmp 0x53043f
mov dword [ebx + 0x28c], 0xc
jmp 0x53043f
mov dword [ebx + 0x28c], 0xa
mov ecx, ebp
lea eax, [ebx + 0x8c]
sar ecx, 5
test ecx, ecx
jle 0x530481
mov edi, eax
lea edx, [esp + 0x1d]
lea esi, [esp + 0x1d]
sub edi, edx
mov ebp, ecx
xor ecx, ecx
xor edx, edx
mov ch, byte [esi - 1]
mov dl, byte [esi + 1]
mov cl, byte [esi]
add esi, 4
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [esi - 2]
shl ecx, 8
or ecx, edx
dec ebp
mov dword [edi + esi - 4], ecx
jne 0x53045c
mov ecx, dword [ebx + 0x28c]
cmp ecx, 0xa
jne 0x530517
mov edi, 0x6685e0
mov esi, dword [eax + 0xc]
add edi, 4
mov edx, esi
mov ecx, esi
shr edx, 8
shr ecx, 0x10
and edx, 0xff
and ecx, 0xff
add eax, 0x10
mov ebp, dword [edx*4 + str.cwko0]
mov ecx, dword [ecx*4 + str.cwko0]
xor edx, edx
mov dl, byte [eax - 4]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, esi
shl ecx, 8
shr edx, 0x18
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, dword [edi - 4]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [eax - 0x10]
xor ecx, ebp
xor ecx, edx
mov edx, dword [eax - 0xc]
mov dword [eax], ecx
xor edx, ecx
mov ecx, dword [eax - 8]
mov dword [eax + 4], edx
xor ecx, edx
xor esi, ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
cmp edi, 0x668608
jl 0x530495
jmp 0x5306b1
cmp ecx, 0xc
jne 0x5305bb
mov edi, 0x6685e0
mov esi, dword [eax + 0x14]
add edi, 4
mov edx, esi
mov ecx, esi
shr edx, 8
shr ecx, 0x10
and edx, 0xff
and ecx, 0xff
add eax, 0x18
mov ebp, dword [edx*4 + str.cwko0]
mov ecx, dword [ecx*4 + str.cwko0]
xor edx, edx
mov dl, byte [eax - 4]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, esi
shl ecx, 8
shr edx, 0x18
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, dword [edi - 4]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [eax - 0x18]
xor ecx, ebp
xor ecx, edx
mov edx, dword [eax - 0x14]
mov dword [eax], ecx
xor edx, ecx
mov ecx, dword [eax - 0x10]
mov dword [eax + 4], edx
xor ecx, edx
mov edx, dword [eax - 0xc]
mov dword [eax + 8], ecx
xor edx, ecx
mov ecx, dword [eax - 8]
mov dword [eax + 0xc], edx
xor ecx, edx
mov dword [eax + 0x10], ecx
xor ecx, esi
mov dword [eax + 0x14], ecx
cmp edi, 0x668600
jl 0x530525
jmp 0x5306b1
cmp ecx, 0xe
jne 0x5306b1
mov edi, 0x6685e0
mov esi, dword [eax + 0x1c]
add edi, 4
mov edx, esi
mov ecx, esi
shr edx, 8
shr ecx, 0x10
and edx, 0xff
and ecx, 0xff
add eax, 0x20
mov ebp, dword [edx*4 + str.cwko0]
mov ecx, dword [ecx*4 + str.cwko0]
xor edx, edx
mov dl, byte [eax - 4]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, esi
shl ecx, 8
shr edx, 0x18
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, dword [edi - 4]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [eax - 0x20]
xor ecx, ebp
xor ecx, edx
mov edx, dword [eax - 0x1c]
mov dword [eax], ecx
xor edx, ecx
mov ecx, dword [eax - 0x18]
mov dword [eax + 4], edx
xor ecx, edx
mov edx, dword [eax - 0x14]
xor edx, ecx
mov dword [eax + 8], ecx
mov ecx, edx
mov ebp, edx
shr ecx, 0x18
mov dword [eax + 0xc], edx
mov ecx, dword [ecx*4 + str.cwko0]
shr ebp, 0x10
shr edx, 8
and ebp, 0xff
and edx, 0xff
shl ecx, 8
xor ecx, dword [ebp*4 + str.cwko0]
mov ebp, dword [edx*4 + str.cwko0]
xor edx, edx
mov dl, byte [eax + 0xc]
shl ecx, 8
xor ecx, ebp
mov ebp, dword [edx*4 + str.cwko0]
mov edx, dword [eax - 0x10]
shl ecx, 8
xor ecx, ebp
xor ecx, edx
mov edx, dword [eax - 0xc]
mov dword [eax + 0x10], ecx
xor edx, ecx
mov ecx, dword [eax - 8]
mov dword [eax + 0x14], edx
xor ecx, edx
mov dword [eax + 0x18], ecx
xor ecx, esi
mov dword [eax + 0x1c], ecx
cmp edi, 0x6685fc
jl 0x5305c9
mov cl, byte [0x725e1c]
test cl, cl
jne 0x530708
xor ecx, ecx
mov edx, dword [ecx + str.cwko0]
add ecx, 4
shl edx, 2
cmp ecx, 0x400
mov esi, dword [edx + 0x6675e0]
mov dword [ecx + 0x725a18], esi
mov esi, dword [edx + 0x6679e0]
mov dword [ecx + 0x725618], esi
mov esi, dword [edx + 0x667de0]
mov edx, dword [edx + 0x6681e0]
mov dword [ecx + 0x725218], esi
mov dword [ecx + 0x724e18], edx
jl 0x5306bd
mov byte [0x725e1c], 1
mov edx, dword [eax]
lea ecx, [ebx + 0x18c]
add eax, 4
mov esi, 1
mov dword [ecx], edx
add ecx, 4
mov edx, dword [eax]
add eax, 4
mov dword [ecx], edx
add ecx, 4
mov edx, dword [eax]
add eax, 4
mov dword [ecx], edx
add ecx, 4
mov edx, dword [eax]
add eax, 4
mov dword [ecx], edx
mov edx, dword [ebx + 0x28c]
add ecx, 4
cmp edx, esi
jle 0x53087f
mov edx, dword [eax - 0x20]
sub eax, 0x20
mov edi, edx
mov ebp, edx
shr edi, 0x18
shr ebp, 0x10
mov edi, dword [edi*4 + 0x725a1c]
and ebp, 0xff
shr edx, 8
xor edi, dword [ebp*4 + 0x72561c]
and edx, 0xff
add eax, 4
add ecx, 4
mov ebp, dword [edx*4 + 0x72521c]
xor edx, edx
mov dl, byte [eax - 4]
xor edi, ebp
add eax, 4
add ecx, 4
mov ebp, dword [edx*4 + 0x724e1c]
add eax, 4
xor edi, ebp
add eax, 4
mov dword [ecx - 8], edi
mov edx, dword [eax - 0xc]
mov edi, edx
mov ebp, edx
shr edi, 0x18
shr ebp, 0x10
mov edi, dword [edi*4 + 0x725a1c]
and ebp, 0xff
shr edx, 8
xor edi, dword [ebp*4 + 0x72561c]
and edx, 0xff
add ecx, 4
mov ebp, dword [edx*4 + 0x72521c]
xor edx, edx
mov dl, byte [eax - 0xc]
xor edi, ebp
add ecx, 4
xor edi, dword [edx*4 + 0x724e1c]
mov dword [ecx - 0xc], edi
mov edx, dword [eax - 8]
mov edi, edx
mov ebp, edx
shr edi, 0x18
shr ebp, 0x10
mov edi, dword [edi*4 + 0x725a1c]
and ebp, 0xff
shr edx, 8
xor edi, dword [ebp*4 + 0x72561c]
and edx, 0xff
mov ebp, dword [edx*4 + 0x72521c]
xor edx, edx
mov dl, byte [eax - 8]
xor edi, ebp
xor edi, dword [edx*4 + 0x724e1c]
mov dword [ecx - 8], edi
mov edx, dword [eax - 4]
mov edi, edx
mov ebp, edx
shr edi, 0x18
shr ebp, 0x10
mov edi, dword [edi*4 + 0x725a1c]
and ebp, 0xff
shr edx, 8
xor edi, dword [ebp*4 + 0x72561c]
and edx, 0xff
mov ebp, dword [edx*4 + 0x72521c]
xor edx, edx
mov dl, byte [eax - 4]
xor edi, ebp
mov ebp, dword [edx*4 + 0x724e1c]
xor edi, ebp
inc esi
mov dword [ecx - 4], edi
mov edx, dword [ebx + 0x28c]
cmp esi, edx
jl 0x530749
mov edx, dword [eax - 0x20]
sub eax, 0x20
add eax, 4
mov dword [ecx], edx
add ecx, 4
mov edi, dword [esp + 0x54]
mov edx, dword [eax]
add eax, 4
mov dword [ecx], edx
add ecx, 4
mov edx, dword [eax]
add eax, 4
mov dword [ecx], edx
add ecx, 4
mov eax, dword [eax]
test edi, edi
mov dword [ecx], eax
je 0x5308e3
mov esi, dword [esp + 0x50]
mov eax, dword [esi + 4]
cmp eax, 3
je 0x5308be
cmp eax, 4
jne 0x5308e3
mov ecx, dword [ebx + 0x80]
add esi, 0x30
push ecx
mov ecx, esi
call fcn.005a8750
push eax
mov ecx, esi
call fcn.004dda10
push eax
lea ecx, [edi + 0x484]
call fcn.005b51e0
lea ecx, [esp + 0x10]
mov dword [esp + 0x44], 0xffffffff
call fcn.004f03e0
mov al, 1
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 0x10