Function at 0x401ce7
Capabilities:
Move file

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