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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 4], 0
jne 0x4165f4
push 0x492e5c
lea ecx, [ebp - 0x28]
call fcn.0044fc10
push 0x487da8
lea eax, [ebp - 0x28]
push eax
call fcn.00452616
movzx ecx, byte [eax]
shl ecx, 0x18
inc eax
movzx edx, byte [eax]
shl edx, 0x10
or ecx, edx
xor edx, edx
inc eax
mov dh, byte [eax]
or ecx, edx
inc eax
movzx edx, byte [eax]
or ecx, edx
xor ecx, dword [edi + 0x1e8]
inc eax
movzx edx, byte [eax]
shl edx, 0x18
inc eax
mov dword [ebp - 8], ecx
movzx ecx, byte [eax]
shl ecx, 0x10
or edx, ecx
xor ecx, ecx
inc eax
mov ch, byte [eax]
or edx, ecx
inc eax
movzx ecx, byte [eax]
or edx, ecx
xor edx, dword [edi + 0x1ec]
inc eax
movzx ecx, byte [eax]
shl ecx, 0x18
inc eax
movzx ebx, byte [eax]
shl ebx, 0x10
or ecx, ebx
xor ebx, ebx
inc eax
mov bh, byte [eax]
mov dword [ebp - 0xc], edx
or ecx, ebx
inc eax
movzx ebx, byte [eax]
or ecx, ebx
xor ecx, dword [edi + 0x1f0]
inc eax
movzx edi, byte [eax]
shl edi, 0x18
inc eax
movzx ebx, byte [eax]
shl ebx, 0x10
or edi, ebx
inc eax
xor ebx, ebx
mov bh, byte [eax]
mov bl, byte [eax + 1]
or ebx, edi
mov eax, ebx
mov ebx, dword [ebp + 8]
xor eax, dword [ebx + 0x1f4]
mov edi, dword [ebx + 0x3d0]
cmp edi, 1
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], edi
mov eax, 0xff
jle 0x4167bb
add ebx, 0x210
dec edi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edi
movzx edi, byte [ebp - 3]
mov edi, dword [edi*4 + 0x47b490]
mov ebx, edx
sar ebx, 0x18
and ebx, eax
xor edi, dword [ebx*4 + 0x47ac90]
mov ebx, dword [ebp - 8]
sar ebx, 0x10
and ebx, eax
xor edi, dword [ebx*4 + 0x47b090]
mov ebx, ecx
and ebx, eax
xor edi, dword [ebx*4 + 0x47b890]
mov ebx, dword [ebp - 0x10]
xor edi, dword [ebx - 4]
sar edx, 0x10
and edx, eax
mov dword [ebp - 0x18], edx
mov ebx, ecx
sar ebx, 0x18
and ebx, eax
mov edx, dword [ebx*4 + 0x47ac90]
mov ebx, dword [ebp - 0x18]
xor edx, dword [ebx*4 + 0x47b090]
movzx ebx, byte [ebp - 7]
xor edx, dword [ebx*4 + 0x47b490]
mov ebx, dword [ebp - 4]
and ebx, eax
xor edx, dword [ebx*4 + 0x47b890]
mov ebx, dword [ebp - 0x10]
xor edx, dword [ebx]
mov ebx, ecx
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 4]
sar ebx, 0x10
and ebx, eax
sar edx, 0x18
and edx, eax
mov edx, dword [edx*4 + 0x47ac90]
xor edx, dword [ebx*4 + 0x47b090]
movzx ebx, byte [ebp - 0xb]
xor edx, dword [ebx*4 + 0x47b490]
mov ebx, dword [ebp - 8]
and ebx, eax
xor edx, dword [ebx*4 + 0x47b890]
mov ebx, dword [ebp - 0x10]
xor edx, dword [ebx + 4]
mov ebx, dword [ebp - 4]
sar ebx, 0x10
movzx ecx, ch
and ebx, eax
mov ebx, dword [ebx*4 + 0x47b090]
xor ebx, dword [ecx*4 + 0x47b490]
mov ecx, dword [ebp - 8]
sar ecx, 0x18
and ecx, eax
xor ebx, dword [ecx*4 + 0x47ac90]
mov ecx, dword [ebp - 0xc]
and ecx, eax
xor ebx, dword [ecx*4 + 0x47b890]
mov ecx, dword [ebp - 0x10]
xor ebx, dword [ecx - 8]
add dword [ebp - 0x10], 0x20
dec dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 4], edx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], edi
mov edx, edi
jne 0x4166ae
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], edx
shl edi, 5
lea edi, [edi + ebx + 0x1e8]
mov ebx, dword [ebp - 8]
sar ebx, 0x18
and ebx, eax
mov dword [ebp - 0x18], edi
mov edi, dword [edi]
mov dword [ebp + 8], edi
mov edx, edi
mov edi, dword [ebp - 4]
sar edx, 0x18
xor dl, byte [ebx + 0x479b90]
mov ebx, dword [ebp + 8]
mov byte [esi], dl
sar ebx, 0x10
mov edx, dword [ebp - 0x1c]
and edx, eax
sar edi, 0x10
and edi, eax
xor bl, byte [edi + 0x479b90]
movzx edi, ch
mov byte [esi + 1], bl
mov ebx, dword [ebp + 8]
sar ebx, 8
xor bl, byte [edi + 0x479b90]
mov edi, dword [ebp - 0x18]
mov byte [esi + 2], bl
mov dl, byte [edx + 0x479b90]
xor dl, byte [ebp + 8]
mov ebx, dword [ebp - 0xc]
mov byte [esi + 3], dl
mov edx, dword [edi + 4]
mov dword [ebp + 8], edx
sar edx, 0x18
sar ebx, 0x18
and ebx, eax
xor dl, byte [ebx + 0x479b90]
mov ebx, dword [ebp + 8]
mov byte [esi + 4], dl
mov edx, dword [ebp - 8]
sar edx, 0x10
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + 0x479b90]
movzx edx, byte [ebp - 3]
mov byte [esi + 5], bl
mov ebx, dword [ebp + 8]
sar ebx, 8
xor bl, byte [edx + 0x479b90]
mov edx, ecx
and edx, eax
mov byte [esi + 6], bl
mov dl, byte [edx + 0x479b90]
xor dl, byte [ebp + 8]
mov ebx, ecx
mov byte [esi + 7], dl
mov edx, dword [edi + 8]
mov dword [ebp + 8], edx
sar ebx, 0x18
sar edx, 0x18
and ebx, eax
xor dl, byte [ebx + 0x479b90]
mov ebx, dword [ebp + 8]
mov byte [esi + 8], dl
mov edx, dword [ebp - 0xc]
sar edx, 0x10
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + 0x479b90]
movzx edx, byte [ebp - 7]
mov byte [esi + 9], bl
mov ebx, dword [ebp + 8]
sar ebx, 8
xor bl, byte [edx + 0x479b90]
mov edx, dword [ebp - 4]
and edx, eax
mov byte [esi + 0xa], bl
mov dl, byte [edx + 0x479b90]
xor dl, byte [ebp + 8]
mov byte [esi + 0xb], dl
mov edx, dword [edi + 0xc]
mov edi, dword [ebp - 4]
mov dword [ebp + 8], edx
sar edx, 0x18
sar edi, 0x18
and edi, eax
xor dl, byte [edi + 0x479b90]
sar ecx, 0x10
mov byte [esi + 0xc], dl
mov edx, dword [ebp + 8]
and ecx, eax
sar edx, 0x10
xor dl, byte [ecx + 0x479b90]
movzx ecx, byte [ebp - 0xb]
mov byte [esi + 0xd], dl
mov edx, dword [ebp + 8]
sar edx, 8
xor dl, byte [ecx + 0x479b90]
mov ecx, dword [ebp - 8]
and ecx, eax
mov byte [esi + 0xe], dl
mov al, byte [ecx + 0x479b90]
xor al, byte [ebp + 8]
pop edi
mov byte [esi + 0xf], al
pop ebx
leave
ret 4