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
push dword [ebp + 8]
xor edi, edi
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
lea eax, [eax + ebx - 3]
pop ecx
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_
pop ecx
mov ebx, eax
cmp ebx, edi
mov dword [ebp + 0xc], ebx
mov dword [ebp - 4], edi
je 0x401d8f
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
mov ecx, ebx
push 1
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
cmp ebx, edi
push 1
pop eax
mov dword [ebp - 4], eax
je 0x401dcf
push eax
mov ecx, ebx
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 [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 ebx, dword [sym.imp.MSVCIRT.dll_public:_class_istream____thiscall_istream::read_char___int_]
pop ecx
test al, al
je 0x401e12
push 2
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_istream____thiscall_istream::seekg_long_int__enum_ios::seek_dir_]
mov ecx, dword [ebp + 0xc]
push 0xfffffffffffffff8
pop eax
sub eax, dword [0x4040e4]
push eax
call esi
mov ecx, dword [ebp + 0xc]
push 4
lea eax, [ebp - 0x10]
push eax
call ebx
mov ecx, dword [ebp + 0xc]
push edi
push edi
call esi
mov eax, dword [ebp - 0x10]
inc eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
pop ecx
push dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
push edi
call ebx
push dword [ebp - 0x10]
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::write_char_const___int_]
mov ecx, dword [ebp - 0x18]
push edi
call esi
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 ebx
push dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
push dword [ebp + 8]
mov ecx, ebx
call esi
mov ecx, dword [ebp + 0xc]
call edi
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, ebx
pop eax
push 4
lea eax, [ebp - 0x10]
push eax
call esi
push 4
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call esi
push dword [0x4040e4]
push dword [0x4040d4]
mov ecx, ebx
call esi
mov ecx, ebx
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 ebx, ebx
je 0x401ee8
mov eax, dword [ebx]
push 1
mov eax, dword [eax + 4]
lea ecx, [eax + ebx]
mov eax, dword [eax + ebx]
call dword [eax]
push dword [ebp - 0x1c]
call fcn.00401f09
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ebx
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret