Function at 0x40159a
Capabilities:
Move file
Read file on windows
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x118
mov dword [ebp - 0x110], ecx
mov dword [ebp - 0xf4], sym.___gxx_personality_sj0
mov dword [ebp - 0xf0], 0x4cbf20
lea eax, [ebp - 0xec]
lea edi, [ebp - 0x18]
mov dword [eax], edi
mov edx, 0x401dfb
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [ebp - 0x10c]
mov dword [esp], eax
call dbg._Unwind_SjLj_Register
call dbg.__main
call method.std::chrono::_V2::system_clock.now__
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x30], str.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], 0
mov dword [esp], 0x4d13ed
mov dword [ebp - 0x108], 0xffffffff
call dbg.printf
mov eax, dword [ebp - 0x110]
cmp dword [eax], 2
jg 0x4016d3
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
mov dword [esp], str.Argument_error._Usage:
call sym._fwrite
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov ebx, dword [ebp - 0x110]
mov edx, dword [ebx + 4]
mov edx, dword [edx]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._fputs
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x12
mov dword [esp + 4], 1
mov dword [esp], str._filename_password
call sym._fwrite
mov dword [esp], 1
call sym._exit
mov esi, dword [ebp - 0x110]
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
mov dword [ebp - 0x3c], eax
mov dword [esp + 4], 0x4d141a
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0x108], 0xffffffff
call sym._fopen
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x401767
call sym.__errno
mov eax, dword [eax]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call sym._strerror
mov dword [ebp - 0x110], eax
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov ebx, dword [ebp - 0x110]
mov dword [esp + 0xc], ebx
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Error_opening_file___s_:__s_n
mov dword [esp], eax
call dbg.fprintf
mov dword [esp], 2
call sym._exit
mov dword [esp + 4], str.File_
mov dword [esp], 0x4d07a0
mov dword [ebp - 0x108], 0xffffffff
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov edx, dword [ebp - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], str._opened.
mov dword [esp], eax
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp + 4], 0x2e
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._strrchr
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], eax
mov dword [esp + 4], str.ext_
mov dword [esp], str._s__s_n
call dbg.printf
mov dword [esp + 4], str..c4p
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x401810
mov dword [ebp - 0x1c], 1
mov dword [esp], str..c4p_file_extension____decrypting...
call sym._puts
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0x108], 0xffffffff
call sym._ftell
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._rewind
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov dword [esp], str.Input_file_name:__s__size:__u_bytes._n
call dbg.printf
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4018b6
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x18
mov dword [esp + 4], 1
mov dword [esp], str.Error_allocating_memory_
call sym._fwrite
mov dword [esp], 3
call sym._exit
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
mov dword [ebp - 0x108], 0xffffffff
call sym._fread
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x48]
je 0x401926
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x22
mov dword [esp + 4], 1
mov dword [esp], str.Error_reading_from_file_to_buffer_
call sym._fwrite
mov dword [esp], 4
call sym._exit
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x48], eax
jbe 0x4019f2
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x4c]
add eax, edx
movzx eax, byte [eax]
mov byte [ebp - 0x55], al
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
add eax, edx
movzx edx, byte [eax]
movzx eax, byte [ebp - 0x55]
xor eax, edx
mov byte [ebp - 0x56], al
mov eax, dword [ebp - 0x20]
cdq
idiv dword [ebp - 0x34]
mov dword [ebp - 0x5c], edx
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
mov byte [ebp - 0x25], al
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x20]
cdq
shr edx, 0x1d
add eax, edx
and eax, 7
sub eax, edx
cmp dword [ebp - 0x2c], eax
jge 0x4019bc
movzx eax, byte [ebp - 0x25]
add eax, eax
mov edx, eax
movzx eax, byte [ebp - 0x25]
sar eax, 7
or eax, edx
mov byte [ebp - 0x25], al
add dword [ebp - 0x2c], 1
jmp 0x40198f
movzx eax, byte [ebp - 0x25]
xor byte [ebp - 0x56], al
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x4c]
add edx, eax
movzx eax, byte [ebp - 0x56]
mov byte [edx], al
add dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x54]
jne 0x4019e9
mov dword [ebp - 0x24], 0
jmp 0x401942
add dword [ebp - 0x24], 1
jmp 0x401942
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0x108], 0xffffffff
call sym._rewind
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sym._fwrite
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x48]
je 0x401a6d
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.Writing_error
call sym._fwrite
mov dword [esp], 5
call sym._exit
call method.std::chrono::_V2::system_clock.now__
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], edx
lea eax, [ebp - 0x90]
mov dword [esp + 4], eax
lea eax, [ebp - 0x98]
mov dword [esp], eax
call sym.__ZNSt6chronomiINS_3_V212system_clockENS_8durationIxSt5ratioILx1ELx1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10t
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0x108], 0xffffffff
call sym.__ZNSt6chrono13duration_castINS_8durationIxSt5ratioILx1ELx1000EEEExS2_ILx1ELx1000000000EEEENSt9enable_ifIXsrNS_13__is_duration
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], edx
lea eax, [ebp - 0xa0]
mov ecx, eax
call dbg.std::chrono::duration<long long, std::ratio<1ll, 1000 >::count() const
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], str.XORing_done_in__dms.
call dbg.printf
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], 0x4d150f
call dbg.printf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], 1
mov dword [esp], str._bytes_written._n
call sym._fwrite
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._fclose
cmp dword [ebp - 0x1c], 0
jne 0x401c3d
lea eax, [ebp - 0x62]
mov ecx, eax
call fcn.004731e0
lea eax, [ebp - 0x7c]
lea edx, [ebp - 0x62]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x38]
mov dword [esp], edx
mov dword [ebp - 0x108], 1
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0xb8]
mov dword [esp + 8], str..c4p
lea edx, [ebp - 0x7c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [ebp - 0x108], 2
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, char const*)
lea eax, [ebp - 0x7c]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x62]
mov ecx, eax
call sym.std::allocator_char_::allocator__
lea eax, [ebp - 0xb8]
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov dword [esp], str.mode__encrypt._filename___s__newfilename___s__n
mov dword [ebp - 0x108], 3
call dbg.printf
lea eax, [ebp - 0xb8]
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._rename
test eax, eax
setne al
test al, al
je 0x401c12
mov dword [esp], str.enc_Error_renaming_file
call sym._perror
jmp 0x401c30
mov dword [esp + 4], str.File_encrypted._Added_.c4p_extension._n
mov dword [esp], 0x4d07a0
mov dword [ebp - 0x108], 3
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea eax, [ebp - 0xb8]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
cmp dword [ebp - 0x1c], 1
jne 0x401dcd
mov dword [esp + 4], str.mode__decrypt
mov dword [esp], 0x4d07a0
mov dword [ebp - 0x108], 0xffffffff
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
lea eax, [ebp - 0x61]
mov ecx, eax
call fcn.004731e0
lea eax, [ebp - 0xd0]
lea edx, [ebp - 0x61]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x38]
mov dword [esp], edx
mov dword [ebp - 0x108], 4
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0x61]
mov ecx, eax
call sym.std::allocator_char_::allocator__
lea eax, [ebp - 0xd0]
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.length___const
cmp eax, 4
seta al
test al, al
je 0x401cff
lea eax, [ebp - 0xd0]
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.length___const
lea edx, [eax - 4]
lea eax, [ebp - 0xd0]
mov dword [esp + 4], 0xffffffff
mov dword [esp], edx
mov dword [ebp - 0x108], 5
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.erase_unsigned_int__unsigned_int_
sub esp, 8
jmp 0x401d2e
mov dword [esp + 4], str.String_is_too_short_to_be_shortened_by_4_characters.
mov dword [esp], 0x4d07a0
mov dword [ebp - 0x108], 5
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp + 4], str.Shortened_Filename:
mov dword [esp], 0x4d07a0
mov dword [ebp - 0x108], 5
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea edx, [ebp - 0xd0]
mov dword [esp + 4], edx
mov dword [esp], eax
call method.std::basic_ostream_char__std::char_traits_char____std::operator____char__std::char_traits_char___std.allocator_char____std::basic_ostream_char__std::char_traits_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char
mov dword [esp], method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
lea eax, [ebp - 0xd0]
mov ecx, eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._rename
test eax, eax
setne al
test al, al
je 0x401da2
mov dword [esp], str.dec_Error_renaming_file
call sym._perror
jmp 0x401dc0
mov dword [esp + 4], str.File_decrypted._Removed_.c4p_extension._n
mov dword [esp], 0x4d07a0
mov dword [ebp - 0x108], 5
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea eax, [ebp - 0xd0]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
mov eax, 0
mov dword [ebp - 0x110], eax
jmp 0x401ed9
lea eax, [ebp - 0x10c]
mov dword [esp], eax
call sym.__Unwind_SjLj_Unregister
mov eax, dword [ebp - 0x110]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret