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 edi, edi
push dword [ebp + 8]
push edi
call fcn.00401c43
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
push esi
push edi
call fcn.00401c43
push esi
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 ebx, eax
push esi
push ebx
mov dword [ebp - 0x1c], ebx
call sub.MSVCRT.dll_strcpy
add esp, 0x20
push 0x4040dc
push ebx
call sub.MSVCRT.dll_strlen
pop ecx
lea eax, [eax + ebx - 3]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push ebx
push esi
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 ebx, eax
pop ecx
mov dword [ebp + 0xc], ebx
cmp ebx, edi
mov dword [ebp - 4], edi
je 0x401d8f
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
push 1
mov ecx, ebx
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 [ebx + 0xc], 0x4030f0
mov dword [ebp + 0xc], ebx
jmp 0x401d92
mov dword [ebp + 0xc], edi
or dword [ebp - 4], 0xffffffff
push 0x58
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
pop ecx
mov dword [ebp - 0x18], ebx
push 1
cmp ebx, edi
pop eax
mov dword [ebp - 4], eax
je 0x401dcf
push eax
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
mov ecx, ebx
push dword [eax]
push 0x80
push esi
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::constructor_char_const___int__int_]
mov dword [ebx + 8], 0x4030f4
mov dword [ebp - 0x18], ebx
jmp 0x401dd2
mov dword [ebp - 0x18], edi
push dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
call fcn.00401b5c
mov esi, 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 ebx, 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 ebx
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push 4
push eax
call esi
mov ecx, dword [ebp + 0xc]
push edi
push edi
call ebx
mov eax, dword [ebp - 0x10]
inc eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ebx
mov edi, eax
push dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
push edi
call esi
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov ebx, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::write_char_const___int_]
push edi
call ebx
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov edi, dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ifstream::close_void_]
pop ecx
mov ecx, dword [ebp + 0xc]
call edi
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 esi
push dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov ecx, esi
push dword [ebp + 8]
call ebx
mov ecx, dword [ebp + 0xc]
call edi
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop edi
lea eax, [ebp - 0x10]
push 4
push eax
mov ecx, esi
call ebx
lea eax, [ebp - 0x14]
push 4
push eax
mov ecx, esi
call ebx
push dword [0x4040e4]
mov ecx, esi
push dword [0x4040d4]
call ebx
mov ecx, esi
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 esi, esi
je 0x401ee8
mov eax, dword [esi]
push 1
mov eax, dword [eax + 4]
lea ecx, [eax + esi]
mov eax, dword [eax + esi]
call dword [eax]
push dword [ebp - 0x1c]
call fcn.00401f09
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret