Function at 0x401630
Capabilities:
Copy file
Delete file

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4023b8
push eax
mov eax, 0x1048
mov dword fs:[0], esp
call fcn.00402030
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x34]
call fcn.00402014
lea ecx, [esp + 0x44]
mov dword [esp + 0x1060], 0
call fcn.00402014
mov edi, dword [esp + 0x106c]
mov byte [esp + 0x1060], 1
test edi, edi
je 0x401880
mov ebp, dword [esp + 0x1068]
cmp ebp, 1
jl 0x401880
cmp ebp, 2
jg 0x401880
push 1
lea ecx, [esp + 0x28]
call fcn.00401000
push 6
lea ecx, [esp + 0x18]
mov byte [esp + 0x1064], 2
call fcn.00401000
push str.pmThis.tmp
lea ecx, [esp + 0x18]
mov byte [esp + 0x1064], 3
call fcn.00401500
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call fcn.00401560
mov esi, dword [eax]
lea ecx, [esp + 0x54]
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1064], 4
call fcn.00401560
mov eax, dword [eax]
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x54]
call fcn.00401fc0
lea ecx, [esp + 0x10]
mov byte [esp + 0x1060], 3
call fcn.00401fc0
lea edx, [esp + 0x10]
lea ecx, [esp + 0x14]
push edx
call fcn.00401560
mov eax, dword [eax]
push 0
push 0x8000
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x106c], 5
call sub.MFC42.DLL_CFile::Open
test eax, eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x1060], 3
sete bl
call fcn.00401fc0
test bl, bl
je 0x4017d6
lea ecx, [esp + 0x20]
mov byte [esp + 0x1060], 8
call fcn.00401fc0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1060], 7
call fcn.00401fc0
lea ecx, [esp + 0x18]
mov byte [esp + 0x1060], 6
call fcn.00401fc0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1060], 2
call fcn.00401fc0
lea ecx, [esp + 0x30]
mov byte [esp + 0x1060], 0xb
call fcn.00401fc0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1060], 0xa
call fcn.00401fc0
mov byte [esp + 0x1060], 9
jmp 0x401866
push 0
push 0x9001
push edi
lea ecx, [esp + 0x50]
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x4018c0
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x20]
mov byte [esp + 0x1060], 0xe
call fcn.00401fc0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1060], 0xd
call fcn.00401fc0
lea ecx, [esp + 0x18]
mov byte [esp + 0x1060], 0xc
call fcn.00401fc0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1060], 2
call fcn.00401fc0
lea ecx, [esp + 0x30]
mov byte [esp + 0x1060], 0x11
call fcn.00401fc0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1060], 0x10
call fcn.00401fc0
mov byte [esp + 0x1060], 0xf
lea ecx, [esp + 0x28]
call fcn.00401fc0
lea ecx, [esp + 0x24]
mov byte [esp + 0x1060], 1
call fcn.00401fc0
lea ecx, [esp + 0x44]
mov byte [esp + 0x1060], 0
call sub.MFC42.DLL_CFile::CFile
lea ecx, [esp + 0x34]
mov dword [esp + 0x1060], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
xor eax, eax
mov ecx, dword [esp + 0x1058]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1054
ret
mov esi, dword [sym.imp.MSVCRT.dll_atol]
push 0x4040e9
call esi
push 0x404079
mov edi, eax
call esi
mov esi, eax
mov eax, ebp
add esp, 8
dec eax
je 0x4018f2
dec eax
jne 0x401901
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFile::GetLength
sub eax, esi
mov edi, esi
jmp 0x401909
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFile::GetLength
sub eax, esi
sub eax, edi
jmp 0x401909
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFile::Seek
mov ebp, 0x1000
xor ebx, ebx
mov eax, edi
sub eax, ebx
cmp eax, ebp
jae 0x401926
mov ebp, eax
lea eax, [esp + 0x58]
push ebp
push eax
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFile::Read
mov esi, eax
test esi, esi
je 0x401965
xor eax, eax
test esi, esi
jbe 0x401950
mov cl, byte [esp + eax + 0x58]
inc eax
not cl
mov byte [esp + eax + 0x57], cl
cmp eax, esi
jb 0x401941
lea edx, [esp + 0x58]
push esi
push edx
lea ecx, [esp + 0x4c]
call sub.MFC42.DLL_CFile::Write
add ebx, esi
cmp ebx, edi
jb 0x40191c
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CFile::Close
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call fcn.00401560
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x10]
call fcn.00401fc0
lea ecx, [esp + 0x20]
mov byte [esp + 0x1060], 0x14
call fcn.00401fc0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1060], 0x13
call fcn.00401fc0
lea ecx, [esp + 0x18]
mov byte [esp + 0x1060], 0x12
call fcn.00401fc0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1060], 2
call fcn.00401fc0
lea ecx, [esp + 0x30]
mov byte [esp + 0x1060], 0x17
call fcn.00401fc0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1060], 0x16
call fcn.00401fc0
lea ecx, [esp + 0x28]
mov byte [esp + 0x1060], 0x15
call fcn.00401fc0
lea ecx, [esp + 0x24]
mov byte [esp + 0x1060], 1
call fcn.00401fc0
lea ecx, [esp + 0x44]
mov byte [esp + 0x1060], 0
call sub.MFC42.DLL_CFile::CFile
lea ecx, [esp + 0x34]
mov dword [esp + 0x1060], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
mov eax, 1
jmp 0x4018a7