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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov esi, edi
push edx
sar esi, 2
push ecx
mov dword [ebp - 4], ecx
lea ebx, [esi + 6]
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 4]
and esi, 2
add esi, 3
mov ecx, ebx
shl ecx, 4
lea eax, [edx + edi]
mov dword [ebp - 8], esi
lea esi, [ecx + edx + 0x10]
shl ebx, 5
add esp, 0xc
mov dword [edx + 0x1d0], ecx
mov dword [edx + 0x1d4], ebx
mov dword [ebp - 0xc], esi
mov dl, 1
cmp eax, esi
jae 0x101f48b
jmp 0x101f3a0
movzx ecx, byte [eax - 4]
movzx ecx, byte [ecx + 0x1005000]
movzx ebx, byte [eax - 2]
movzx ebx, byte [ebx + 0x1005000]
mov byte [ebp + 8], cl
movzx ecx, byte [eax - 3]
mov cl, byte [ecx + 0x1005000]
xor cl, dl
mov byte [ebp + 0xa], bl
movzx ebx, byte [eax - 1]
mov bl, byte [ebx + 0x1005000]
mov byte [eax], cl
movzx ecx, byte [ebp + 0xa]
mov byte [eax + 1], cl
movzx ecx, byte [ebp + 8]
mov byte [eax + 3], cl
mov ecx, eax
sub ecx, edi
mov byte [eax + 2], bl
mov ecx, dword [ecx]
xor dword [eax], ecx
mov ebx, dword [ebp - 8]
mov cl, dl
and cl, 0x80
add eax, 4
neg cl
sbb cl, cl
and cl, 0x1b
add dl, dl
xor dl, cl
test ebx, ebx
jle 0x101f425
mov ecx, 4
sub ecx, edi
mov edi, edi
mov esi, dword [ecx + eax - 4]
xor esi, dword [eax - 4]
add eax, 4
sub ebx, 1
mov dword [eax - 4], esi
jne 0x101f410
mov esi, dword [ebp - 0xc]
cmp edi, 0x20
jne 0x101f483
movzx ecx, byte [eax - 4]
movzx ecx, byte [ecx + 0x1005000]
mov byte [eax], cl
movzx ecx, byte [eax - 3]
movzx ecx, byte [ecx + 0x1005000]
mov byte [eax + 1], cl
movzx ecx, byte [eax - 2]
movzx ecx, byte [ecx + 0x1005000]
mov byte [eax + 2], cl
movzx ecx, byte [eax - 1]
movzx ecx, byte [ecx + 0x1005000]
mov byte [eax + 3], cl
mov ecx, dword [eax - 0x20]
xor dword [eax], ecx
mov ecx, dword [eax - 0x1c]
xor ecx, dword [eax]
add eax, 4
mov dword [eax], ecx
mov ebx, dword [eax - 0x1c]
xor ebx, ecx
mov dword [eax + 4], ebx
mov ecx, dword [eax - 0x18]
xor ecx, ebx
mov dword [eax + 8], ecx
add eax, 0xc
cmp eax, esi
jb 0x101f3a0
mov edi, dword [ebp - 4]
lea edx, [edi + 0x20]
mov ecx, esi
mov eax, esi
cmp esi, edx
jbe 0x101f56c
lea ecx, [ecx]
movzx esi, byte [eax - 0x1d]
mov esi, dword [esi*4 + 0x1008000]
movzx ebx, byte [eax - 0x1e]
xor esi, dword [ebx*4 + 0x1007c00]
movzx ebx, byte [eax - 0x1f]
xor esi, dword [ebx*4 + 0x1007800]
movzx ebx, byte [eax - 0x20]
xor esi, dword [ebx*4 + 0x1007400]
sub eax, 0x20
mov dword [ecx], esi
movzx esi, byte [eax + 7]
mov esi, dword [esi*4 + 0x1008000]
movzx ebx, byte [eax + 6]
xor esi, dword [ebx*4 + 0x1007c00]
movzx ebx, byte [eax + 5]
xor esi, dword [ebx*4 + 0x1007800]
movzx ebx, byte [eax + 4]
xor esi, dword [ebx*4 + 0x1007400]
add eax, 0x10
mov dword [ecx + 4], esi
movzx esi, byte [eax - 5]
mov esi, dword [esi*4 + 0x1008000]
movzx ebx, byte [eax - 6]
xor esi, dword [ebx*4 + 0x1007c00]
movzx ebx, byte [eax - 7]
xor esi, dword [ebx*4 + 0x1007800]
movzx ebx, byte [eax - 8]
xor esi, dword [ebx*4 + 0x1007400]
add ecx, 0x10
mov dword [ecx - 8], esi
movzx esi, byte [eax - 1]
movzx ebx, byte [eax - 2]
mov esi, dword [esi*4 + 0x1008000]
xor esi, dword [ebx*4 + 0x1007c00]
movzx ebx, byte [eax - 3]
xor esi, dword [ebx*4 + 0x1007800]
movzx ebx, byte [eax - 4]
xor esi, dword [ebx*4 + 0x1007400]
mov dword [ecx - 4], esi
cmp eax, edx
ja 0x101f4a0
mov edx, dword [edi]
mov dword [ecx], edx
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
mov edx, dword [edi + 8]
mov dword [ecx + 8], edx
mov eax, dword [edi + 0xc]
pop edi
pop esi
mov dword [ecx + 0xc], eax
pop ebx
mov esp, ebp
pop ebp
ret 4