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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x20
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.1001d910
lea esi, [eax*4]
mov dword [esp + 0x14], eax
test esi, esi
jle 0x1000d7c8
mov edx, dword [ebp + 8]
shl eax, 4
xor ecx, ecx
add eax, edx
lea esi, [esi]
mov ebx, dword [edx]
mov edi, dword [eax]
add ecx, 4
add edx, 0x10
sub eax, 0x10
mov dword [edx - 0x10], edi
mov edi, dword [eax + 0x14]
mov dword [eax + 0x10], ebx
mov ebx, dword [edx - 0xc]
mov dword [edx - 0xc], edi
mov edi, dword [eax + 0x18]
mov dword [eax + 0x14], ebx
mov ebx, dword [edx - 8]
mov dword [edx - 8], edi
mov edi, dword [eax + 0x1c]
mov dword [eax + 0x18], ebx
mov ebx, dword [edx - 4]
mov dword [edx - 4], edi
mov dword [eax + 0x1c], ebx
mov ebx, esi
sub ebx, ecx
cmp ecx, ebx
jl 0x1000d5d8
cmp dword [esp + 0x14], 1
jle 0x1000d7c8
mov dword [esp + 0x1c], 1
mov edx, dword [ebp + 8]
lea esi, [esi]
mov esi, dword [edx + 0x10]
mov eax, dword [edx + 0x18]
add edx, 0x10
mov ebx, dword [edx + 4]
mov dword [esp + 0x18], eax
mov ecx, esi
mov eax, esi
movzx edi, cl
shr eax, 0x18
movzx edi, byte [edi*4 + str.ccccwwww]
movzx eax, byte [eax*4 + str.ccccwwww]
mov eax, dword [eax*4 + 0x10038180]
xor eax, dword [edi*4 + 0x10038720]
mov edi, esi
shr edi, 0x10
mov ecx, edi
movzx edi, cl
mov ecx, esi
movzx esi, ch
movzx edi, byte [edi*4 + str.ccccwwww]
movzx esi, byte [esi*4 + str.ccccwwww]
xor eax, dword [edi*4 + 0x1003a840]
movzx edi, bl
mov ecx, dword [esi*4 + 0x100398e0]
mov esi, ebx
movzx edi, byte [edi*4 + str.ccccwwww]
shr esi, 0x18
movzx esi, byte [esi*4 + str.ccccwwww]
xor ecx, eax
mov eax, dword [esp + 0x18]
movd xmm4, ecx
mov esi, dword [esi*4 + 0x10038180]
xor esi, dword [edi*4 + 0x10038720]
mov edi, ebx
movzx ebx, bh
shr edi, 0x10
movzx ebx, byte [ebx*4 + str.ccccwwww]
movdqa xmm0, xmm4
mov ecx, edi
movzx edi, cl
mov ecx, eax
movzx edi, byte [edi*4 + str.ccccwwww]
shr ecx, 0x18
xor esi, dword [edi*4 + 0x1003a840]
movzx edi, al
xor esi, dword [ebx*4 + 0x100398e0]
movzx edi, byte [edi*4 + str.ccccwwww]
movzx ebx, byte [ecx*4 + str.ccccwwww]
mov ecx, eax
movd xmm3, esi
shr ecx, 0x10
punpckldq xmm0, xmm3
mov ebx, dword [ebx*4 + 0x10038180]
xor ebx, dword [edi*4 + 0x10038720]
movzx edi, cl
movzx ecx, ah
movzx edi, byte [edi*4 + str.ccccwwww]
movzx ecx, byte [ecx*4 + str.ccccwwww]
xor ebx, dword [edi*4 + 0x1003a840]
xor ebx, dword [ecx*4 + 0x100398e0]
mov ecx, dword [edx + 0xc]
movzx edi, byte [edx + 0xc]
movd xmm1, ebx
shr ecx, 0x18
movzx ecx, byte [ecx*4 + str.ccccwwww]
movzx edi, byte [edi*4 + str.ccccwwww]
add dword [esp + 0x1c], 1
mov ecx, dword [ecx*4 + 0x10038180]
xor ecx, dword [edi*4 + 0x10038720]
mov edi, dword [edx + 0xc]
shr edi, 0x10
mov eax, edi
movzx edi, al
mov eax, dword [edx + 0xc]
movzx edi, byte [edi*4 + str.ccccwwww]
xor ecx, dword [edi*4 + 0x1003a840]
movzx edi, ah
mov eax, dword [esp + 0x1c]
movzx edi, byte [edi*4 + str.ccccwwww]
xor ecx, dword [edi*4 + 0x100398e0]
movd xmm2, ecx
punpckldq xmm1, xmm2
punpcklqdq xmm0, xmm1
movups xmmword [edx], xmm0
cmp dword [esp + 0x14], eax
jne 0x1000d630
mov eax, dword [esp + 0x14]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret