Function at 0x401220
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404b88
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1a4], edi
push 0xb8
lea eax, [ebp - 0x1a0]
mov dword [ebp - 0x14], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, edi
cmp dword [edi + 0x14], 7
jbe 0x40127c
mov esi, dword [edi]
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x1a0], 0x405484
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x190]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0x14], 2
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x1a0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x1a4], eax
lea ecx, [ebp - 0x190]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0x190]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x148], 0
mov byte [ebp - 0x153], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x408680]
mov ecx, dword [0x408684]
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], ecx
mov dword [ebp - 0x158], 0
push ecx
push 0x21
push esi
lea ecx, [ebp - 0x190]
mov byte [ebp - 4], 2
call fcn.00402ed0
test eax, eax
jne 0x40136f
push eax
mov eax, dword [ebp - 0x1a0]
lea ecx, [ebp - 0x1a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0x1a0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x1a4], eax
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x1a0]
mov eax, dword [ebp - 0x1a0]
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
test al, al
je 0x4013ef
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
mov edx, str.Failed_to_open_file_for_reading:
call fcn.00403010
cmp dword [edi + 0x14], 7
mov edx, edi
jbe 0x4013d0
mov edx, dword [edi]
push 0x403240
push dword [edi + 0x10]
mov ecx, eax
call fcn.004038d0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
jmp 0x4017d9
mov eax, dword [ebp - 0x1a0]
xor edx, edx
mov byte [ebp - 0x1af], dl
xorps xmm0, xmm0
mov word [ebp - 0x1a8], 1
mov cl, 1
mov eax, dword [eax + 4]
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov esi, dword [ebp + eax - 0x168]
test esi, esi
sete al
mov byte [ebp - 0x1b0], al
mov edi, dword [ebp - 0x1b0]
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x1a8]
mov dword [ebp - 0x34], edi
mov edi, dword [ebp - 0x1a4]
test al, al
jne 0x401480
mov al, cl
test esi, esi
je 0x401471
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void_]
mov cl, byte [ebp - 0x1a8]
mov edx, eax
mov al, cl
cmp edx, 0xffffffff
je 0x401471
mov byte [ebp - 0x13], dl
xor edx, edx
mov byte [ebp - 0x14], 1
mov eax, dword [ebp - 0x14]
jmp 0x401486
xor esi, esi
mov byte [ebp - 0x14], 1
mov cl, al
xor edx, edx
mov eax, dword [ebp - 0x14]
jmp 0x401486
mov eax, dword [ebp - 0x1b0]
test cl, cl
jne 0x401495
mov byte [ebp - 0x34], 1
xor edx, edx
mov ecx, dword [ebp - 0x34]
jmp 0x40149b
mov ecx, dword [ebp - 0x1a8]
test esi, esi
jne 0x4016e7
test edx, edx
je 0x4016ef
push ecx
push ecx
push edx
push eax
push esi
lea ecx, [ebp - 0x30]
call fcn.00403ac0
lea ecx, [ebp - 0x190]
mov byte [ebp - 4], 4
call fcn.00402e40
test eax, eax
jne 0x4014e3
push eax
mov eax, dword [ebp - 0x1a0]
lea ecx, [ebp - 0x1a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
cmp dword [ebp - 0x1c], 0xf
lea edx, [ebp - 0x30]
mov esi, dword [ebp - 0x20]
lea eax, [ebp - 0x30]
cmova edx, dword [ebp - 0x30]
cmova eax, dword [ebp - 0x30]
add esi, edx
movaps xmm1, xmmword [str.KKKKKKKKKKKKKKKK]
xor ecx, ecx
mov edx, esi
sub edx, eax
cmp eax, esi
cmova edx, ecx
test edx, edx
je 0x401554
cmp edx, 0x40
jb 0x401554
and edx, 0xffffffc0
nop dword [eax + eax]
movups xmm0, xmmword [eax]
add ecx, 0x40
xorps xmm0, xmm1
movups xmmword [eax], xmm0
movups xmm0, xmmword [eax + 0x10]
xorps xmm0, xmm1
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [eax + 0x20]
xorps xmm0, xmm1
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [eax + 0x30]
xorps xmm0, xmm1
movups xmmword [eax + 0x30], xmm0
add eax, 0x40
cmp ecx, edx
jne 0x401520
cmp eax, esi
je 0x401560
xor byte [eax], 0x4b
inc eax
cmp eax, esi
jne 0x401558
push 0xb0
lea eax, [ebp - 0xe8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, edi
cmp dword [edi + 0x14], 7
jbe 0x401580
mov esi, dword [edi]
lea ecx, [ebp - 0x80]
mov dword [ebp - 0xe8], 0x40547c
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xe4]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0xe8]
mov dword [ebp - 0x14], 3
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xec], eax
lea ecx, [ebp - 0xe4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xe4], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x9c], 0
mov byte [ebp - 0xa7], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x408680]
mov ecx, dword [0x408684]
mov dword [ebp - 0x98], 0
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xac], 0
push ecx
push 0x22
push esi
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 7
call fcn.00402ed0
test eax, eax
jne 0x40166d
push eax
mov eax, dword [ebp - 0xe8]
lea ecx, [ebp - 0xe8]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xec], eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xe8]
mov eax, dword [ebp - 0xe8]
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
test al, al
je 0x401706
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
mov edx, str.Failed_to_open_file_for_writing:
call fcn.00403010
cmp dword [edi + 0x14], 7
mov edx, edi
jbe 0x4016cb
mov edx, dword [edi]
push 0x403240
push dword [edi + 0x10]
mov ecx, eax
call fcn.004038d0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
jmp 0x40174a
test edx, edx
je 0x4014ab
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
jmp 0x4014b8
cmp dword [ebp - 0x1c], 0xf
lea eax, [ebp - 0x30]
push 0
push dword [ebp - 0x20]
cmova eax, dword [ebp - 0x30]
lea ecx, [ebp - 0xe8]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
lea ecx, [ebp - 0xe4]
call fcn.00402e40
test eax, eax
jne 0x40174a
push eax
mov eax, dword [ebp - 0xe8]
lea ecx, [ebp - 0xe8]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xec], eax
lea ecx, [ebp - 0xe4]
call fcn.004029c0
lea ecx, [ebp - 0xe0]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x80]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0xf
jbe 0x4017c7
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4017bd
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4017bd
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00403de8
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
mov eax, dword [ebp - 0x1a0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x1a4], eax
lea ecx, [ebp - 0x190]
call fcn.004029c0
lea ecx, [ebp - 0x188]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x130]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403daa
mov esp, ebp
pop ebp
ret