Function at 0x407020
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41b3f3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x244
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x4c], esi
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x40706e
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xe8]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [0x42a950]
push ecx
push edx
push str.CSyncEngine::ProcDownloadFilesInListFromServer__Start_Download_From_Server__s___d_
push 1
push eax
call fcn.00404890
mov ecx, dword [esi + 0x2c]
add esp, 0x14
add ecx, 0x37c
push 0x42a5c8
call fcn.00403990
mov ecx, dword [esi + 0x2c]
push 0x42592c
add ecx, 0x434
call fcn.00403990
mov edi, dword [esi + 0xcc]
mov ecx, dword [esi + 0x2c]
push edi
push ebx
add ecx, 0x100
mov dword [ebp - 0x38], edi
call fcn.004031f0
mov ecx, dword [0x42a950]
push edi
push str.CSyncEngine::ProcDownloadFilesInListFromServer__Total_File_Count___d
push 1
push ecx
call fcn.00404890
add esp, 0x10
cmp edi, ebx
jg 0x407101
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc4]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x3c], 1
mov dword [ebp - 4], ebx
test eax, eax
je 0x407581
mov edx, dword [eax]
mov ebx, dword [eax + 8]
mov eax, dword [ebp - 0x18]
mov ecx, dword [esi + 0x2c]
inc eax
add ecx, 0x100
push eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x18], eax
call fcn.00403220
lea eax, [ebx + 0x10]
lea ecx, [ebp - 0x14]
push eax
call sub.MFC42.DLL_CString::CString_1
push 0x2f
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::ReverseFind
test eax, eax
jl 0x40717f
inc eax
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x48]
push eax
call sub.MFC42.DLL_CString::Mid
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CString::CString_2
test edi, edi
mov byte [ebp - 4], 3
je 0x4071c9
fild dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
sub esp, 8
lea edx, [ebp - 0x30]
fmul qword [0x41dd98]
fidiv dword [ebp - 0x38]
fstp qword [esp]
push edi
push ecx
push str._d____d____3.1lf___
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp - 0x30]
mov ecx, dword [esi + 0x2c]
add esp, 0x18
add ecx, 0x2c4
push eax
call fcn.00403990
lea ecx, [ebp - 0x28]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [ebx + 8]
mov byte [ebp - 4], 5
test eax, eax
je 0x4071f7
push str.unknown
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::operator_1
jmp 0x407212
lea ecx, [ebp - 0x1c]
lea edx, [ebx + 0x2c]
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x44], esp
push edx
call sub.MFC42.DLL_CString::CString_1
call fcn.00405130
add esp, 8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
lea edx, [ebp - 0x28]
push 0x4252f4
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp - 0x28]
mov ecx, dword [esi + 0x2c]
add esp, 0x10
add ecx, 0x37c
push eax
call fcn.00403990
mov ecx, dword [esi + 0x2c]
push 0x42592c
add ecx, 0x434
call fcn.00403990
push 0x42a5c8
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x34], 0
call fcn.0041a252
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x24]
push edx
mov edx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x104]
lea ecx, [ebp - 0x34]
push ecx
push eax
push edi
push edx
push ebx
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.00408010
mov edi, eax
mov eax, dword [esi + 0xe8]
cmp dword [eax + 0x24], 2
jne 0x407345
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x104]
test eax, eax
jne 0x407345
mov edx, dword [ebp - 0x34]
push edx
call fcn.0040ff20
test eax, eax
je 0x407345
push 0x4250dc
lea ecx, [ebp - 0x2c]
call fcn.0041a252
push 0x4250a0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::operator_2
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x2c]
push eax
call fcn.0041a53a
mov ecx, dword [ebp - 0x2c]
push 0
push 0x34
push ecx
call sub.MFC42.DLL_AfxMessageBox_1
cmp eax, 6
jne 0x407339
mov eax, dword [0x42a950]
test eax, eax
je 0x407310
push str.CSyncEngine::ProcDownloadFilesInListFromServer__Retry_DownloadOneFileFromServer__
push 2
push eax
call fcn.00404890
add esp, 0xc
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x104], 1
mov edx, dword [ebp - 0x38]
push ecx
push 1
push edx
push eax
push ebx
mov ecx, esi
call fcn.00408010
mov edi, eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
test edi, edi
jge 0x407466
mov dword [ebx + 0x30], 0
mov ecx, dword [0x42a950]
push edi
push str.CSyncEngine::ProcDownloadFilesInListFromServer__DownloadFilesInListFromServer___Fail__RetVal___d
push 1
push ecx
call fcn.00404890
lea eax, [edi + 6]
add esp, 0x10
cmp eax, 5
ja case.default.0x407373
jmp dword [eax*4 + 0x407650]
mov edx, dword [ebx + 0x10]
push edi
push edx
lea eax, [esi + 0xdc]
push 0x4257f4
push eax
jmp 0x4073e3
mov ecx, dword [ebx + 0x10]
push edi
push ecx
lea edx, [esi + 0xdc]
push 0x4257c4
push edx
jmp 0x4073e3
mov eax, dword [ebx + 0x10]
push edi
push eax
push 0x425778
jmp 0x4073dc
mov edx, dword [ebx + 0x10]
push edi
push edx
lea eax, [esi + 0xdc]
push 0x42573c
push eax
jmp 0x4073e3
mov ecx, dword [ebx + 0x10]
push edi
push ecx
lea edx, [esi + 0xdc]
push 0x425700
push edx
jmp 0x4073e3
mov eax, dword [ebx + 0x10]
push edi
push eax
push 0x4256d4
lea ecx, [esi + 0xdc]
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ecx, dword [esi + 0x2c]
lea edx, [esi + 0xdc]
push edx
push 1
call fcn.00411d50
mov eax, dword [ebx + 0x14]
mov ecx, dword [0x42a950]
push eax
push str.CSyncEngine::ProcDownloadFilesInListFromServer__Delete_Local_Flle___s
push 3
push ecx
call fcn.00404890
mov eax, dword [ebx + 0x14]
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x407458
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
je 0x407458
call edi
mov edx, dword [ebx + 0x14]
push eax
mov eax, dword [0x42a950]
push edx
push str.CSyncEngine::ProcDownloadFilesInListFromServer__DeleteFile__s__Error__ErrCode___d
push 4
push eax
call fcn.00404890
mov ecx, dword [0x42a950]
add esp, 0x14
call fcn.00404d50
cmp dword [ebx], 0
jne 0x40746d
mov dword [ebp - 0x3c], 0
jmp 0x40746d
mov dword [ebx + 0x30], 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
cmp dword [ebx + 0x30], 1
jne 0x407533
mov eax, dword [ebx + 0x1c]
cmp eax, 7
je 0x407499
cmp eax, 8
je 0x407499
cmp eax, 9
jne 0x407533
push 0x34
call sub.MFC42.DLL_operatornew
mov ecx, eax
add esp, 4
mov dword [ebp - 0x44], ecx
test ecx, ecx
mov byte [ebp - 4], 8
je 0x4074b9
call section..text
mov edi, eax
jmp 0x4074bb
xor edi, edi
mov dword [edi + 0x30], 1
mov ecx, dword [ebx + 0x20]
mov dword [edi + 0x20], ecx
mov edx, dword [ebx + 0x1c]
lea eax, [ebx + 0x2c]
lea ecx, [edi + 0x2c]
push eax
mov byte [ebp - 4], 5
mov dword [edi + 0x1c], edx
call sub.MFC42.DLL_CString::operator
lea ecx, [ebx + 0x28]
push ecx
lea ecx, [edi + 0x28]
call sub.MFC42.DLL_CString::operator
lea eax, [ebx + 0x10]
lea ecx, [edi + 0x10]
push eax
call sub.MFC42.DLL_CString::operator
lea edx, [ebx + 0x14]
lea ecx, [edi + 0x14]
push edx
call sub.MFC42.DLL_CString::operator
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov ecx, dword [ebx + 0xc]
mov dword [edi + 0xc], ecx
mov ebx, dword [ebx + 0x1c]
cmp ebx, 7
jne 0x40751c
push edi
lea ecx, [esi + 0x6c]
jmp 0x40752e
cmp ebx, 9
push edi
lea ecx, [esi + 0x88]
je 0x40752e
lea ecx, [esi + 0xa4]
call sub.MFC42.DLL_CPtrList::AddTail
mov eax, dword [esi + 0x18]
test eax, eax
je 0x407595
mov edx, dword [0x42a950]
push eax
push str.CSyncEngine::ProcDownloadFilesInListFromServer__m_nRequestStopFlag___d
push 1
push edx
call fcn.00404890
add esp, 0x10
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
mov edi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x40]
jmp 0x407114