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

Disassembly:
sub esp, 0x30
push ebp
mov ebp, ecx
cmp byte [ebp + 4], 0
je 0x1001fa17
mov eax, dword [ebp + 0x3cc]
cmp eax, 0x10
jne 0x1001f73f
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call fcn.1001f010
pop ebp
add esp, 0x30
ret 8
cdq
push ebx
and edx, 3
push esi
push edi
lea edi, [edx + eax]
sar edi, 2
mov dword [esp + 0x2c], edi
cmp edi, 4
jne 0x1001f781
mov edx, dword [0x1005042c]
lea eax, [ebp + 0x454]
mov esi, dword [0x10050424]
mov ebx, eax
mov dword [esp + 0x10], edx
mov edx, dword [0x10050434]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
jmp 0x1001f7bf
cmp edi, 6
mov ecx, 0x20
mov eax, 0x40
cmove eax, ecx
mov ecx, dword [eax + 0x10050424]
mov edx, dword [eax + 0x1005042c]
mov eax, dword [eax + 0x10050434]
mov dword [esp + 0x14], eax
lea eax, [ebp + 0x454]
mov dword [esp + 0x18], ecx
mov ebx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
test edi, edi
jle 0x1001f817
mov eax, dword [esp + 0x44]
mov dword [esp + 0x20], edi
lea edi, [ebp + 0x1e8]
nop dword [eax]
movzx ecx, byte [eax]
lea eax, [eax + 4]
shl ecx, 0x18
lea edi, [edi + 4]
mov dword [ebx], ecx
mov esi, ebx
movzx edx, byte [eax - 3]
shl edx, 0x10
or edx, ecx
mov dword [ebx], edx
movzx ecx, byte [eax - 2]
shl ecx, 8
or ecx, edx
mov dword [ebx], ecx
movzx edx, byte [eax - 1]
or edx, ecx
mov dword [ebx], edx
add ebx, 4
mov ecx, dword [edi - 4]
xor ecx, edx
sub dword [esp + 0x20], 1
mov dword [esi], ecx
jne 0x1001f7d0
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
cmp dword [ebp + 0x3d0], 1
mov dword [esp + 0x28], 1
jle 0x1001f924
lea edx, [ebp + 0x208]
lea eax, [ebp + 0x434]
mov dword [esp + 0x2c], edx
nop dword [eax]
test edi, edi
jle 0x1001f8e2
mov ebx, dword [esp + 0x10]
mov esi, ecx
mov dword [esp + 0x20], eax
sub ebx, ecx
mov eax, dword [esp + 0x14]
sub eax, ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], edi
lea eax, [ebx + esi]
cdq
idiv edi
mov eax, dword [ebp + edx*4 + 0x454]
sar eax, 8
movzx ecx, al
mov eax, dword [esp + 0x30]
add eax, esi
cdq
idiv edi
mov ecx, dword [ecx*4 + 0x1004ebf8]
movzx eax, byte [ebp + edx*4 + 0x454]
xor ecx, dword [eax*4 + 0x1004eff8]
mov eax, esi
cdq
inc esi
idiv edi
movsx eax, word [ebp + edx*4 + 0x456]
mov edx, dword [esp + 0x20]
movzx eax, al
xor ecx, dword [eax*4 + 0x1004e7f8]
movzx eax, byte [edx + 0x23]
xor ecx, dword [eax*4 + 0x1004e3f8]
mov eax, dword [esp + 0x44]
xor ecx, dword [eax]
add eax, 4
mov dword [edx], ecx
add edx, 4
sub dword [esp + 0x24], 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x20], edx
jne 0x1001f866
lea eax, [ebp + 0x434]
lea ecx, [edi*4]
push ecx
push eax
lea eax, [ebp + 0x454]
push eax
call fcn.1002e880
mov eax, dword [esp + 0x34]
add esp, 0xc
mov edx, dword [esp + 0x2c]
inc eax
mov ecx, dword [esp + 0x18]
add edx, 0x20
cmp eax, dword [ebp + 0x3d0]
mov dword [esp + 0x28], eax
lea eax, [ebp + 0x434]
mov dword [esp + 0x2c], edx
jl 0x1001f840
xor ebx, ebx
mov dword [esp + 0x2c], ebx
test edi, edi
jle 0x1001fa0d
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
sub esi, eax
mov edx, dword [esp + 0x48]
sub dword [esp + 0x14], eax
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [ebp + 0x3d0]
lea eax, [ebx + eax*8]
mov ebx, dword [ebp + eax*4 + 0x1e8]
mov ecx, ebx
mov eax, dword [esp + 0x1c]
sar ecx, 0x18
add dword [esp + 0x1c], 4
movzx eax, byte [eax + 3]
xor cl, byte [eax + 0x1004d2f8]
mov eax, dword [esp + 0x10]
mov byte [edx], cl
add eax, esi
inc edx
mov ecx, ebx
mov dword [esp + 0x44], edx
cdq
idiv edi
sar ecx, 0x10
movsx eax, word [ebp + edx*4 + 0x456]
movzx eax, al
xor cl, byte [eax + 0x1004d2f8]
mov eax, dword [esp + 0x44]
mov byte [eax], cl
inc eax
mov dword [esp + 0x44], eax
mov ecx, ebx
mov eax, dword [esp + 0x10]
cdq
idiv edi
sar ecx, 8
mov eax, dword [ebp + edx*4 + 0x454]
sar eax, 8
movzx eax, al
xor cl, byte [eax + 0x1004d2f8]
mov eax, dword [esp + 0x44]
mov byte [eax], cl
inc eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x14]
add eax, ecx
inc ecx
cdq
idiv edi
mov dword [esp + 0x10], ecx
movzx eax, byte [ebp + edx*4 + 0x454]
mov edx, dword [esp + 0x44]
mov al, byte [eax + 0x1004d2f8]
xor al, bl
mov ebx, dword [esp + 0x2c]
inc ebx
mov byte [edx], al
inc edx
mov dword [esp + 0x2c], ebx
cmp ebx, edi
jl 0x1001f950
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x30
ret 8
push dword [0x1012e73c]
lea ecx, [esp + 0x2c]
call fcn.1001fd70
push 0x1005dccc
lea eax, [esp + 0x2c]
push eax
call fcn.1002e455
int3