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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov esi, ecx
jne 0x414302
mov dword [ebp + 0xc], str.Empty_key
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.004598a2
push 0x49b58c
lea eax, [ebp - 0x18]
push eax
call fcn.00459987
mov ecx, dword [ebp + 0x10]
push 0x10
pop ebx
cmp ecx, ebx
je 0x41431f
cmp ecx, 0x18
je 0x41431f
cmp ecx, 0x20
je 0x41431f
mov dword [ebp + 0xc], str.Incorrect_key_length
jmp 0x4142e8
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x414339
cmp eax, 0x18
je 0x414339
cmp eax, 0x20
je 0x414339
mov dword [ebp + 0xc], str.Incorrect_block_length
jmp 0x4142e8
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x1c]
cmp eax, edi
mov dword [esi + 0x10], ecx
je 0x41434d
push eax
call fcn.004412f6
pop ecx
push dword [esi + 0x14]
call fcn.004412fb
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x20]
cmp eax, edi
pop ecx
je 0x414367
push eax
call fcn.004412f6
pop ecx
push dword [esi + 0x14]
call fcn.004412fb
push dword [esi + 0x14]
mov dword [esi + 0x20], eax
push dword [ebp + 0xc]
push dword [esi + 0x1c]
call fcn.004568a0
push dword [esi + 0x14]
push dword [ebp + 0xc]
push dword [esi + 0x20]
call fcn.004568a0
add esp, 0x1c
cmp dword [esi + 8], edi
je 0x4143b6
cmp dword [esi + 0x18], edi
jl 0x4143ad
mov eax, dword [esi + 8]
push dword [eax + edi*4]
call fcn.004412f6
inc edi
cmp edi, dword [esi + 0x18]
pop ecx
jle 0x41439b
push dword [esi + 8]
call fcn.004412f6
pop ecx
xor edi, edi
cmp dword [esi + 0xc], edi
je 0x4143dd
cmp dword [esi + 0x18], edi
jl 0x4143d4
mov eax, dword [esi + 0xc]
push dword [eax + edi*4]
call fcn.004412f6
inc edi
cmp edi, dword [esi + 0x18]
pop ecx
jle 0x4143c2
push dword [esi + 0xc]
call fcn.004412f6
pop ecx
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x414401
cmp eax, 0x18
je 0x4143f2
mov dword [esi + 0x18], 0xe
jmp 0x41441e
xor eax, eax
cmp dword [esi + 0x14], 0x20
sete al
lea eax, [eax + eax + 0xc]
jmp 0x41441b
mov eax, dword [esi + 0x14]
cmp eax, ebx
jne 0x41440d
push 0xa
pop eax
jmp 0x41441b
xor ecx, ecx
cmp eax, 0x18
setne cl
lea ecx, [ecx + ecx + 0xc]
mov eax, ecx
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x14]
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, dword [esi + 0x18]
sar edi, 2
xor ecx, ecx
push 4
inc eax
pop edx
mul edx
seto cl
mov dword [ebp + 0x14], edi
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
xor ebx, ebx
cmp dword [esi + 0x18], ebx
pop ecx
mov dword [esi + 8], eax
jl 0x41448a
xor ecx, ecx
push 4
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
pop ecx
mov ecx, dword [esi + 8]
mov dword [ecx + ebx*4], eax
xor eax, eax
test edi, edi
jle 0x414484
mov ecx, dword [esi + 8]
mov ecx, dword [ecx + ebx*4]
and dword [ecx + eax*4], 0
inc eax
cmp eax, edi
jl 0x414475
inc ebx
cmp ebx, dword [esi + 0x18]
jle 0x414452
mov eax, dword [esi + 0x18]
xor ecx, ecx
push 4
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
xor ebx, ebx
cmp dword [esi + 0x18], ebx
pop ecx
mov dword [esi + 0xc], eax
jl 0x4144e5
xor ecx, ecx
push 4
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
pop ecx
mov ecx, dword [esi + 0xc]
mov dword [ecx + ebx*4], eax
xor eax, eax
test edi, edi
jle 0x4144df
mov ecx, dword [esi + 0xc]
mov ecx, dword [ecx + ebx*4]
and dword [ecx + eax*4], 0
inc eax
cmp eax, edi
jl 0x4144d0
inc ebx
cmp ebx, dword [esi + 0x18]
jle 0x4144ad
mov eax, dword [esi + 0x18]
inc eax
imul eax, edi
mov dword [ebp + 0x10], eax
mov eax, dword [esi + 0x10]
cdq
and edx, 3
add eax, edx
mov ebx, eax
sar ebx, 2
xor ecx, ecx
push 4
pop edx
mov eax, ebx
mul edx
seto cl
mov dword [ebp - 0xc], ebx
neg ecx
or ecx, eax
push ecx
call fcn.004412fb
test ebx, ebx
pop ecx
mov ecx, eax
mov eax, dword [ebp + 8]
mov edi, ecx
jle 0x41454c
mov dword [ebp + 0xc], ebx
movzx edx, byte [eax]
shl edx, 0x18
mov dword [edi], edx
inc eax
movzx edx, byte [eax]
shl edx, 0x10
or dword [edi], edx
xor edx, edx
inc eax
mov dh, byte [eax]
or dword [edi], edx
inc eax
movzx edx, byte [eax]
or dword [edi], edx
inc eax
add edi, 4
dec dword [ebp + 0xc]
jne 0x414525
and dword [ebp + 8], 0
test ebx, ebx
jle 0x414592
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x10]
jge 0x414592
cdq
idiv dword [ebp + 0x14]
mov edi, dword [esi + 8]
mov dword [ebp - 8], eax
mov eax, dword [edi + eax*4]
mov edi, dword [ebp + 8]
mov edi, dword [ecx + edi*4]
shl edx, 2
mov dword [edx + eax], edi
mov eax, dword [esi + 0x18]
sub eax, dword [ebp - 8]
mov edi, dword [esi + 0xc]
mov eax, dword [edi + eax*4]
mov edi, dword [ebp + 8]
inc dword [ebp + 8]
cmp dword [ebp + 8], ebx
mov edi, dword [ecx + edi*4]
mov dword [edx + eax], edi
jl 0x414554
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 8], eax
mov edi, 0xff
jge 0x41470d
mov dword [ebp - 4], 0x483470
mov eax, dword [ecx + ebx*4 - 4]
mov dword [ebp + 0xc], eax
sar eax, 0x10
and eax, edi
movsx edx, byte [eax + str.cw]
mov eax, dword [ebp - 4]
movsx eax, byte [eax]
xor edx, eax
movzx eax, byte [ebp + 0xd]
movzx eax, byte [eax + str.cw]
shl edx, 8
xor edx, eax
mov eax, dword [ebp + 0xc]
and eax, edi
movzx eax, byte [eax + str.cw]
shl edx, 8
xor edx, eax
mov eax, dword [ebp + 0xc]
sar eax, 0x18
and eax, edi
movzx eax, byte [eax + str.cw]
shl edx, 8
xor edx, eax
xor dword [ecx], edx
inc dword [ebp - 4]
cmp ebx, 8
je 0x41462e
xor eax, eax
inc eax
cmp ebx, eax
mov dword [ebp + 0xc], eax
jle 0x4146b5
mov eax, dword [ebp + 0xc]
shl eax, 2
lea edx, [eax + ecx]
mov eax, dword [eax + ecx - 4]
xor dword [edx], eax
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], ebx
jl 0x414612
jmp 0x4146b5
mov dword [ebp + 0xc], 1
mov eax, dword [ebp + 0xc]
shl eax, 2
lea edx, [eax + ecx]
mov eax, dword [eax + ecx - 4]
xor dword [edx], eax
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 4
jl 0x414635
mov eax, dword [ecx + 0xc]
mov edx, eax
sar edx, 0x18
mov dword [ebp + 0xc], eax
and edx, edi
movsx edx, byte [edx + str.cw]
sar eax, 0x10
and eax, edi
movzx eax, byte [eax + str.cw]
shl edx, 8
xor edx, eax
movzx eax, byte [ebp + 0xd]
movzx eax, byte [eax + str.cw]
shl edx, 8
xor edx, eax
mov eax, dword [ebp + 0xc]
and eax, edi
movzx eax, byte [eax + str.cw]
shl edx, 8
xor edx, eax
xor dword [ecx + 0x10], edx
mov dword [ebp + 0xc], 5
mov eax, dword [ebp + 0xc]
shl eax, 2
lea edx, [eax + ecx]
mov eax, dword [eax + ecx - 4]
xor dword [edx], eax
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 8
jl 0x41469d
and dword [ebp + 0xc], 0
test ebx, ebx
jle 0x414701
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x10]
jge 0x41470d
cdq
idiv dword [ebp + 0x14]
mov ebx, dword [esi + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebx + eax*4]
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ecx + ebx*4]
shl edx, 2
mov dword [edx + eax], ebx
mov eax, dword [esi + 0x18]
sub eax, dword [ebp - 8]
mov ebx, dword [esi + 0xc]
mov eax, dword [ebx + eax*4]
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ecx + ebx*4]
inc dword [ebp + 0xc]
inc dword [ebp + 8]
mov dword [edx + eax], ebx
mov ebx, dword [ebp - 0xc]
cmp dword [ebp + 0xc], ebx
jl 0x4146bd
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 8], eax
jl 0x4145aa
push ecx
call fcn.004412f6
xor eax, eax
inc eax
cmp dword [esi + 0x18], eax
pop ecx
mov dword [ebp + 8], eax
jle 0x41477f
xor eax, eax
cmp dword [ebp + 0x14], eax
mov dword [ebp + 0xc], eax
jle 0x414774
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ecx + edx*4]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx]
mov edx, eax
sar edx, 0x18
and edx, edi
mov edx, dword [edx*4 + 0x482470]
mov ebx, eax
sar ebx, 0x10
and ebx, edi
xor edx, dword [ebx*4 + 0x482870]
movzx ebx, ah
xor edx, dword [ebx*4 + 0x482c70]
and eax, edi
xor edx, dword [eax*4 + 0x483070]
mov eax, dword [ebp + 0xc]
inc eax
cmp eax, dword [ebp + 0x14]
mov dword [ecx], edx
mov dword [ebp + 0xc], eax
jl 0x414729
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [esi + 0x18]
jl 0x41471f
pop edi
mov byte [esi + 4], 1
pop esi
pop ebx
leave
ret 0x10