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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x14]
cdq
and edx, 3
push ebx
push esi
mov esi, dword [ebp + 8]
lea ecx, [edx + eax]
mov eax, dword [ebp + 0xc]
cdq
and edx, 3
sar ecx, 2
add eax, edx
mov dword [ebp - 4], ecx
sar eax, 2
cmp eax, ecx
mov dword [esi + 0x3e8], eax
mov edx, eax
cmovle edx, ecx
add edx, 6
mov dword [esi + 0x3ec], edx
push edi
cmp eax, 8
jne 0x41d989
mov dword [esi + 0x3c0], 0x41d2a0
mov dword [esi + 0x3c4], 0x41c410
jmp 0x41d9bd
cmp eax, 6
jne 0x41d9a4
mov dword [esi + 0x3c0], 0x41ce50
mov dword [esi + 0x3c4], 0x41bfa0
jmp 0x41d9bd
cmp eax, 4
jne 0x41d9bd
mov dword [esi + 0x3c0], 0x41cb70
mov dword [esi + 0x3c4], 0x41bcb0
lea ecx, [edx + 1]
mov dword [ebp + 0xc], 1
imul ecx, eax
xor edi, edi
test ecx, ecx
jle 0x41db16
mov ecx, dword [ebp - 4]
mov ebx, esi
mov edx, dword [ebp + 0x10]
lea eax, [ecx*4]
sub ebx, eax
add edx, 2
mov dword [ebp + 0x14], ebx
mov dword [ebp + 8], edx
nop
cmp edi, ecx
jge 0x41da17
movzx ecx, byte [edx - 2]
movzx eax, byte [edx - 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
jmp 0x41dade
mov eax, edi
mov ebx, dword [esi + edi*4 - 4]
cdq
idiv ecx
test edx, edx
jne 0x41da84
mov edx, dword [ebp + 0xc]
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, ebx
shr eax, 8
xor ecx, edx
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, bl
shl ecx, 8
shr ebx, 0x18
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, edx
movzx ebx, byte [ebx + str.cw]
and al, 0x80
shl ecx, 8
movzx eax, al
or ebx, ecx
neg eax
sbb eax, eax
and edx, 0x7f
and eax, 0x1b
add edx, edx
xor edx, eax
mov dword [ebp + 0xc], edx
jmp 0x41dad1
cmp edx, 4
jne 0x41dad1
cmp ecx, 6
jle 0x41dad1
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + str.cw]
shl eax, 8
or ecx, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx ebx, byte [eax + str.cw]
or ebx, ecx
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
mov ecx, dword [ecx]
xor ecx, ebx
mov ebx, dword [ebp + 0x14]
lea eax, [edi*4]
add edx, 4
mov dword [eax + esi], ecx
inc edi
mov ecx, dword [esi + 0x3ec]
add ebx, 4
mov eax, dword [esi + 0x3e8]
mov dword [ebp - 8], ecx
inc ecx
imul ecx, eax
mov dword [ebp + 8], edx
mov dword [ebp + 0x14], ebx
cmp edi, ecx
mov ecx, dword [ebp - 4]
jl 0x41d9f0
mov edx, dword [ebp - 8]
xor ebx, ebx
test edx, edx
js 0x41dbca
xor edi, edi
test eax, eax
jle 0x41dbbd
nop word [eax + eax]
mov edx, dword [esi + 0x3ec]
mov ecx, edx
sub ecx, ebx
imul ecx, eax
add ecx, edi
mov ecx, dword [esi + ecx*4]
mov dword [ebp + 0x14], ecx
test ebx, ebx
je 0x41dba2
cmp ebx, edx
je 0x41dba2
shr ecx, 0x10
movzx ecx, cl
movzx edx, byte [ecx + str.cw]
mov ecx, dword [ebp + 0x14]
shr ecx, 8
movzx ecx, cl
mov edx, dword [edx*4 + 0x46b300]
movzx ecx, byte [ecx + str.cw]
xor edx, dword [ecx*4 + 0x46b700]
mov ecx, dword [ebp + 0x14]
shr ecx, 0x18
movzx ecx, byte [ecx + str.cw]
xor edx, dword [ecx*4 + 0x46af00]
mov ecx, dword [ebp + 0x14]
movzx ecx, cl
movzx ecx, byte [ecx + str.cw]
xor edx, dword [ecx*4 + 0x46bb00]
mov ecx, edx
imul eax, ebx
add eax, edi
inc edi
mov dword [esi + eax*4 + 0x1e0], ecx
mov eax, dword [esi + 0x3e8]
cmp edi, eax
jl 0x41db30
inc ebx
cmp ebx, dword [esi + 0x3ec]
jle 0x41db20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret