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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
mov ebx, ecx
cmp byte [ebx + 4], 0
mov dword [ebp - 8], ebx
jne 0x415112
push 0x4a6ff0
lea ecx, [ebp - 0x38]
call fcn.004598a2
push 0x49b58c
lea eax, [ebp - 0x38]
push eax
call fcn.00459987
mov eax, dword [ebx + 0x14]
cmp eax, 0x10
jne 0x41512a
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00414add
jmp 0x415390
cdq
and edx, 3
add eax, edx
push esi
push edi
mov edi, eax
xor ecx, ecx
sar edi, 2
mov eax, edi
sub eax, 4
cmp edi, 6
setne cl
push 4
pop edx
inc ecx
neg eax
sbb eax, eax
and eax, ecx
shl eax, 5
mov ecx, dword [eax + 0x48349c]
mov dword [ebp - 0x20], ecx
mov ecx, dword [eax + 0x4834a4]
mov eax, dword [eax + 0x4834ac]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x24], eax
xor ecx, ecx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
mov dword [ebp - 0x14], eax
xor ecx, ecx
push 4
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
and dword [ebp - 4], 0
test edi, edi
pop ecx
pop ecx
mov esi, eax
jle 0x4151e9
mov ecx, dword [ebp + 8]
jmp 0x4151ac
mov ebx, dword [ebp - 8]
movzx edx, byte [ecx]
shl edx, 0x18
mov dword [eax], edx
inc ecx
movzx edx, byte [ecx]
shl edx, 0x10
or dword [eax], edx
xor edx, edx
inc ecx
mov dh, byte [ecx]
mov dword [ebp + 8], eax
or dword [eax], edx
inc ecx
movzx edx, byte [ecx]
or dword [eax], edx
mov edx, dword [ebx + 0xc]
mov edx, dword [edx]
mov ebx, dword [ebp - 4]
mov ebx, dword [edx + ebx*4]
mov edx, dword [ebp + 8]
xor dword [edx], ebx
inc ecx
add eax, 4
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
jl 0x4151a9
mov ecx, dword [ebp - 8]
xor eax, eax
inc eax
cmp dword [ecx + 0x18], eax
mov dword [ebp - 0xc], eax
mov ebx, 0xff
jle 0x4152cd
and dword [ebp - 4], 0
test edi, edi
jle 0x4152a9
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x10], esi
sub dword [ebp - 0x10], eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
sub eax, edx
sub ecx, edx
mov dword [ebp + 8], edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x415233
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx + 0xc]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ecx + edx*4]
mov edx, dword [ebp + 8]
add eax, edx
cdq
idiv edi
movzx eax, byte [esi + edx*4 + 1]
mov edx, dword [ebp - 4]
mov ecx, dword [ecx + edx*4]
xor ecx, dword [eax*4 + 0x481c70]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x2c]
add eax, edx
cdq
idiv edi
mov eax, dword [esi + edx*4]
and eax, ebx
xor ecx, dword [eax*4 + 0x482070]
mov eax, dword [ebp + 8]
cdq
idiv edi
movzx eax, byte [esi + edx*4 + 2]
mov edx, dword [ebp - 0x10]
and eax, ebx
xor ecx, dword [eax*4 + 0x481870]
mov eax, dword [ebp - 0x18]
movzx edx, byte [edx + eax + 3]
xor ecx, dword [edx*4 + 0x481470]
inc dword [ebp - 4]
inc dword [ebp + 8]
mov dword [eax], ecx
add eax, 4
cmp dword [ebp - 4], edi
mov dword [ebp - 0x18], eax
jl 0x415230
mov eax, edi
shl eax, 2
push eax
push dword [ebp - 0x14]
push esi
call fcn.004568a0
mov eax, dword [ebp - 8]
add esp, 0xc
inc dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x18]
jl 0x415200
and dword [ebp - 4], 0
test edi, edi
jle 0x41537e
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x24]
sub edx, eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 4]
mov eax, dword [eax + edx*4]
movzx edx, byte [esi + edx*4 + 3]
mov dword [ebp + 0xc], eax
sar eax, 0x18
xor al, byte [edx + 0x480370]
mov edx, dword [ebp + 8]
mov byte [ecx], al
mov eax, dword [ebp - 0x2c]
add eax, edx
cdq
idiv edi
inc ecx
movzx eax, byte [esi + edx*4 + 2]
mov edx, dword [ebp + 0xc]
and eax, ebx
sar edx, 0x10
xor dl, byte [eax + 0x480370]
mov eax, dword [ebp + 8]
mov byte [ecx], dl
cdq
idiv edi
inc ecx
movzx eax, byte [esi + edx*4 + 1]
mov edx, dword [ebp + 0xc]
sar edx, 8
xor dl, byte [eax + 0x480370]
mov eax, dword [ebp - 0x28]
mov byte [ecx], dl
mov edx, dword [ebp + 8]
add eax, edx
cdq
idiv edi
inc ecx
mov eax, dword [esi + edx*4]
and eax, ebx
mov al, byte [eax + 0x480370]
xor al, byte [ebp + 0xc]
mov byte [ecx], al
inc ecx
inc dword [ebp - 4]
inc dword [ebp + 8]
cmp dword [ebp - 4], edi
jl 0x4152f2
push dword [ebp - 0x14]
call fcn.004412f6
push esi
call fcn.004412f6
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8