Function at 0x401ef5
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
mov eax, 0x42930e
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x78
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov esi, ecx
jne 0x401f54
mov al, byte [ebp + 0xb]
mov esi, dword [str.FileCrypt_ERROR:_No_Key_DataSpecified_]
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x48]
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x48]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
push 1
pop ebx
cmp dword [ebp + 0xc], ebx
jge 0x401fa2
mov al, byte [ebp + 0xb]
mov esi, dword [str.FileCrypt_ERROR:_Key_Data_Length_should_be___0_]
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x48]
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x48]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
mov ebx, dword [ebp + 0x14]
cmp ebx, 0x10
je 0x401ffd
cmp ebx, 0x18
je 0x401ffd
cmp ebx, 0x20
je 0x401ffd
mov al, byte [ebp + 0xb]
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov esi, str.Illegal_Key_Length_
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x48]
push eax
mov dword [ebp - 4], 2
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x48]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 0x18]
cmp eax, 0x10
je 0x402059
cmp eax, 0x18
je 0x402059
cmp eax, 0x20
je 0x402059
mov al, byte [ebp + 0xb]
mov esi, dword [str.Illegal_Block_Size_]
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x48]
push eax
mov dword [ebp - 4], 3
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x48]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp + 0x1c]
cmp edx, edi
jl 0x402466
cmp edx, 2
jg 0x402466
mov ecx, dword [ebp + 0x20]
cmp ecx, edi
jl 0x40241c
cmp ecx, 2
jg 0x40241c
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], ecx
xor ecx, ecx
xor edx, edx
cmp ebx, edi
jle 0x4020ab
mov eax, dword [ebp + 8]
inc ecx
mov al, byte [edx + eax]
mov byte [ebp + ecx - 0x85], al
lea eax, [edx + 1]
cdq
idiv dword [ebp + 0xc]
cmp ecx, ebx
jl 0x40208f
mov eax, dword [ebp + 0x18]
push eax
lea edi, [esi + 0x3dc]
push dword [ebp + 0x10]
mov dword [esi + 8], eax
push edi
call sub.MSVCRT.dll_memcpy
push dword [esi + 8]
lea eax, [esi + 0x3fc]
push edi
push eax
call sub.MSVCRT.dll_memcpy
lea eax, [ebp - 0x84]
push ebx
push eax
lea eax, [esi + 0x18]
push eax
mov dword [esi + 0xc], ebx
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0xc]
add esp, 0x24
cmp eax, 0x10
je 0x40210f
cmp eax, 0x18
je 0x4020fe
mov dword [esi + 0x3d8], 0xe
jmp 0x402133
xor eax, eax
cmp dword [esi + 8], 0x20
sete al
dec eax
and al, 0xfe
add eax, 0xe
jmp 0x40212d
mov eax, dword [esi + 8]
cmp eax, 0x10
jne 0x40211c
push 0xa
pop eax
jmp 0x40212d
xor ecx, ecx
cmp eax, 0x18
setne cl
dec ecx
and ecx, 0xfffffffe
add ecx, 0xe
mov eax, ecx
mov dword [esi + 0x3d8], eax
mov eax, dword [esi + 8]
push 4
cdq
pop ecx
idiv ecx
xor edx, edx
cmp dword [esi + 0x3d8], edx
mov dword [ebp + 0xc], eax
jl 0x402165
lea ebx, [esi + 0x38]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x402159
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
inc edx
add ebx, 0x20
cmp edx, dword [esi + 0x3d8]
jle 0x40214c
xor edx, edx
cmp dword [esi + 0x3d8], edx
jl 0x40218e
lea ebx, [esi + 0x1f8]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x402182
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
inc edx
add ebx, 0x20
cmp edx, dword [esi + 0x3d8]
jle 0x402175
mov eax, dword [esi + 0x3d8]
push 4
inc eax
pop ecx
imul eax, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
mov eax, dword [esi + 0xc]
cdq
idiv ecx
lea ecx, [ebp - 0x84]
mov edi, eax
lea eax, [esi + 0x41c]
test edi, edi
mov dword [ebp + 0x20], edi
jle 0x4021e1
mov edx, edi
movzx ebx, byte [ecx]
shl ebx, 0x18
inc ecx
mov dword [eax], ebx
movzx ebx, byte [ecx]
shl ebx, 0x10
or dword [eax], ebx
inc ecx
xor ebx, ebx
mov bh, byte [ecx]
or dword [eax], ebx
inc ecx
movzx ebx, byte [ecx]
or dword [eax], ebx
inc ecx
add eax, 4
dec edx
jne 0x4021bc
and dword [ebp + 8], 0
test edi, edi
jle 0x402234
lea ecx, [esi + 0x41c]
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 8], eax
jge 0x402234
mov eax, dword [ebp + 8]
mov ebx, dword [ecx]
cdq
idiv dword [ebp + 0xc]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 8]
cdq
idiv dword [ebp + 0xc]
mov eax, dword [ebp + 0x18]
lea eax, [edx + eax*8]
mov dword [esi + eax*4 + 0x38], ebx
mov eax, dword [esi + 0x3d8]
sub eax, dword [ebp + 0x18]
inc dword [ebp + 8]
lea eax, [edx + eax*8]
mov edx, dword [ecx]
add ecx, 4
cmp dword [ebp + 8], edi
mov dword [esi + eax*4 + 0x1f8], edx
jl 0x4021ef
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 8], eax
jge 0x402398
mov dword [ebp + 0x1c], 0x432280
mov eax, dword [esi + edi*4 + 0x418]
mov edx, dword [ebp + 0x1c]
mov dword [ebp + 0x18], eax
xor ecx, ecx
mov cl, byte [ebp + 0x1a]
movsx edx, byte [edx]
movsx ecx, byte [ecx + str.cw]
xor ecx, edx
xor edx, edx
mov dl, ah
shl ecx, 8
movzx edx, byte [edx + str.cw]
xor ecx, edx
mov edx, 0xff
and eax, edx
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
xor eax, eax
mov al, byte [ebp + 0x1b]
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
xor dword [esi + 0x41c], ecx
inc dword [ebp + 0x1c]
cmp edi, 8
je 0x4022c6
cmp edi, 1
jle 0x402338
lea eax, [esi + 0x420]
lea ecx, [edi - 1]
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x4022b9
jmp 0x402338
push 3
lea eax, [esi + 0x420]
pop ecx
mov ebx, dword [eax - 4]
xor dword [eax], ebx
add eax, 4
dec ecx
jne 0x4022cf
mov eax, dword [esi + 0x428]
xor ecx, ecx
mov dword [ebp + 0x18], eax
xor ebx, ebx
mov cl, byte [ebp + 0x1b]
mov bl, byte [ebp + 0x1a]
push 3
movsx ecx, byte [ecx + str.cw]
movzx ebx, byte [ebx + str.cw]
shl ecx, 8
xor ecx, ebx
xor ebx, ebx
mov bl, ah
and eax, edx
shl ecx, 8
movzx ebx, byte [ebx + str.cw]
movzx eax, byte [eax + str.cw]
xor ecx, ebx
shl ecx, 8
xor ecx, eax
lea eax, [esi + 0x430]
xor dword [esi + 0x42c], ecx
pop ecx
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x40232d
and dword [ebp + 0x18], 0
test edi, edi
jle 0x40238c
lea ecx, [esi + 0x41c]
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 8], eax
jge 0x402398
mov eax, dword [ebp + 8]
mov ebx, dword [ecx]
cdq
idiv dword [ebp + 0xc]
mov edi, eax
mov eax, dword [ebp + 8]
cdq
idiv dword [ebp + 0xc]
lea eax, [edx + edi*8]
mov dword [esi + eax*4 + 0x38], ebx
mov eax, dword [esi + 0x3d8]
sub eax, edi
inc dword [ebp + 0x18]
mov edi, dword [ebp + 0x20]
lea eax, [edx + eax*8]
mov edx, dword [ecx]
add ecx, 4
inc dword [ebp + 8]
cmp dword [ebp + 0x18], edi
mov dword [esi + eax*4 + 0x1f8], edx
jl 0x402346
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 8], eax
jl 0x402247
push 1
pop eax
cmp dword [esi + 0x3d8], eax
mov dword [ebp + 0x14], eax
jle 0x402407
lea eax, [esi + 0x218]
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x4023f5
mov edi, dword [ebp + 8]
mov eax, dword [edi]
xor edx, edx
mov dword [ebp + 0x18], eax
xor ebx, ebx
mov dl, byte [ebp + 0x1b]
mov bl, byte [ebp + 0x1a]
mov edx, dword [edx*4 + 0x431280]
xor edx, dword [ebx*4 + 0x431680]
xor ebx, ebx
mov bl, ah
and eax, 0xff
xor edx, dword [ebx*4 + 0x431a80]
xor edx, dword [eax*4 + 0x431e80]
mov dword [edi], edx
add edi, 4
dec ecx
jne 0x4023b9
inc dword [ebp + 0x14]
add dword [ebp + 8], 0x20
mov eax, dword [ebp + 0x14]
cmp eax, dword [esi + 0x3d8]
jl 0x4023af
mov ecx, dword [ebp - 0xc]
mov byte [esi + 4], 1
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x1c
mov al, byte [ebp + 0xb]
mov esi, dword [str.FileCrypt_ERROR:_Illegal_Padding_Mode_]
push edi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x64]
push eax
mov dword [ebp - 4], 5
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x64]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
mov al, byte [ebp + 0xb]
mov esi, dword [str.FileCrypt_ERROR:_Illegal_Operation_Mode_]
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x48]
push eax
mov dword [ebp - 4], 4
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x48]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, 0x429321
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x30
cmp byte [ecx + 4], 0
jne 0x40250d
mov al, byte [ebp - 0xd]
push esi
mov esi, dword [str.FileCrypt_ERROR:_Encryption_Decryption_Object_not_Initialized_]
push 0
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x20]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
and dword [ebp - 4], 0
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [ebp - 0x3c]
push 0x435260
push eax
call sub.MSVCRT.dll__CxxThrowException
pop esi
push dword [ecx + 8]
lea eax, [ecx + 0x3dc]
add ecx, 0x3fc
push eax
push ecx
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov dword fs:[0], ecx
leave
ret