Function at 0x40224f
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x429f7c
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x20
and byte [ebp - 0xd], 0
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
push 0x4b
mov dword [ebp - 0x14], edi
mov bl, 1
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], esi
call sub.MFC42.DLL_operatornew
mov dword [ebp - 0x18], eax
pop ecx
lea eax, [ebp - 0x20]
mov ecx, 0x441ef8
push eax
call fcn.0040259b
push dword [eax]
push dword [ebp - 0x18]
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
cmp byte [ebp + 8], 0
je 0x4022b5
mov dword [ebp - 0x24], 0x1000
mov dword [ebp - 0x20], 0x8dd8
jmp 0x4022bc
mov dword [ebp - 0x20], 0x3134
push esi
push 0x80
push 3
push esi
push esi
push SysReAllocString
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
cmp eax, 0xffffffff
mov dword [0x44173c], eax
jne 0x402315
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x43b000]
push eax
call fcn.0041b2ab
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
push dword [ebp + 0xc]
push dword [0x441734]
push str._s__CreateFile_FILE_s_OPEN_EXISTING_ERR_d
push dword [edi]
call esi
add esp, 0x14
xor bl, bl
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x40236d
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x441738], eax
jne 0x40236d
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [0x441734]
push str._s__CreateFile_FILE_s_CREATE_ALWAYS_ERR_d
push dword [eax]
call esi
add esp, 0x14
xor bl, bl
push dword [0x44173c]
call edi
test bl, bl
je 0x40253a
push dword [ebp - 0x20]
mov byte [ebp - 0xd], 1
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 0x1c], eax
jne 0x4023f9
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString_3
push 0x42e9f0
lea eax, [ebp - 0x2c]
xor ebx, ebx
push 0x441734
push eax
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_operator_2
push 0x439354
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator_2
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], bl
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CString::CString
push ebx
push ebx
push dword [ebp - 0x20]
call sub.MFC42.DLL_AfxMessageBox_1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
xor bl, bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x40253a
cmp byte [ebp + 8], 0
je 0x402428
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp - 0x1c]
push 0x4021e0
push 0x402195
call fcn.00428470
add esp, 0x18
jmp 0x40243f
push 0
push dword [ebp - 0x1c]
push 0x4021e0
push 0x402195
call fcn.00427df0
add esp, 0x10
push dword [0x44173c]
mov dword [ebp + 8], eax
call edi
push dword [0x441738]
call edi
cmp word [ebp + 8], 0
mov edi, dword [sym.imp.MSVCRT.dll_remove]
jne 0x402498
cmp dword [ebp + 0x14], 0
jne 0x4024b1
push dword [ebp + 0xc]
call edi
mov ebx, eax
pop ecx
neg ebx
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4024b9
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
mov eax, dword [ebp - 0x14]
push dword [ebp + 0xc]
push dword [0x441734]
push str._s_ERROR_REMOVING_FILE___s__ERRNO___d
push dword [eax]
call esi
add esp, 0x14
jmp 0x4024b1
movzx eax, word [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
push dword [ebp + 0xc]
push str.COMPRESS_ERROR__file___s__rcode___d
push dword [eax]
call esi
add esp, 0x10
xor bl, bl
test bl, bl
je 0x402554
cmp dword [ebp + 0x14], 0
jne 0x4024f9
push dword [ebp + 0xc]
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_rename]
mov ebx, eax
pop ecx
neg ebx
sbb ebx, ebx
pop ecx
inc ebx
test bl, bl
jne 0x40256f
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
mov eax, dword [ebp - 0x14]
push dword [ebp + 0xc]
push dword [0x441734]
push str._s_ERROR_RENAMING_FILE___s__ERRNO___d
push dword [eax]
jmp 0x402533
push dword [ebp + 0x14]
call edi
pop ecx
push dword [ebp + 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_rename]
mov ebx, eax
pop ecx
neg ebx
sbb ebx, ebx
pop ecx
inc ebx
test bl, bl
jne 0x40256f
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
mov eax, dword [ebp - 0x14]
push dword [ebp + 0x14]
push dword [0x441734]
push str._s_ERROR_RENAMING_FILE___s__ERRNO___d
push dword [eax]
call esi
add esp, 0x14
jmp 0x402550
cmp byte [ebp - 0xd], 0
je 0x402550
push dword [0x44173c]
call edi
push dword [0x441738]
call edi
test bl, bl
jne 0x40256f
push dword [0x442410]
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x43b000]
push 0x42e9a0
push dword [eax]
call fcn.0041b07d
cmp dword [ebp - 0x1c], 0
je 0x40257f
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push dword [ebp - 0x18]
call sub.MFC42.DLL_operatordelete
pop ecx
pop edi
mov ecx, dword [ebp - 0xc]
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10