Function at 0x401ce7
Capabilities:
Move file

Disassembly:
mov eax, 0x402bec
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x10
push ebx
push esi
push edi
xor ebx, ebx
push dword [ebp + 8]
push ebx
call fcn.00401c43
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
push edi
push ebx
call fcn.00401c43
push edi
mov dword [ebp - 0x14], eax
call sub.MSVCRT.dll_strlen
inc eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
push edi
push esi
mov dword [ebp - 0x1c], esi
call sub.MSVCRT.dll_strcpy
add esp, 0x20
push 0x4040dc
push esi
call sub.MSVCRT.dll_strlen
pop ecx
lea eax, [eax + esi - 3]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x401efa
push 0x5c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
pop ecx
mov dword [ebp + 0xc], esi
cmp esi, ebx
mov dword [ebp - 4], ebx
je 0x401d8f
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
push 1
mov ecx, esi
push dword [eax]
push 0x80
push dword [ebp + 8]
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ifstream::constructor_char_const___int__int_]
mov dword [esi + 0xc], 0x4030f0
mov dword [ebp + 0xc], esi
jmp 0x401d92
mov dword [ebp + 0xc], ebx
or dword [ebp - 4], 0xffffffff
push 0x58
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
pop ecx
mov dword [ebp - 0x18], esi
push 1
cmp esi, ebx
pop eax
mov dword [ebp - 4], eax
je 0x401dcf
push eax
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
mov ecx, esi
push dword [eax]
push 0x80
push edi
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::constructor_char_const___int__int_]
mov dword [esi + 8], 0x4030f4
mov dword [ebp - 0x18], esi
jmp 0x401dd2
mov dword [ebp - 0x18], ebx
push dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
call fcn.00401b5c
mov edi, dword [sym.imp.MSVCIRT.dll_public:_class_istream____thiscall_istream::read_char___int_]
pop ecx
test al, al
je 0x401e12
push 2
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_istream____thiscall_istream::seekg_long_int__enum_ios::seek_dir_]
push 0xfffffffffffffff8
pop eax
sub eax, dword [0x4040e4]
push eax
call esi
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push 4
push eax
call edi
mov ecx, dword [ebp + 0xc]
push ebx
push ebx
call esi
mov eax, dword [ebp - 0x10]
inc eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ebx, eax
push dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
call edi
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::write_char_const___int_]
push ebx
call esi
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ebx, dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ifstream::close_void_]
pop ecx
mov ecx, dword [ebp + 0xc]
call ebx
mov eax, dword [ebp - 0x14]
inc eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [ebp + 8], eax
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
pop ecx
push dword [eax]
mov ecx, dword [ebp + 0xc]
push 0x80
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ifstream::open_char_const___int__int_]
push dword [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
push dword [ebp + 8]
call edi
push dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov ecx, edi
push dword [ebp + 8]
call esi
mov ecx, dword [ebp + 0xc]
call ebx
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
lea eax, [ebp - 0x10]
push 4
push eax
mov ecx, edi
call esi
lea eax, [ebp - 0x14]
push 4
push eax
mov ecx, edi
call esi
push dword [0x4040e4]
mov ecx, edi
push dword [0x4040d4]
call esi
mov ecx, edi
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::close_void_]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x401ed5
mov ecx, dword [eax]
push 1
mov ecx, dword [ecx + 4]
add ecx, eax
mov eax, dword [ecx]
call dword [eax]
test edi, edi
je 0x401ee8
mov eax, dword [edi]
push 1
mov eax, dword [eax + 4]
lea ecx, [eax + edi]
mov eax, dword [eax + edi]
call dword [eax]
push dword [ebp - 0x1c]
call fcn.00401f09
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret