Function at 0x402150
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x457802
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x46af24]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 1
cmp dword [eax + 0x64], 0
je 0x4022c7
mov eax, dword [eax + 0x9c]
mov edi, 0x31
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4021b0
sub eax, edx
sar eax, 1
je 0x4022c7
push 0x60000
call dword [sym.imp.mfc100u.dll_new]
mov esi, eax
add esp, 4
test esi, esi
je 0x4022f9
push 0x60000
push 0
push esi
call sub.MSVCR100.dll_memset
lea ebx, [esi + 0x30000]
push ebx
lea eax, [esi + 0x20000]
push eax
mov eax, dword [ebp + 8]
lea ecx, [esi + 0x10000]
push ecx
mov ecx, dword [eax + 0x9c]
push esi
push ecx
call dword [sym.imp.MSVCR100.dll__wsplitpath]
add esp, 0x20
push ebx
push edi
lea eax, [esi + 0x20000]
push eax
lea eax, [esi + 0x10000]
push eax
push esi
lea edx, [ebp - 0x10]
push str._s_s_s_02d_s
push edx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
push ebx
lea eax, [edi - 1]
push eax
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x20000]
push eax
lea eax, [esi + 0x10000]
push eax
push esi
lea eax, [ebp - 0x14]
push str._s_s_s_02d_s
push eax
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
mov ecx, dword [ebp - 0x10]
push 0
push ecx
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 0x40
test eax, eax
jne 0x402276
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test edi, edi
jle 0x402297
mov eax, dword [ebp - 0x14]
push 0
push eax
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 8
test eax, eax
jne 0x4022b2
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
push ecx
push edx
jmp 0x4022a5
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov eax, dword [eax + 0x9c]
push ecx
push eax
call dword [sym.imp.MSVCR100.dll__wrename]
add esp, 8
test eax, eax
jne 0x4022ef
mov edi, dword [ebp - 0x18]
test edi, edi
jns 0x402213
push esi
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov eax, 0x6d62
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4