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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x100af982
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov al, byte [ebp + 4]
test al, al
jne 0x1000624d
mov al, byte [esp + 0x70]
mov esi, dword [str.FileCrypt_ERROR:_Encryption_Decryption_Object_not_Initialized_]
mov byte [esp + 0x34], al
xor ebp, ebp
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [esp + 0x38]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x100061e4
mov edi, dword [esp + 0x38]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x3c], ebx
mov byte [eax + ebx], 0
lea ecx, [esp + 0x70]
mov dword [esp + 0x68], ebp
push ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x74], 0x100f029c
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
mov dl, byte [esp + 0x34]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x50], dl
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], ebp
mov ecx, dword [eax]
lea edx, [esp + 0x34]
push ecx
push ebp
push edx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x74], 1
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [sym.imp.MSVCP60.dll_const_std::runtime_error::vftable]
lea ecx, [esp + 0x44]
push 0x100ccb48
push ecx
mov dword [esp + 0x4c], eax
mov byte [esp + 0x70], 0
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 8]
cmp eax, 0x10
jne 0x1000626b
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
push edx
push eax
mov ecx, ebp
call fcn.10005640
jmp 0x100064fe
cdq
and edx, 3
add eax, edx
mov ebx, eax
sar ebx, 2
cmp ebx, 4
jne 0x1000627f
xor eax, eax
jmp 0x10006288
xor eax, eax
cmp ebx, 6
setne al
inc eax
shl eax, 5
test ebx, ebx
mov edx, dword [eax + 0x100c2848]
mov ecx, dword [eax + 0x100c2850]
mov eax, dword [eax + 0x100c2858]
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ecx
lea eax, [ebp + 0x45c]
jle 0x10006311
mov esi, dword [esp + 0x70]
lea ecx, [ebp + 0x38]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ebx
xor ecx, ecx
mov cl, byte [esi]
shl ecx, 0x18
mov dword [eax], ecx
mov edi, dword [eax]
inc esi
xor ecx, ecx
mov cl, byte [esi]
shl ecx, 0x10
or edi, ecx
inc esi
xor ecx, ecx
mov dword [eax], edi
mov ch, byte [esi]
or edi, ecx
inc esi
xor ecx, ecx
mov dword [eax], edi
mov cl, byte [esi]
mov edi, eax
or dword [eax], ecx
mov ecx, dword [esp + 0x10]
inc esi
add eax, 4
mov ecx, dword [ecx]
xor dword [edi], ecx
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add edi, 4
dec ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ecx
jne 0x100062c2
mov ecx, dword [esp + 0x14]
mov esi, dword [ebp + 0x3d8]
mov eax, 1
cmp esi, eax
mov dword [esp + 0x1c], eax
jle 0x10006425
lea eax, [ebp + 0x58]
mov dword [esp + 0x70], eax
test ebx, ebx
jle 0x100063ef
mov eax, dword [esp + 0x70]
mov esi, edx
mov dword [esp + 0x18], eax
mov eax, ecx
mov ecx, dword [esp + 0x20]
sub eax, edx
sub ecx, edx
lea edi, [ebp + 0x43c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x10], ebx
jmp 0x10006367
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
add eax, esi
add edi, 4
cdq
idiv ebx
mov eax, edx
xor edx, edx
mov dl, byte [ebp + eax*4 + 0x45d]
lea eax, [ecx + esi]
mov dword [esp + 0x2c], edx
cdq
idiv ebx
mov eax, dword [ebp + edx*4 + 0x45c]
mov edx, dword [esp + 0x2c]
and eax, 0xff
mov ecx, dword [edx*4 + 0x100c0020]
mov edx, dword [eax*4 + 0x100c0420]
mov eax, esi
xor ecx, edx
cdq
idiv ebx
xor eax, eax
mov al, byte [ebp + edx*4 + 0x45e]
mov edx, dword [eax*4 + 0x100bfc20]
xor ecx, edx
xor edx, edx
mov dl, byte [edi + 0x1f]
mov eax, dword [edx*4 + 0x100bf820]
xor ecx, eax
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
add eax, 4
xor ecx, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
mov dword [edi - 4], ecx
inc esi
dec eax
mov dword [esp + 0x10], eax
jne 0x1000635f
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
mov ecx, ebx
lea esi, [ebp + 0x43c]
lea edi, [ebp + 0x45c]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x70]
mov ecx, dword [ebp + 0x3d8]
inc eax
add esi, 0x20
cmp eax, ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x70], esi
jl 0x1000632f
test ebx, ebx
mov dword [esp + 0x70], 0
jle 0x100064fe
mov esi, dword [esp + 0x74]
lea eax, [ebp + 0x45c]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x20]
sub edx, ecx
sub eax, ecx
mov edi, ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x3d8]
mov ecx, dword [esp + 0x70]
lea edx, [ecx + eax*8]
xor eax, eax
mov ecx, dword [ebp + edx*4 + 0x38]
mov edx, dword [esp + 0x74]
mov al, byte [edx + 3]
mov edx, ecx
sar edx, 0x18
mov al, byte [eax + str.cw]
xor al, dl
mov edx, dword [esp + 0x30]
mov byte [esi], al
inc esi
lea eax, [edx + edi]
cdq
idiv ebx
xor eax, eax
mov al, byte [ebp + edx*4 + 0x45e]
mov edx, ecx
sar edx, 0x10
mov al, byte [eax + str.cw]
xor al, dl
mov byte [esi], al
mov eax, edi
cdq
idiv ebx
xor eax, eax
inc esi
mov al, byte [ebp + edx*4 + 0x45d]
mov edx, ecx
sar edx, 8
mov al, byte [eax + str.cw]
xor al, dl
mov edx, dword [esp + 0x2c]
mov byte [esi], al
inc esi
lea eax, [edx + edi]
cdq
idiv ebx
mov eax, dword [ebp + edx*4 + 0x45c]
and eax, 0xff
mov dl, byte [eax + str.cw]
mov eax, dword [esp + 0x70]
xor dl, cl
mov ecx, dword [esp + 0x74]
mov byte [esi], dl
inc esi
inc eax
add ecx, 4
inc edi
cmp eax, ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
jl 0x10006455
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret 8