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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 8], esi
cmp edi, 0x10
je 0x487690
cmp edi, 0x18
je 0x487690
cmp edi, 0x20
jne 0x487c98
mov ebx, edi
mov dword [esi + 0xf4], edi
shr ebx, 2
lea eax, [ebx + 6]
mov dword [esi + 0xf0], eax
cmp edi, 0xf0
ja 0x487c98
push edi
push edx
push esi
call fcn.004cc940
add esp, 0xc
xor edx, edx
test ebx, ebx
je 0x4876e1
mov eax, dword [esi + edx*4]
mov ecx, eax
ror ecx, 8
rol eax, 8
and ecx, 0xff00ff00
and eax, 0xff00ff
or ecx, eax
mov dword [esi + edx*4], ecx
inc edx
cmp edx, ebx
jb 0x4876c1
cmp edi, 0x10
je 0x487983
cmp edi, 0x18
je 0x48786d
cmp edi, 0x20
jne 0x487c98
mov ecx, dword [esi + 0x1c]
lea ebx, [esi + 0x30]
mov eax, ecx
shr eax, 0x10
movzx eax, al
push 4
pop edi
mov edx, dword [eax*4 + 0x510aa0]
mov eax, ecx
shr eax, 8
xor edx, 0x1000000
movzx eax, al
and edx, 0xff000000
mov eax, dword [eax*4 + 0x510ea0]
and eax, 0xff0000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x5106a0]
xor edx, eax
movzx eax, cl
lea ecx, [esi + 8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ecx]
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor edx, eax
mov eax, dword [esi + 4]
xor edx, dword [esi]
xor eax, edx
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], eax
xor ecx, eax
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
mov esi, edi
mov ecx, dword [ebx - 4]
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov edx, dword [eax*4 + 0x510ea0]
mov eax, ecx
shr eax, 8
and edx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor edx, eax
mov eax, ecx
shr eax, 0x18
mov eax, dword [eax*4 + 0x510aa0]
and eax, 0xff000000
xor edx, eax
movzx eax, cl
mov ecx, dword [ebx - 0x18]
movzx eax, byte [eax*4 + 0x5106a0]
xor edx, eax
mov eax, dword [ebx - 0x1c]
xor edx, dword [ebx - 0x20]
xor eax, edx
mov dword [ebx], edx
mov dword [ebx + 4], eax
lea ebx, [ebx + 0x20]
xor ecx, eax
mov eax, dword [ebx - 0x34]
xor eax, ecx
mov dword [ebx - 0x18], ecx
mov dword [ebx - 0x14], eax
mov ecx, dword [ebx - 0x14]
mov eax, ecx
shr eax, 8
movzx eax, al
mov dword [ebp - 4], ecx
mov edx, dword [eax*4 + 0x510ea0]
mov eax, ecx
shr eax, 0x10
and edx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x510aa0]
and eax, 0xff000000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x5106a0]
xor edx, eax
movzx eax, cl
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor edx, eax
xor edx, dword [esi + 0x510278]
add esi, edi
xor edx, dword [ebx - 0x30]
mov dword [ebx - 0x10], edx
mov eax, dword [ebx - 0x2c]
xor eax, edx
mov dword [ebx - 0xc], eax
mov ecx, dword [ebx - 0x28]
xor ecx, eax
mov dword [ebx - 8], ecx
mov eax, dword [ebx - 0x24]
xor eax, ecx
mov dword [ebx - 4], eax
cmp esi, 0x1c
jne 0x48777a
jmp 0x487a7b
mov ecx, dword [esi + 0x14]
lea ebx, [esi + 0x28]
mov eax, ecx
shr eax, 0x10
movzx eax, al
push 4
pop edi
mov edx, dword [eax*4 + 0x510aa0]
mov eax, ecx
shr eax, 8
xor edx, 0x1000000
movzx eax, al
and edx, 0xff000000
mov eax, dword [eax*4 + 0x510ea0]
and eax, 0xff0000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x5106a0]
xor edx, eax
movzx eax, cl
lea ecx, [esi + 8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ecx]
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor edx, eax
mov eax, dword [esi + 4]
xor edx, dword [esi]
xor eax, edx
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], eax
xor ecx, eax
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], eax
mov esi, edi
mov ecx, dword [ebx - 0x18]
xor ecx, dword [ebx - 4]
mov eax, dword [ebx - 0x14]
xor eax, ecx
mov dword [ebx], ecx
mov dword [ebx + 4], eax
lea ebx, [ebx + 0x18]
mov ecx, dword [ebx - 0x14]
mov eax, ecx
shr eax, 8
movzx eax, al
mov dword [ebp - 4], ecx
mov edx, dword [eax*4 + 0x510ea0]
mov eax, ecx
shr eax, 0x10
and edx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x510aa0]
and eax, 0xff000000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x5106a0]
xor edx, eax
movzx eax, cl
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor edx, eax
xor edx, dword [esi + 0x510278]
add esi, edi
xor edx, dword [ebx - 0x28]
mov dword [ebx - 0x10], edx
mov eax, dword [ebx - 0x24]
xor eax, edx
mov dword [ebx - 0xc], eax
mov ecx, dword [ebx - 0x20]
xor ecx, eax
mov dword [ebx - 8], ecx
mov eax, dword [ebx - 0x1c]
xor eax, ecx
mov dword [ebx - 4], eax
cmp esi, 0x20
jne 0x4878eb
jmp 0x487a7b
mov edx, dword [esi + 0xc]
lea ebx, [esi + 4]
mov eax, edx
shr eax, 0x10
movzx eax, al
push 4
pop edi
mov ecx, dword [eax*4 + 0x510aa0]
mov eax, edx
shr eax, 8
xor ecx, 0x1000000
movzx eax, al
and ecx, 0xff000000
mov eax, dword [eax*4 + 0x510ea0]
and eax, 0xff0000
xor ecx, eax
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, eax
movzx eax, dl
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor ecx, eax
mov eax, dword [ebx]
xor ecx, dword [esi]
mov dword [esi + 0x10], ecx
xor eax, ecx
lea ecx, [esi + 8]
mov dword [esi + 0x14], eax
mov dword [ebp - 0xc], ecx
mov ecx, dword [ecx]
xor ecx, eax
mov dword [esi + 0x18], ecx
xor ecx, edx
mov dword [esi + 0x1c], ecx
mov esi, edi
lea ebx, [ebx + 0x10]
mov ecx, dword [ebx + 8]
mov eax, ecx
shr eax, 8
movzx eax, al
mov dword [ebp - 4], ecx
mov edx, dword [eax*4 + 0x510ea0]
mov eax, ecx
shr eax, 0x10
and edx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x510aa0]
and eax, 0xff000000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x5106a0]
xor edx, eax
movzx eax, cl
mov eax, dword [eax*4 + 0x5102a0]
and eax, 0xff00
xor edx, eax
xor edx, dword [esi + 0x510278]
add esi, edi
xor edx, dword [ebx - 4]
mov dword [ebx + 0xc], edx
mov eax, dword [ebx]
xor eax, edx
mov dword [ebx + 0x10], eax
mov ecx, dword [ebx + 4]
xor ecx, eax
mov dword [ebx + 0x14], ecx
mov eax, dword [ebx + 8]
xor eax, ecx
mov dword [ebx + 0x18], eax
cmp esi, 0x28
jne 0x4879fd
mov esi, dword [ebp - 8]
lea ecx, [ebp - 4]
mov eax, edi
mov byte [ecx], 0
inc ecx
sub eax, 1
jne 0x487a83
xor ecx, ecx
inc ecx
cmp dword [ebp + 0x10], ecx
jne 0x487c8c
and dword [ebp - 0x10], eax
mov eax, dword [esi + 0xf0]
shl eax, 2
mov dword [ebp - 0x14], eax
test eax, eax
je 0x487aff
mov ebx, dword [ebp - 0xc]
lea edx, [esi + 8]
lea edx, [edx + eax*4]
mov esi, eax
mov ecx, dword [ebx - 8]
sub esi, edi
mov eax, dword [edx - 8]
mov dword [ebx - 8], eax
mov eax, dword [edx - 4]
mov dword [edx - 8], ecx
mov ecx, dword [ebx - 4]
mov dword [ebx - 4], eax
mov eax, dword [edx]
mov dword [edx - 4], ecx
mov ecx, dword [ebx]
mov dword [ebx], eax
lea ebx, [ebx + 0x10]
mov eax, dword [edx + 4]
mov dword [edx], ecx
lea edx, [edx - 0x10]
mov ecx, dword [ebx - 0xc]
mov dword [ebx - 0xc], eax
mov eax, dword [ebp - 0x10]
add eax, edi
mov dword [edx + 0x14], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], eax
cmp eax, esi
jb 0x487ab6
mov esi, dword [ebp - 8]
xor ecx, ecx
inc ecx
lea eax, [ebp - 4]
mov byte [eax], 0
inc eax
sub edi, 1
jne 0x487b02
cmp dword [esi + 0xf0], ecx
jbe 0x487c8c
lea ebx, [esi + 8]
inc edi
lea ebx, [ebx + 0x10]
mov edx, dword [ebx - 8]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax*4 + 0x5106a0]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*4 + 0x5116a0]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511aa0]
movzx eax, byte [edx*4 + 0x5106a0]
mov edx, dword [ebx - 4]
xor ecx, dword [eax*4 + 0x5112a0]
movzx eax, byte [ebx - 8]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511ea0]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebx - 8], ecx
movzx ecx, byte [eax*4 + 0x5106a0]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*4 + 0x5116a0]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511aa0]
movzx eax, byte [edx*4 + 0x5106a0]
mov edx, dword [ebx]
xor ecx, dword [eax*4 + 0x5112a0]
movzx eax, byte [ebx - 4]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511ea0]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebx - 4], ecx
movzx ecx, byte [eax*4 + 0x5106a0]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*4 + 0x5116a0]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511aa0]
movzx eax, byte [edx*4 + 0x5106a0]
mov edx, dword [ebx + 4]
xor ecx, dword [eax*4 + 0x5112a0]
movzx eax, byte [ebx]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511ea0]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebx], ecx
movzx ecx, byte [eax*4 + 0x5106a0]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*4 + 0x5116a0]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511aa0]
movzx eax, byte [edx*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x5112a0]
movzx eax, byte [ebx + 4]
movzx eax, byte [eax*4 + 0x5106a0]
xor ecx, dword [eax*4 + 0x511ea0]
inc edi
mov dword [ebx + 4], ecx
cmp edi, dword [esi + 0xf0]
jb 0x487b1b
mov edx, dword [ebp + 0xc]
mov ecx, esi
call fcn.00487ccd
jmp 0x487c9d
mov eax, 0xffffff53
pop edi
pop esi
pop ebx
leave
ret