Function at 0x410570
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [esp + 0x50]
mov edi, dword [esp + 0x58]
movzx eax, byte [edx]
movzx ecx, byte [edx + 1]
movzx ebx, byte [edx + 0xc]
shl ecx, 0x10
shl eax, 0x18
xor eax, ecx
movzx ecx, byte [edx + 3]
shl ebx, 0x18
xor eax, ecx
movzx ecx, byte [edx + 2]
shl ecx, 8
xor eax, ecx
xor eax, dword [edi]
movzx ecx, byte [edx + 5]
mov dword [esp + 8], eax
movzx eax, byte [edx + 4]
shl ecx, 0x10
shl eax, 0x18
xor eax, ecx
movzx ecx, byte [edx + 7]
xor eax, ecx
movzx ecx, byte [edx + 6]
shl ecx, 8
xor eax, ecx
xor eax, dword [edi + 4]
movzx ecx, byte [edx + 9]
mov dword [esp], eax
movzx eax, byte [edx + 8]
shl ecx, 0x10
shl eax, 0x18
xor eax, ecx
movzx ecx, byte [edx + 0xb]
xor eax, ecx
movzx ecx, byte [edx + 0xa]
shl ecx, 8
xor eax, ecx
mov ecx, ebx
movzx ebx, byte [edx + 0xd]
xor eax, dword [edi + 8]
shl ebx, 0x10
xor ebx, ecx
movzx ecx, byte [edx + 0xf]
xor ecx, ebx
movzx ebx, byte [edx + 0xe]
shl ebx, 8
xor ecx, ebx
xor ecx, dword [edi + 0xc]
mov edi, dword [edi + 0xf0]
mov esi, ecx
mov dword [esp + 4], edi
sar edi, 1
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x58]
jmp 0x4106df
mov edx, dword [esp]
mov esi, dword [esi*4 + 0x42b400]
xor esi, dword [ecx*4 + 0x42a800]
xor esi, dword [edi + 0xc]
mov edx, dword [edx*4 + 0x42b400]
xor edx, dword [eax*4 + 0x42a800]
mov eax, dword [esp + 8]
xor edx, dword [esp + 0x10]
xor edx, dword [eax*4 + 0x42b000]
mov eax, dword [esp + 0xc]
xor edx, dword [eax*4 + 0x42ac00]
mov eax, dword [esp + 0x14]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x20]
mov eax, dword [eax*4 + 0x42b400]
xor eax, dword [edx*4 + 0x42a800]
mov edx, dword [esp + 0x18]
xor eax, dword [edi + 4]
xor eax, dword [edx*4 + 0x42b000]
mov edx, dword [esp + 0x1c]
xor eax, dword [edx*4 + 0x42ac00]
mov edx, dword [esp + 0x2c]
mov dword [esp], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax*4 + 0x42b400]
xor eax, dword [edx*4 + 0x42a800]
mov edx, dword [esp + 0x28]
xor eax, dword [edi + 8]
xor eax, dword [ebp*4 + 0x42b000]
xor eax, dword [edx*4 + 0x42ac00]
mov edx, dword [esp + 0x30]
xor esi, dword [edx*4 + 0x42b000]
xor esi, dword [ebx*4 + 0x42ac00]
mov ebp, dword [esp + 8]
mov ebx, dword [esp]
add edi, 0x20
mov ecx, ebp
movzx edx, bl
shr ebx, 0x18
shr ecx, 0x18
mov ebx, dword [ebx*4 + 0x42b400]
mov ecx, dword [ecx*4 + 0x42b400]
xor ecx, dword [edx*4 + 0x42a800]
mov edx, esi
shr edx, 0x10
xor ecx, dword [edi - 0x10]
movzx edx, dl
xor ecx, dword [edx*4 + 0x42b000]
movzx edx, ah
xor ecx, dword [edx*4 + 0x42ac00]
movzx edx, al
xor ebx, dword [edx*4 + 0x42a800]
mov edx, ebp
xor ebx, dword [edi - 0xc]
mov dword [esp + 4], ecx
shr edx, 0x10
mov ecx, eax
shr eax, 0x10
movzx edx, dl
shr ecx, 0x18
movzx eax, al
xor ebx, dword [edx*4 + 0x42b000]
mov edx, esi
movzx edx, dh
xor ebx, dword [edx*4 + 0x42ac00]
mov edx, ecx
mov ecx, esi
shr esi, 0x18
movzx ebp, cl
mov edx, dword [edx*4 + 0x42b400]
mov esi, dword [esi*4 + 0x42b400]
xor edx, dword [ebp*4 + 0x42a800]
mov ebp, dword [esp]
xor edx, dword [edi - 8]
shr ebp, 0x10
mov ecx, ebp
movzx ebp, cl
mov ecx, dword [esp + 8]
xor edx, dword [ebp*4 + 0x42b000]
movzx ebp, ch
xor edx, dword [ebp*4 + 0x42ac00]
movzx ebp, cl
mov ecx, dword [esp + 4]
xor esi, dword [ebp*4 + 0x42a800]
xor esi, dword [edi - 4]
movzx ebp, dh
xor esi, dword [eax*4 + 0x42b000]
mov eax, dword [esp]
mov dword [esp + 0xc], ebp
shr ecx, 0x18
mov ebp, dword [edi]
mov dword [esp], ecx
movzx eax, ah
xor esi, dword [eax*4 + 0x42ac00]
mov dword [esp + 0x10], ebp
mov ebp, ebx
mov eax, esi
shr ebp, 0x18
shr eax, 0x10
movzx eax, al
mov dword [esp + 8], eax
movzx eax, bl
mov dword [esp + 0x14], ebp
mov ecx, dword [esp + 4]
mov ebp, ebx
movzx ebx, bh
shr ebp, 0x10
shr ecx, 0x10
movzx ecx, cl
mov dword [esp + 0x18], ecx
mov ecx, esi
movzx ecx, ch
mov dword [esp + 0x1c], ecx
movzx ecx, dl
mov dword [esp + 0x20], ecx
mov ecx, edx
shr ecx, 0x18
mov dword [esp + 0x24], ecx
mov ecx, ebp
movzx ebp, cl
mov ecx, dword [esp + 4]
movzx ecx, ch
mov dword [esp + 0x28], ecx
mov ecx, esi
shr esi, 0x18
shr edx, 0x10
sub dword [esp + 0x34], 1
movzx ecx, cl
movzx edx, dl
mov dword [esp + 0x2c], ecx
movzx ecx, byte [esp + 4]
mov dword [esp + 0x30], edx
jne 0x410630
mov edx, dword [esp + 0x38]
mov edi, ecx
mov ecx, esi
mov esi, ebx
mov ebx, edi
mov edi, dword [esp + 0x58]
movzx eax, byte [eax + 0x42a700]
shl edx, 5
xor eax, dword [esp + 0x10]
add edi, edx
mov edx, dword [esp]
movzx edx, byte [edx + 0x42a700]
shl edx, 0x18
xor eax, edx
mov edx, dword [esp + 8]
movzx edx, byte [edx + 0x42a700]
shl edx, 0x10
xor eax, edx
mov edx, dword [esp + 0xc]
movzx edx, byte [edx + 0x42a700]
shl edx, 8
xor eax, edx
mov edx, dword [esp + 0x54]
bswap eax
mov dword [edx], eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
movzx edx, byte [edx + 0x42a700]
movzx eax, byte [eax + 0x42a700]
xor eax, dword [edi + 4]
shl edx, 0x18
xor eax, edx
mov edx, dword [esp + 0x18]
movzx edx, byte [edx + 0x42a700]
shl edx, 0x10
xor eax, edx
mov edx, dword [esp + 0x1c]
movzx edx, byte [edx + 0x42a700]
shl edx, 8
xor edx, eax
mov eax, dword [esp + 0x54]
bswap edx
mov dword [eax + 4], edx
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
movzx edx, byte [edx + 0x42a700]
movzx eax, byte [eax + 0x42a700]
xor eax, dword [edi + 8]
shl edx, 0x18
xor eax, edx
movzx edx, byte [ebp + 0x42a700]
shl edx, 0x10
xor eax, edx
mov edx, dword [esp + 0x28]
movzx edx, byte [edx + 0x42a700]
shl edx, 8
xor edx, eax
mov eax, dword [esp + 0x54]
bswap edx
mov dword [eax + 8], edx
movzx edx, byte [ecx + 0x42a700]
movzx eax, byte [ebx + 0x42a700]
xor eax, dword [edi + 0xc]
mov edi, dword [esp + 0x30]
shl edx, 0x18
xor eax, edx
movzx edx, byte [edi + 0x42a700]
mov edi, dword [esp + 0x54]
shl edx, 0x10
xor eax, edx
movzx edx, byte [esi + 0x42a700]
shl edx, 8
xor eax, edx
bswap eax
mov dword [edi + 0xc], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret