Function at 0x408010
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41b4b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1254
call fcn.0041a8a0
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], esp
mov ecx, dword [ebp + 0x1c]
xor esi, esi
push 0x42a5c8
mov dword [ebp - 0x20], edi
mov dword [eax], esi
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x1c], esi
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [ebp + 8]
mov eax, dword [edi + 0xe8]
mov byte [ebp - 4], 1
mov edx, dword [ecx + 0x10]
mov ecx, dword [eax + 0x18]
push edx
push ecx
lea edx, [ebp - 0x14]
push 0x4254c8
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x2c]
push eax
push ecx
mov ecx, edi
call fcn.0040a840
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x14]
mov eax, dword [0x42a950]
push edx
push str.CSyncEngine::DownloadOneFileFromServer__File_URL___s
push 1
push eax
mov byte [ebp - 4], 3
call fcn.00404890
mov ecx, dword [edi + 0xe8]
mov dword [ebp - 0x60], str.image_gif
mov dword [ebp - 0x5c], str.image_x_xbitmap
mov dword [ebp - 0x58], str.image_jpeg
mov dword [ebp - 0x54], str.image_pjpeg
mov dword [ebp - 0x50], str.application_x_shockwave_flash
mov dword [ebp - 0x4c], str.application_vnd.ms_excel
mov dword [ebp - 0x48], str.application_vnd.ms_powerpoint
mov dword [ebp - 0x44], str.application_msword
mov dword [ebp - 0x40], 0x426404
mov dword [ebp - 0x3c], esi
mov eax, dword [ecx + 0x24]
add esp, 0x10
cmp eax, esi
mov ebx, 0xa0400000
jle 0x408174
mov edx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer____set_cert_flag_1
push 2
push edx
call fcn.00404890
mov ecx, dword [ebp + 0x14]
mov eax, 1
add esp, 0xc
cmp ecx, eax
mov ebx, 0xa0c00000
je 0x408159
mov ecx, dword [edi + 0xe8]
cmp dword [ecx + 0x24], eax
jne 0x408174
mov edx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer____set_cert_ignore_flag_2
push 2
push edx
mov ebx, 0xa0c03000
call fcn.00404890
add esp, 0xc
mov ecx, dword [ebp - 0x18]
push ebx
lea eax, [ebp - 0x60]
push str.HTTP_1.1
push eax
push 1
push esi
push ecx
mov ecx, dword [edi + 0xe4]
push 0x426374
call sub.MFC42.DLL_CHttpConnection::OpenRequest
mov ebx, eax
cmp ebx, esi
mov dword [ebp - 0x1c], ebx
jne 0x4081e5
mov edx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__OpenRequest___Return_NULL
push 4
push edx
call fcn.00404890
add esp, 0xc
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
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 0x18
mov eax, dword [edi + 0xe8]
mov eax, dword [eax + 0x24]
cmp eax, esi
jle 0x408232
cmp dword [ebp + 0x14], 1
je 0x4081fd
cmp eax, 1
jne 0x408232
mov ecx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__Try_to_SetOption_____set_cert_ignore_flag_3
push 2
push ecx
mov dword [ebp + 0x14], esi
call fcn.00404890
mov ecx, dword [ebp + 0x14]
add esp, 0xc
or ecx, 0x3380
lea edx, [ebp + 0x14]
push esi
push 4
mov dword [ebp + 0x14], ecx
push edx
push 0x1f
mov ecx, ebx
call sub.MFC42.DLL_CInternetFile::SetOption
push esi
push esi
push esi
push esi
mov ecx, ebx
call sub.MFC42.DLL_CHttpFile::SendRequest
lea eax, [ebp - 0x2c]
mov ecx, ebx
push eax
call sub.MFC42.DLL_CHttpFile::QueryInfoStatusCode
cmp eax, esi
je 0x40887f
cmp dword [ebp - 0x2c], 0xc8
jne 0x40887f
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x34]
push ecx
push ecx
lea esi, [edx + 0x14]
mov ecx, esp
mov dword [ebp + 0x14], esp
push esi
mov dword [ebp - 0x34], 0
call sub.MFC42.DLL_CString::CString_1
call fcn.00401430
add esp, 8
cmp eax, 1
je 0x408319
cmp eax, 0xfffffffe
jne 0x4082ab
mov eax, dword [esi]
mov ecx, dword [0x42a950]
push eax
push str.CSyncEngine::DownloadOneFileFromServer___s____Directory_path_unknown.
push 4
push ecx
call fcn.00404890
add esp, 0x10
jmp 0x4082e6
cmp eax, 0xfffffffd
jne 0x4082ca
mov edx, dword [esi]
mov eax, dword [0x42a950]
push edx
push str.CSyncEngine::DownloadOneFileFromServer___s____Invalid_directory_path.
push 4
push eax
call fcn.00404890
add esp, 0x10
jmp 0x4082e6
mov ecx, dword [ebp - 0x34]
mov edx, dword [esi]
mov eax, dword [0x42a950]
push ecx
push edx
push str.CSyncEngine::DownloadOneFileFromServer___s____Directory_creation_or_exists__failed.__GetLastError___is__d_
push 4
push eax
call fcn.00404890
add esp, 0x14
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffff8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 8]
push ecx
mov ecx, edi
call fcn.00408bc0
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi]
push 0x4261d8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x4083b2
mov edx, dword [esi]
mov eax, dword [0x42a950]
push edx
push str.CSyncEngine::DownloadOneFileFromServer__Local_File_Open__s__Fail
push 4
push eax
call fcn.00404890
mov ecx, dword [0x42a950]
add esp, 0x10
call fcn.00404d50
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x54]
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x30], esi
cmp dword [eax + 8], esi
je 0x4083de
mov ecx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__Write_transfer_encoded_chunked_file._So_the_total_size_of_the_file_is_unknown.
push 1
push ecx
mov dword [ebp - 0x28], 0xa000
call fcn.00404890
add esp, 0xc
jmp 0x4083ee
mov eax, dword [eax + 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [edi + 0x2c]
push 0x64
push esi
add ecx, 0xac
call fcn.004031f0
mov ecx, dword [edi + 0x2c]
push esi
add ecx, 0xac
call fcn.00403220
mov dword [ebp - 0x38], 1
mov dword [ebp + 0x14], esi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 8]
test eax, eax
jne 0x408430
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x28]
cmp edx, eax
jge 0x4084f4
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x1263]
mov byte [ebp - 0x1264], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x1264]
push 0x1000
stosb byte es:[edi], al
mov eax, dword [ebx]
push ecx
mov ecx, ebx
call dword [eax + 0x3c]
mov esi, eax
test esi, esi
jg 0x408700
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4084de
mov edx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__pHttpFile__Read_pBuf__sizeof_pBuf_____No_data.
push 4
push edx
call fcn.00404890
mov eax, dword [ebp - 0x24]
add esp, 0xc
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [ebx]
add esp, 4
mov ecx, ebx
call dword [edx + 0x54]
test ebx, ebx
je 0x4084a4
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffff6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp - 0x20]
push 0x64
mov ecx, dword [ecx + 0x2c]
add ecx, 0xac
call fcn.00403220
mov edi, dword [ebp + 8]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [edi + 0xc]
add esp, 4
cmp eax, 0xffffffff
jne 0x40856c
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
lea eax, [ebp + 8]
push 0
push eax
push 0x1d
mov ecx, ebx
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CHttpFile::QueryInfo
mov ecx, dword [ebp + 8]
push str.gzip
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x408559
mov dword [edi + 0xc], 1
mov edx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__Content_encoding_GZIP.
push 1
push edx
call fcn.00404890
add esp, 0xc
jmp 0x408560
mov dword [edi + 0xc], 0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x54]
test ebx, ebx
je 0x408580
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx + 4]
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x1c], 0
cmp eax, 1
jne 0x40861d
mov ecx, dword [ebp - 0x20]
lea eax, [ebp + 8]
lea esi, [edi + 0x14]
push eax
push esi
call fcn.0040cee0
test eax, eax
jne 0x4085f3
mov ecx, dword [esi]
mov edx, dword [0x42a950]
push ecx
push str.CSyncEngine::DownloadOneFileFromServer__UnCompressGzipFile__s__Failed.
push 4
push edx
call fcn.00404890
add esp, 0x10
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
mov edx, dword [esi]
push eax
mov eax, dword [0x42a950]
push ecx
push edx
push str.CSyncEngine::DownloadOneFileFromServer__UnCompressGzipFile__s__Success._nCurrentServerReadSize_d_dwUnCompressSize_d
push 1
push eax
call fcn.00404890
mov eax, dword [ebp + 8]
add esp, 0x18
test eax, eax
jbe 0x40861d
mov dword [ebp + 0x14], eax
mov eax, dword [edi + 8]
test eax, eax
jne 0x408679
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
je 0x408679
push eax
push ecx
mov ecx, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__Server_File_Size___d__Write_File_Size___d
push 4
push ecx
call fcn.00404890
add esp, 0x14
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp - 0x20]
push edi
call fcn.00408ba0
test eax, eax
jge 0x4086d0
mov edx, dword [0x42a950]
push eax
push str.CSyncEngine::DownloadOneFileFromServer__SetDownFileModifyDate___Fail__RetVal___d
push 4
push edx
call fcn.00404890
add esp, 0x10
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x30]
mov edx, dword [ebp + 0x14]
push eax
push esi
lea ecx, [ebp - 0x1264]
add edi, esi
add edx, esi
push 1
push ecx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], edi
mov dword [ebp + 0x14], edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, esi
je 0x4087a4
mov edx, dword [0x42a950]
push eax
push str.CSyncEngine::DownloadOneFileFromServer__fwrite___Fail__RetVal___d
push 1
push edx
call fcn.00404890
mov eax, dword [ebp - 0x24]
add esp, 0x10
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [ebx]
add esp, 4
mov ecx, ebx
call dword [edx + 0x54]
test ebx, ebx
je 0x40876a
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffff7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 8]
mov ecx, dword [ebp - 0x28]
test eax, eax
je 0x4087db
cmp edi, ecx
jl 0x4087c6
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x30], 0
push 0
mov ecx, dword [edx + 0x2c]
jmp 0x4087f5
lea eax, [edi + edi*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ecx
push eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x2c]
jmp 0x4087f5
test ecx, ecx
je 0x408800
mov eax, dword [ebp + 0x14]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ecx
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 0x2c]
push eax
add ecx, 0xac
call fcn.00403220
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x18]
test eax, eax
je 0x408418
push eax
mov eax, dword [0x42a950]
push str.CSyncEngine::DownloadOneFileFromServer__m_nRequestStopFlag___d
push 1
push eax
call fcn.00404890
mov ecx, dword [ebp - 0x24]
add esp, 0x10
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [ebx]
add esp, 4
mov ecx, ebx
call dword [edx + 0x54]
test ebx, ebx
je 0x408845
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffff9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
mov eax, dword [0x42a950]
push ecx
push edx
push str.CSyncEngine::DownloadOneFileFromServer__QueryInfoStatusCode__s__Return___d
push 4
push eax
call fcn.00404890
mov edx, dword [ebx]
add esp, 0x14
mov ecx, ebx
call dword [edx + 0x54]
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 0xfffffffe
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x18