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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [ebp + 8], 0
push edi
mov edi, ecx
mov dword [ebp - 4], edi
je 0x1001fd6b
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x10
je 0x1001f98c
cmp ecx, 0x18
je 0x1001f98c
cmp ecx, 0x20
jne 0x1001fd6b
mov eax, dword [ebp + 0x14]
cmp eax, 0x10
je 0x1001f9a2
cmp eax, 0x18
je 0x1001f9a2
cmp eax, 0x20
jne 0x1001fd6b
push ebx
push esi
mov esi, dword [ebp + 0xc]
push eax
mov dword [edi + 0x3cc], eax
lea eax, [edi + 0x3d4]
push esi
push eax
mov dword [edi + 0x3c8], ecx
call sub.VCRUNTIME140.dll_memcpy
push dword [edi + 0x3cc]
lea eax, [edi + 0x3f4]
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [edi + 0x3c8]
add esp, 0x18
mov ecx, dword [edi + 0x3cc]
cmp eax, 0x10
je 0x1001f9fe
cmp eax, 0x18
je 0x1001f9f4
mov eax, 0xe
jmp 0x1001fa17
xor eax, eax
cmp ecx, 0x20
sete al
jmp 0x1001fa10
cmp ecx, 0x10
jne 0x1001fa08
lea eax, [ecx - 6]
jmp 0x1001fa17
xor eax, eax
cmp ecx, 0x18
setne al
lea eax, [eax*2 + 0xc]
mov dword [edi + 0x3d0], eax
xor esi, esi
mov eax, ecx
cdq
and edx, 3
lea ebx, [edx + eax]
mov eax, dword [edi + 0x3d0]
sar ebx, 2
mov dword [ebp + 0x14], ebx
test eax, eax
js 0x1001fa5d
lea edx, [edi + 8]
nop dword [eax + eax]
test ebx, ebx
jle 0x1001fa4f
mov ecx, ebx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov eax, dword [edi + 0x3d0]
inc esi
add edx, 0x20
cmp esi, eax
jle 0x1001fa40
xor edx, edx
test eax, eax
js 0x1001fa8d
lea esi, [edi + 0x1e8]
nop dword [eax]
test ebx, ebx
jle 0x1001fa7f
mov ecx, ebx
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov eax, dword [edi + 0x3d0]
inc edx
add esi, 0x20
cmp edx, eax
jle 0x1001fa70
inc eax
lea ecx, [edi + 0x414]
imul eax, ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x10], eax
mov eax, dword [edi + 0x3c8]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 8], eax
test eax, eax
jle 0x1001fb4e
mov esi, dword [ebp + 8]
mov edi, eax
mov ebx, ecx
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
lea ebx, [ebx + 4]
mov dword [ebx - 4], eax
movzx edx, byte [esi - 3]
shl edx, 0x10
or edx, eax
mov dword [ebx - 4], edx
movzx ecx, byte [esi - 2]
shl ecx, 8
or ecx, edx
mov dword [ebx - 4], ecx
movzx eax, byte [esi - 1]
or eax, ecx
mov dword [ebx - 4], eax
sub edi, 1
jne 0x1001fac1
mov ecx, dword [ebp - 0xc]
xor esi, esi
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x14]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], esi
cmp esi, dword [ebp + 0x10]
jge 0x1001fce0
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv ebx
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 8], ecx
mov ecx, dword [edi + 0x3d0]
mov esi, dword [ebp + 8]
sub ecx, eax
mov eax, dword [ebp + 0xc]
inc esi
mov dword [ebp + 8], esi
lea ecx, [edx + ecx*8]
mov eax, dword [eax]
mov dword [edi + ecx*4 + 0x1e8], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
add ecx, 4
mov dword [ebp + 0xc], ecx
cmp esi, eax
jl 0x1001fb07
jmp 0x1001fb53
xor esi, esi
mov dword [ebp + 8], esi
cmp esi, dword [ebp + 0x10]
jge 0x1001fce0
add eax, 0x104
lea ecx, [edi + eax*4]
mov eax, 0x1005a6b0
mov dword [ebp - 4], ecx
nop dword [eax]
mov ebx, dword [ecx]
movzx ecx, byte [eax]
inc eax
mov dword [ebp - 0xc], eax
mov eax, ebx
sar eax, 0x10
movzx eax, al
movsx edx, byte [eax + str.cw]
mov eax, ebx
sar eax, 8
xor edx, ecx
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
sar ebx, 0x18
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
mov ebx, dword [ebp - 8]
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
xor dword [edi + 0x414], edx
cmp ebx, 8
je 0x1001fbfb
cmp ebx, 1
jle 0x1001fbee
lea ecx, [edi + 0x418]
lea edx, [ebx - 1]
nop dword [eax + eax]
mov eax, dword [ecx - 4]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub edx, 1
jne 0x1001fbe0
test ebx, ebx
jle 0x1001fcce
jmp 0x1001fc7f
lea eax, [edi + 0x418]
mov edx, 3
mov ecx, dword [eax - 4]
lea eax, [eax + 4]
xor dword [eax - 4], ecx
sub edx, 1
jne 0x1001fc06
mov edx, dword [edi + 0x420]
mov eax, edx
sar eax, 0x18
movzx eax, al
movsx ecx, byte [eax + str.cw]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
movzx eax, dl
shl ecx, 8
mov edx, 3
movzx eax, byte [eax + str.cw]
xor ecx, eax
xor dword [edi + 0x424], ecx
lea ecx, [edi + 0x428]
mov eax, dword [ecx - 4]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub edx, 1
jne 0x1001fc71
lea ebx, [edi + 0x414]
mov dword [ebp + 0xc], 0
nop dword [eax]
cmp esi, dword [ebp + 0x10]
jge 0x1001fcdd
mov eax, esi
mov ecx, dword [ebx]
cdq
idiv dword [ebp + 0x14]
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 8], ecx
mov ecx, dword [edi + 0x3d0]
mov esi, dword [ebp + 8]
sub ecx, eax
mov eax, dword [ebx]
inc esi
add ebx, 4
mov dword [ebp + 8], esi
lea ecx, [edx + ecx*8]
mov dword [edi + ecx*4 + 0x1e8], eax
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
cmp eax, dword [ebp - 8]
jl 0x1001fc90
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp esi, dword [ebp + 0x10]
jl 0x1001fb70
mov ebx, dword [ebp + 0x14]
mov eax, 1
mov dword [ebp + 8], eax
cmp dword [edi + 0x3d0], eax
jle 0x1001fd65
lea ecx, [edi + 0x208]
mov dword [ebp + 0x10], ecx
nop dword [eax]
test ebx, ebx
jle 0x1001fd53
mov esi, ecx
mov edx, dword [esi]
lea esi, [esi + 4]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x100596b0]
xor ecx, dword [eax*4 + 0x10059ab0]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x10059eb0]
movzx eax, dl
xor ecx, dword [eax*4 + 0x1005a2b0]
mov dword [esi - 4], ecx
sub ebx, 1
jne 0x1001fd06
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
inc eax
add ecx, 0x20
mov dword [ebp + 8], eax
mov dword [ebp + 0x10], ecx
cmp eax, dword [edi + 0x3d0]
jl 0x1001fd00
pop esi
mov byte [edi + 4], 1
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0x10