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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov edx, dword [esp + 0x4c]
mov eax, edx
add eax, 0xfffffff9
js 0x1023772f
mov ecx, 6
mov eax, dword [esp + 0x44]
sub ecx, edx
xor edx, edx
dec edx
cmp ecx, 0xfffffffe
cmovg edx, ecx
mov ecx, edx
add edx, dword [esp + 0x4c]
not ecx
lea esi, [esp + ecx*4 + 4]
lea eax, [eax + ecx*4]
lea ecx, [edx*4 - 0x14]
push ecx
push eax
push esi
call fcn.10321d90
mov edx, dword [esp + 0x58]
add esp, 0xc
xor ebp, ebp
lea ebx, [edx - 6]
test edx, edx
jns 0x10237768
xor edi, edi
cmp ebp, edx
jg 0x1023795b
mov esi, ebx
mov eax, 6
shr esi, 0x1f
sub eax, edx
add esi, ebx
mov dword [esp + 0x2c], eax
sar esi, 1
lea eax, [esi + 1]
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], eax
xor eax, eax
jmp 0x102377f7
test ebx, ebx
mov edi, 0
jle 0x1023773a
mov eax, 6
xor ecx, ecx
xor esi, esi
xor edi, edi
xor ebp, ebp
sub eax, edx
mov dword [esp], eax
cmp edi, 3
jg 0x102377cb
cmp esi, ebx
jge 0x102377cb
mov ecx, dword [esp]
mov eax, ebp
lea edx, [edi - 4]
shl eax, 4
add eax, dword [esp + 0x48]
lea ecx, [ecx + esi]
cmp ecx, edx
cmova edx, ecx
lea ecx, [esp + esi*4 + 4]
lea eax, [eax + edi*4]
shl edx, 2
neg edx
push edx
push ecx
push eax
call fcn.10321d90
mov edx, dword [esp + 0x58]
xor ecx, ecx
add esp, 0xc
inc edi
inc esi
cmp edi, 3
jg 0x102377cb
cmp esi, ebx
jl 0x102377c0
xor eax, eax
cmp edi, 4
sete al
cmove edi, ecx
add ebp, eax
cmp ebp, edx
jg 0x1023773a
cmp esi, ebx
jge 0x1023773a
jmp 0x10237783
mov esi, dword [esp + 0x28]
inc eax
cmp ebp, edx
jg 0x1023795b
mov dword [esp], eax
movzx eax, byte [esp + edx*4 - 0x17]
mov cl, byte [esp + 4]
xor cl, byte [eax + str.cw]
mov byte [esp + 4], cl
movzx eax, byte [esp + edx*4 - 0x16]
mov al, byte [eax + str.cw]
xor byte [esp + 5], al
movzx eax, byte [esp + edx*4 - 0x15]
mov al, byte [eax + str.cw]
xor byte [esp + 6], al
movzx eax, byte [esp + edx*4 - 0x18]
mov al, byte [eax + str.cw]
xor byte [esp + 7], al
mov eax, dword [esp]
xor cl, byte [eax*4 + 0x10476540]
cmp ebx, 8
mov byte [esp + 4], cl
je 0x1023786c
cmp ebx, 2
jl 0x102378d8
mov eax, dword [esp + 4]
xor ecx, ecx
inc ecx
xor eax, dword [esp + ecx*4 + 4]
mov dword [esp + ecx*4 + 4], eax
inc ecx
cmp ecx, ebx
jne 0x1023785d
jmp 0x102378d8
mov eax, dword [esp + 4]
xor ecx, ecx
inc ecx
xor eax, dword [esp + ecx*4 + 4]
mov dword [esp + ecx*4 + 4], eax
inc ecx
cmp ecx, esi
jl 0x10237873
movzx eax, byte [esp + esi*4]
mov al, byte [eax + str.cw]
xor byte [esp + esi*4 + 4], al
movzx eax, byte [esp + esi*4 + 1]
mov al, byte [eax + str.cw]
xor byte [esp + esi*4 + 5], al
movzx eax, byte [esp + esi*4 + 2]
mov al, byte [eax + str.cw]
xor byte [esp + esi*4 + 6], al
movzx eax, byte [esp + esi*4 + 3]
mov al, byte [eax + str.cw]
xor byte [esp + esi*4 + 7], al
cmp dword [esp + 0x24], 7
jg 0x102378d8
mov eax, dword [esp + esi*4 + 4]
mov ecx, dword [esp + 0x24]
xor eax, dword [esp + ecx*4 + 4]
mov dword [esp + ecx*4 + 4], eax
inc ecx
cmp ecx, 8
jne 0x102378ca
cmp ebp, edx
jle 0x102378e4
mov eax, dword [esp]
jmp 0x102377ea
mov eax, dword [esp]
xor esi, esi
test ebx, ebx
jle 0x102377ea
cmp edi, 3
jg 0x10237938
cmp esi, ebx
jge 0x10237938
mov ecx, dword [esp + 0x2c]
mov eax, ebp
lea edx, [edi - 4]
shl eax, 4
add eax, dword [esp + 0x48]
lea ecx, [ecx + esi]
cmp ecx, edx
cmova edx, ecx
lea eax, [eax + edi*4]
lea ecx, [esp + esi*4 + 4]
shl edx, 2
neg edx
push edx
push ecx
push eax
call fcn.10321d90
mov edx, dword [esp + 0x58]
add esp, 0xc
inc edi
inc esi
cmp edi, 3
jg 0x10237938
cmp esi, ebx
jl 0x1023792d
xor eax, eax
cmp edi, 4
mov ecx, 0
sete al
cmove edi, ecx
add ebp, eax
cmp ebp, edx
jg 0x102378dc
mov eax, dword [esp]
cmp esi, ebx
jge 0x102377ea
jmp 0x102378f1
xor eax, eax
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret