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

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
cmp eax, 0x10
push edi
je 0x416753
cmp eax, 0x18
je 0x416747
cmp eax, 0x20
jne 0x4169c8
mov edx, dword [esp + 0x14]
mov dword [edx], 0xe
jmp 0x41675d
mov edx, dword [esp + 0x14]
mov dword [edx], 0xc
jmp 0x41675d
mov edx, dword [esp + 0x14]
mov dword [edx], 0xa
lea ecx, [eax*8]
lea esi, [edx + 8]
shr ecx, 5
mov dword [edx + 4], esi
je 0x4167a1
mov eax, dword [esp + 0x18]
mov edi, esi
add eax, 2
mov ebp, ecx
xor ecx, ecx
xor ebx, ebx
mov ch, byte [eax + 1]
mov bl, byte [eax - 1]
mov cl, byte [eax]
add eax, 4
shl ecx, 8
or ecx, ebx
xor ebx, ebx
mov bl, byte [eax - 6]
add edi, 4
shl ecx, 8
or ecx, ebx
dec ebp
mov dword [edi - 4], ecx
jne 0x41677a
mov eax, dword [edx]
sub eax, 0xa
je 0x416949
sub eax, 2
je 0x4168af
sub eax, 2
jne 0x4169c8
mov edi, 0x420fec
mov eax, dword [esi + 0x1c]
xor ecx, ecx
mov edx, eax
xor ebx, ebx
and edx, 0xff
mov dword [esp + 0x14], eax
mov ebp, dword [esi]
add edi, 4
mov ch, byte [edx + 0x421014]
mov edx, eax
shr edx, 0x18
add esi, 0x20
mov bl, byte [edx + 0x421014]
xor edx, edx
mov dl, byte [esp + 0x16]
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 0x421014]
xor edx, edx
shl ecx, 8
mov dl, ah
xor ecx, ebx
xor eax, eax
xor ebx, ebx
mov al, byte [edx + 0x421014]
xor edx, edx
shl ecx, 8
xor ecx, eax
mov eax, dword [edi - 4]
xor eax, ecx
mov ecx, dword [esi - 0x1c]
xor eax, ebp
mov dword [esi], eax
xor ecx, eax
mov eax, dword [esi - 0x18]
mov dword [esi + 4], ecx
xor eax, ecx
mov ecx, dword [esi - 0x14]
xor ecx, eax
mov dword [esi + 8], eax
mov dword [esp + 0x1c], ecx
xor eax, eax
mov dl, byte [esp + 0x1e]
mov dword [esi + 0xc], ecx
mov al, byte [edx + 0x421014]
mov edx, ecx
shr edx, 0x18
mov bh, byte [edx + 0x421014]
xor edx, edx
xor eax, ebx
mov dl, ch
xor ebx, ebx
and ecx, 0xff
mov bl, byte [edx + 0x421014]
xor edx, edx
mov dl, byte [ecx + 0x421014]
mov ecx, dword [esi - 0x10]
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, edx
mov edx, dword [esp + 0x14]
xor eax, ecx
mov ecx, dword [esi - 0xc]
mov dword [esi + 0x10], eax
xor ecx, eax
mov eax, dword [esi - 8]
mov dword [esi + 0x14], ecx
xor eax, ecx
mov dword [esi + 0x18], eax
xor eax, edx
mov dword [esi + 0x1c], eax
cmp edi, 0x421008
jb 0x4167c3
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov edi, 0x420fec
mov ecx, dword [esi + 0x14]
xor edx, edx
mov eax, ecx
xor ebx, ebx
and eax, 0xff
mov dword [esp + 0x14], ecx
add edi, 4
add esi, 0x18
mov dh, byte [eax + 0x421014]
mov eax, ecx
shr eax, 0x18
mov bl, byte [eax + 0x421014]
xor eax, eax
mov al, byte [esp + 0x16]
xor edx, ebx
xor ebx, ebx
mov bl, byte [eax + 0x421014]
xor eax, eax
shl edx, 8
xor edx, ebx
mov al, ch
xor ebx, ebx
mov bl, byte [eax + 0x421014]
shl edx, 8
xor edx, ebx
mov ebx, dword [esi - 0x18]
xor edx, ebx
mov eax, edx
mov edx, dword [edi - 4]
xor eax, edx
mov edx, dword [esi - 0x14]
mov dword [esi], eax
xor edx, eax
mov eax, dword [esi - 0x10]
mov dword [esi + 4], edx
xor eax, edx
mov edx, dword [esi - 0xc]
mov dword [esi + 8], eax
xor edx, eax
mov eax, dword [esi - 8]
mov dword [esi + 0xc], edx
xor eax, edx
mov dword [esi + 0x10], eax
xor eax, ecx
mov dword [esi + 0x14], eax
cmp edi, 0x42100c
jb 0x4168b4
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov edi, 0x420fec
mov eax, dword [esi + 0xc]
xor edx, edx
mov ecx, eax
xor ebx, ebx
and ecx, 0xff
mov dword [esp + 0x14], eax
mov ebp, dword [esi]
add edi, 4
mov dh, byte [ecx + 0x421014]
mov ecx, eax
shr ecx, 0x18
add esi, 0x10
mov bl, byte [ecx + 0x421014]
xor ecx, ecx
mov cl, byte [esp + 0x16]
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 0x421014]
xor ecx, ecx
shl edx, 8
xor edx, ebx
mov cl, ah
xor ebx, ebx
mov bl, byte [ecx + 0x421014]
shl edx, 8
xor edx, ebx
mov ebx, dword [edi - 4]
xor edx, ebp
mov ecx, edx
mov edx, dword [esi - 0xc]
xor ecx, ebx
mov dword [esi], ecx
xor ecx, edx
mov edx, dword [esi - 8]
mov dword [esi + 4], ecx
xor edx, ecx
xor eax, edx
mov dword [esi + 8], edx
mov dword [esi + 0xc], eax
cmp edi, 0x421014
jb 0x41694e
pop edi
pop esi
pop ebp
pop ebx
ret 0xc