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 esi
push edi
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_
push edi
mov esi, eax
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_
pop ecx
mov esi, eax
cmp esi, ebx
mov dword [ebp + 0xc], esi
mov dword [ebp - 4], ebx
je 0x401d8f
mov ecx, esi
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
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 [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_
pop ecx
mov esi, eax
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]
push dword [eax]
push 0x80
mov ecx, esi
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 esi, dword [sym.imp.MSVCIRT.dll_public:_class_istream____thiscall_istream::read_char___int_]
pop ecx
test al, al
je 0x401e12
push 2
mov edi, 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 edi
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
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_
pop ebx
push dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
mov edi, eax
push edi
call esi
push dword [ebp - 0x10]
mov ebx, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::write_char_const___int_]
mov ecx, dword [ebp - 0x18]
push edi
call ebx
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov edi, dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ifstream::close_void_]
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]
push dword [ebp + 8]
mov ecx, esi
call ebx
mov ecx, dword [ebp + 0xc]
call edi
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
lea eax, [ebp - 0x10]
pop edi
mov ecx, esi
push 4
push eax
call ebx
lea eax, [ebp - 0x14]
mov ecx, esi
push 4
push eax
call ebx
mov ecx, esi
push dword [0x4040e4]
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 edi
pop edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret