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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp byte [ecx + 4], 0
mov dword [ebp - 0x14], ecx
jne 0x40597b
push 0x442098
lea ecx, [ebp - 0x28]
call fcn.00413299
push 0x43ced4
lea eax, [ebp - 0x28]
push eax
call fcn.00413452
movzx eax, byte [edx + 1]
shl eax, 0x10
push ebx
movzx ebx, byte [edx + 4]
push esi
push edi
movzx edi, byte [edx]
shl edi, 0x18
or edi, eax
movzx eax, byte [edx + 2]
shl eax, 8
or edi, eax
movzx eax, byte [edx + 3]
or edi, eax
movzx eax, byte [edx + 5]
movzx esi, byte [edx + 8]
shl eax, 0x10
shl ebx, 0x18
or ebx, eax
movzx eax, byte [edx + 6]
shl eax, 8
or ebx, eax
movzx eax, byte [edx + 7]
xor edi, dword [ecx + 8]
or ebx, eax
movzx eax, byte [edx + 9]
xor ebx, dword [ecx + 0xc]
shl eax, 0x10
shl esi, 0x18
or esi, eax
movzx eax, byte [edx + 0xa]
shl eax, 8
or esi, eax
movzx eax, byte [edx + 0xb]
or esi, eax
xor esi, dword [ecx + 0x10]
movzx ecx, byte [edx + 0xc]
movzx eax, byte [edx + 0xd]
shl eax, 0x10
shl ecx, 0x18
or ecx, eax
movzx eax, byte [edx + 0xe]
movzx edx, byte [edx + 0xf]
shl eax, 8
or eax, edx
or eax, ecx
mov ecx, dword [ebp - 0x14]
xor eax, dword [ecx + 0x14]
mov edx, dword [ecx + 0x3d0]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x1c], edx
mov eax, 0xff
cmp edx, 1
jle 0x405b43
add ecx, 0x30
dec edx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 8]
mov edx, esi
sar ecx, 8
and ecx, eax
sar edx, 0x10
and edx, eax
mov dword [ebp - 0x18], edx
mov edx, dword [ecx*4 + 0x4353a8]
mov ecx, dword [ebp - 0x18]
xor edx, dword [ecx*4 + 0x434fa8]
sar esi, 0x18
and esi, eax
mov ecx, ebx
sar ecx, 0x18
and ecx, eax
xor edx, dword [ecx*4 + 0x434ba8]
mov ecx, edi
and ecx, eax
xor edx, dword [ecx*4 + 0x4357a8]
mov ecx, dword [ebp - 4]
xor edx, dword [ecx - 4]
mov ecx, dword [ebp - 8]
sar ecx, 0x10
and ecx, eax
mov ecx, dword [ecx*4 + 0x434fa8]
xor ecx, dword [esi*4 + 0x434ba8]
mov esi, edi
sar esi, 8
and esi, eax
xor ecx, dword [esi*4 + 0x4353a8]
mov esi, ebx
and esi, eax
xor ecx, dword [esi*4 + 0x4357a8]
mov esi, dword [ebp - 4]
xor ecx, dword [esi]
mov esi, ebx
sar esi, 8
and esi, eax
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 8]
sar ecx, 0x18
and ecx, eax
mov ecx, dword [ecx*4 + 0x434ba8]
xor ecx, dword [esi*4 + 0x4353a8]
mov esi, edi
sar esi, 0x10
and esi, eax
xor ecx, dword [esi*4 + 0x434fa8]
mov esi, dword [ebp - 0xc]
and esi, eax
xor ecx, dword [esi*4 + 0x4357a8]
mov esi, dword [ebp - 4]
xor ecx, dword [esi + 4]
mov esi, dword [ebp - 0xc]
sar esi, 8
and esi, eax
mov esi, dword [esi*4 + 0x4353a8]
sar ebx, 0x10
sar edi, 0x18
and ebx, eax
xor esi, dword [ebx*4 + 0x434fa8]
and edi, eax
xor esi, dword [edi*4 + 0x434ba8]
mov edi, dword [ebp - 8]
and edi, eax
xor esi, dword [edi*4 + 0x4357a8]
mov edi, dword [ebp - 4]
xor esi, dword [edi - 8]
add dword [ebp - 4], 0x20
dec dword [ebp - 0x10]
mov edi, esi
mov esi, dword [ebp - 0x18]
mov ebx, edx
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], ecx
jne 0x405a2f
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp + 8]
shl edx, 5
lea edx, [edx + ecx + 8]
mov dword [ebp - 0x10], edx
mov edx, dword [edx]
mov dword [ebp - 4], edx
mov dword [ebp - 0x1c], edx
sar edx, 0x18
mov ecx, edi
sar ecx, 0x18
and ecx, eax
xor dl, byte [ecx + str.cw]
mov ecx, ebx
sar ecx, 0x10
and ecx, eax
mov byte [esi], dl
mov edx, dword [ebp - 0x1c]
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, dword [ebp - 0xc]
sar ecx, 8
and ecx, eax
mov byte [esi + 1], dl
mov edx, dword [ebp - 4]
sar edx, 8
xor dl, byte [ecx + str.cw]
mov ecx, dword [ebp - 8]
and ecx, eax
mov byte [esi + 2], dl
mov cl, byte [ecx + str.cw]
xor cl, byte [ebp - 4]
mov edx, ebx
mov byte [esi + 3], cl
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 4]
mov dword [ebp - 4], ecx
sar ecx, 0x18
sar edx, 0x18
and edx, eax
xor cl, byte [edx + str.cw]
mov edx, dword [ebp - 4]
mov byte [esi + 4], cl
mov ecx, dword [ebp - 0xc]
sar ecx, 0x10
and ecx, eax
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, dword [ebp - 8]
sar ecx, 8
mov byte [esi + 5], dl
mov edx, dword [ebp - 4]
and ecx, eax
sar edx, 8
xor dl, byte [ecx + str.cw]
mov ecx, edi
and ecx, eax
mov byte [esi + 6], dl
mov cl, byte [ecx + str.cw]
xor cl, byte [ebp - 4]
mov edx, dword [ebp - 0xc]
mov byte [esi + 7], cl
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 8]
mov dword [ebp - 4], ecx
sar edx, 0x18
sar ecx, 0x18
and edx, eax
xor cl, byte [edx + str.cw]
mov edx, dword [ebp - 4]
mov byte [esi + 8], cl
mov ecx, dword [ebp - 8]
sar ecx, 0x10
and ecx, eax
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, edi
mov byte [esi + 9], dl
mov edx, dword [ebp - 4]
sar ecx, 8
and ecx, eax
sar edx, 8
xor dl, byte [ecx + str.cw]
mov ecx, ebx
and ecx, eax
mov byte [esi + 0xa], dl
mov cl, byte [ecx + str.cw]
xor cl, byte [ebp - 4]
sar edi, 0x10
mov byte [esi + 0xb], cl
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xc]
mov ecx, dword [ebp - 8]
sar ecx, 0x18
and ecx, eax
mov dword [ebp - 4], edx
sar edx, 0x18
xor dl, byte [ecx + str.cw]
mov ecx, dword [ebp - 4]
sar ecx, 0x10
and edi, eax
mov byte [esi + 0xc], dl
xor cl, byte [edi + str.cw]
sar ebx, 8
mov byte [esi + 0xd], cl
mov ecx, dword [ebp - 4]
and ebx, eax
sar ecx, 8
xor cl, byte [ebx + str.cw]
pop edi
mov byte [esi + 0xe], cl
mov ecx, dword [ebp - 0xc]
and ecx, eax
mov al, byte [ecx + str.cw]
xor al, byte [ebp - 4]
mov byte [esi + 0xf], al
pop esi
pop ebx
leave
ret 4