Function at 0x506410
Capabilities:
Check if file exists
Delete file
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x599339
mov eax, dword fs:[0]
push eax
sub esp, 0x51c
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x508], edi
mov al, byte [ebp + 8]
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x500], 0
xorps xmm0, xmm0
mov byte [ebp - 0x4f1], al
mov byte [ebp - 0x4f8], al
movq qword [ebp - 0x420], xmm0
mov dword [ebp - 0x418], 0
call fcn.0051e9a0
push dword [ebp - 0x4f8]
mov eax, dword [edi]
lea ecx, [ebp - 0x420]
push 0
mov dword [ebp - 4], 0
push dword [eax]
push 0x5a4fa4
call fcn.0051ebf0
test al, al
jne 0x5064cf
push str.Unable_to_open_HTTP_transaction
push 0xcb
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x14
mov byte [ebp - 0x4f1], 0
jmp 0x506ed8
push dword [edi + 0xc]
mov ecx, dword [edi + 4]
push dword [edi + 8]
call fcn.00505e80
xorps xmm0, xmm0
mov dword [ebp - 0x4e4], 0
push 0x200
lea eax, [ebp - 0x210]
movlpd qword [ebp - 0x4ec], xmm0
push 0
push eax
movlpd qword [ebp - 0x4d8], xmm0
movlpd qword [ebp - 0x4d0], xmm0
mov dword [ebp - 0x4c8], 0
movlpd qword [ebp - 0x4bc], xmm0
mov dword [ebp - 0x4f0], 0x3c
call fcn.00556180
push 0x200
lea eax, [ebp - 0x410]
push 0
push eax
call fcn.00556180
add esp, 0x18
mov dword [ebp - 0x4dc], 0x100
lea eax, [ebp - 0x210]
mov dword [ebp - 0x4c0], 0x100
mov dword [ebp - 0x4e0], eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x4c4], eax
lea eax, [ebp - 0x4f0]
push eax
mov eax, dword [edi + 0x10]
push 0
push 0
push dword [eax]
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x5065b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.WinHttpCrackUrl_failed___d___url:__s
push 0xde
jmp 0x50681e
cmp word [ebp - 0x4d8], 0
jne 0x5065dd
cmp dword [ebp - 0x4e4], 2
mov eax, 0x50
mov ecx, 0x1bb
cmove eax, ecx
mov word [ebp - 0x4d8], ax
mov eax, dword [edi]
lea ecx, [ebp - 0x420]
push dword [eax]
lea eax, [ebp - 0x210]
push dword [ebp - 0x4d8]
push eax
call fcn.0051ea40
test al, al
jne 0x506628
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_connection_failed___d___url:__s
push 0xec
jmp 0x50681e
xor eax, eax
mov ecx, 0x800000
cmp dword [ebp - 0x4e4], 2
cmove eax, ecx
lea ecx, [ebp - 0x420]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x410]
push eax
push 0x5bb0b0
call fcn.0051ec40
test al, al
jne 0x506686
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_GET_request_failed___d___url:__s
push 0xf5
jmp 0x50681e
push 0x40000000
push 0xffffffffffffffff
push str.Cache_Control:_no_cache
lea ecx, [ebp - 0x420]
call fcn.0051ea10
test al, al
jne 0x5066cc
mov eax, dword [edi + 0x10]
mov esi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
push str.HTTP_add_request_headers_failed___d___url:__s
push 0xfb
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 3
call fcn.00500de0
add esp, 0x1c
push 0
push 0
lea ecx, [ebp - 0x420]
call fcn.0051ee00
test al, al
jne 0x50673a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
cmp byte [ebp - 0x4f1], 0
mov eax, 0x5d633c
mov ecx, 0x5cab20
cmove ecx, eax
mov eax, dword [edi + 0x10]
push ecx
push dword [eax]
push esi
push str.HTTP_send_request_failed___d___url:__s__ignore_proxy_flag__s
push 0x103
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x20
mov byte [ebp - 0x4f1], 0
jmp 0x506ed8
lea ecx, [ebp - 0x420]
call fcn.0051ede0
test al, al
jne 0x506774
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_receive_response_failed___d___url:__s
push 0x10b
jmp 0x50681e
lea ecx, [ebp - 0x420]
call fcn.0051ed20
mov dword [ebp - 0x4f8], eax
cmp eax, 0xc8
je 0x5067d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push dword [ebp - 0x4f8]
push str.HTTP_status___d__error___d___url:__s
push 0x114
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x20
mov byte [ebp - 0x4f1], 0
jmp 0x506ed8
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x43c], 0
push eax
lea ecx, [ebp - 0x420]
call fcn.0051ec80
test al, al
jne 0x50683e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505c80
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_query_content_length___d___url:__s
push 0x11d
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x1c
mov byte [ebp - 0x4f1], 0
jmp 0x506ed8
mov eax, dword [ebp - 0x43c]
mov ecx, 0x100000
cmp eax, ecx
cmova eax, ecx
mov dword [ebp - 0x50c], eax
push eax
mov byte [ebp - 4], 1
call fcn.0056027d
mov esi, eax
add esp, 4
mov dword [ebp - 0x510], esi
test esi, esi
jne 0x5068ab
mov ecx, dword [edi + 4]
push eax
push 2
push dword [edi + 8]
call fcn.00505c80
push dword [ebp - 0x50c]
push str.Unable_to_allocate__d_bytes
push 0x126
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x18
mov byte [ebp - 0x4f1], 0
jmp 0x506ecf
mov eax, dword [edi + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x5068f4
xor ecx, ecx
mov dword [ebp - 0x438], 0
mov word [ebp - 0x438], cx
lea ecx, [ebp - 0x438]
push eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
call fcn.00424550
lea eax, [ebp - 0x438]
mov ecx, 1
jmp 0x506910
push 0x2f
push dword [ebp - 0x4c4]
lea eax, [ebp - 0x528]
push eax
call fcn.00507ef0
add esp, 0xc
mov ecx, 2
mov dword [ebp - 0x458], 0
xor edx, edx
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x458], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x448], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], dx
mov dword [ebp - 4], 3
test cl, 2
je 0x50697e
and ecx, 0xfffffffd
mov dword [ebp - 0x4f8], ecx
lea ecx, [ebp - 0x528]
call fcn.00424580
mov ecx, dword [ebp - 0x4f8]
mov byte [ebp - 4], 4
test cl, 1
je 0x506992
lea ecx, [ebp - 0x438]
call fcn.00424580
cmp dword [ebp - 0x448], 0
jne 0x506a02
mov eax, dword [edi + 0x14]
cmp dword [eax], 0
je 0x5069c3
push str.empty_filename
push 0x12f
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x14
jmp 0x5069e7
push dword [ebp - 0x4c4]
push str.Unable_to_extract_the_filename_from_url___s_
push 0x133
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x18
mov ecx, dword [edi + 4]
push 0
push 3
push dword [edi + 8]
call fcn.00505c80
mov byte [ebp - 0x4f1], 0
jmp 0x506ec4
cmp dword [ebp - 0x444], 8
lea ecx, [ebp - 0x458]
mov eax, dword [edi + 0x1c]
cmovae ecx, dword [ebp - 0x458]
push 0x5c
push ecx
push dword [eax]
lea eax, [ebp - 0x438]
push eax
call fcn.005076b0
mov ecx, eax
add esp, 0x10
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x500], ecx
mov dword [ebp - 0x4f8], eax
cmp eax, ecx
je 0x506ab9
mov edx, dword [eax + 0x14]
cmp edx, 8
jb 0x506a87
mov eax, dword [eax]
lea ecx, [edx*2 + 2]
cmp ecx, 0x1000
jb 0x506a71
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x506f5e
mov eax, edx
push ecx
push eax
call fcn.00554162
mov eax, dword [ebp - 0x4f8]
add esp, 8
mov ecx, dword [ebp - 0x500]
mov dword [eax + 0x10], 0
xor edx, edx
mov dword [eax + 0x14], 7
mov word [eax], dx
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [eax + 0x10], xmm0
xor eax, eax
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], 7
mov word [ecx], ax
lea ecx, [ebp - 0x438]
call fcn.00424580
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506acf
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x506caa
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x18]
mov dword [ebp - 0x4fc], ecx
cmp byte [eax], 0
je 0x506d24
mov edx, dword [ecx + 0x10]
mov eax, SysReAllocString
sub eax, edx
mov dword [ebp - 0x4f8], edx
cmp eax, 4
jb 0x506f59
cmp dword [ecx + 0x14], 8
jb 0x506b1a
mov ecx, dword [ecx]
mov dword [ebp - 0x4fc], ecx
add edx, 4
mov dword [ebp - 0x438], 0
mov edi, 7
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x438]
mov dword [ebp - 0x504], edx
mov dword [ebp - 0x500], eax
cmp edx, edi
jbe 0x506ba6
mov edi, edx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x506b6a
mov edi, SysReAllocString
jmp 0x506b74
mov eax, 0xa
cmp edi, eax
cmovb edi, eax
xor ecx, ecx
mov eax, edi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x438]
call fcn.00425a60
mov ecx, dword [ebp - 0x4fc]
mov edx, dword [ebp - 0x504]
mov dword [ebp - 0x500], eax
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x424], edi
mov edi, dword [ebp - 0x4f8]
add edi, edi
mov dword [ebp - 0x428], edx
push edi
push ecx
push eax
call fcn.00555c00
mov eax, dword [ebp - 0x500]
xor edx, edx
mov ecx, dword [ebp - 0x4f8]
add esp, 0xc
mov dword [edi + eax], 0x62002e
mov dword [edi + eax + 4], 0x6b0061
mov word [eax + ecx*2 + 8], dx
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 5
cmovae eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [ebp - 0x508]
lea ecx, [ebp - 0x438]
cmp dword [ebp - 0x424], 8
cmovae ecx, dword [ebp - 0x438]
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506c2b
mov eax, dword [eax]
push ecx
push eax
call fcn.0056d65b
add esp, 8
test eax, eax
je 0x506c9b
call fcn.0055ec15
mov ecx, dword [edi + 4]
mov eax, dword [eax]
push eax
push 4
push dword [edi + 8]
mov dword [ebp - 0x504], eax
call fcn.00505c80
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506c5f
mov eax, dword [eax]
push eax
push dword [ebp - 0x504]
push str.Unable_to_rename_the_old_file___d_:__s
push 0x146
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x1c
lea ecx, [ebp - 0x438]
call fcn.00424580
mov byte [ebp - 0x4f1], 0
jmp 0x506ec4
lea ecx, [ebp - 0x438]
mov byte [ebp - 4], 4
call fcn.00424580
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506cb5
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4fc], eax
cmp eax, 0xffffffff
jne 0x506d66
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x508]
mov edi, eax
push edi
push 5
push dword [ecx + 8]
mov ecx, dword [ecx + 4]
call fcn.00505c80
push edi
push str.CreateFile_failed___d_
push 0x159
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x18
mov byte [ebp - 0x4f1], 0
jmp 0x506ec4
cmp dword [ecx + 0x14], 8
jb 0x506d2c
mov ecx, dword [ecx]
push ecx
push str.File_already_exists:__s
push 0x14e
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 3
call fcn.00500de0
mov ecx, dword [edi + 4]
add esp, 0x18
push 0
push 1
push dword [edi + 8]
call fcn.00505c80
mov byte [ebp - 0x4f1], 1
jmp 0x506ec4
lea ecx, [ebp - 0x4b4]
call fcn.0051dcc0
lea eax, [ebp - 0x414]
mov byte [ebp - 4], 6
push eax
push dword [ebp - 0x50c]
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x414], 0
push esi
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x4f8], 0
call fcn.0051edb0
test al, al
je 0x506e3a
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x506e3a
push 0
lea ecx, [ebp - 0x440]
push ecx
push eax
push esi
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x506f06
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x4f8]
push eax
add ecx, eax
push ecx
push dword [ebp - 0x43c]
mov dword [ebp - 0x4f8], ecx
push dword [edi + 0xc]
mov ecx, dword [edi + 4]
push dword [edi + 8]
call fcn.00505bf0
push dword [ebp - 0x414]
lea ecx, [ebp - 0x4b4]
push esi
call fcn.0051e8f0
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x50c]
lea ecx, [ebp - 0x420]
push esi
call fcn.0051edb0
test al, al
jne 0x506db4
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x504]
push eax
lea ecx, [ebp - 0x4b4]
call fcn.0051dd10
push dword [eax]
mov ecx, dword [edi + 0x24]
mov byte [ebp - 4], 7
call fcn.00424550
mov ecx, dword [ebp - 0x504]
or eax, 0xffffffff
mov byte [ebp - 4], 6
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x506ea4
mov eax, dword [ecx]
mov dword [ebp - 0x4f8], eax
push ecx
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x5a0478]
mov ecx, dword [ebp - 0x4f8]
call edi
mov edi, dword [ebp - 0x508]
mov ecx, dword [edi + 4]
push 0
push 0
push dword [edi + 8]
call fcn.00505c80
mov byte [ebp - 0x4f1], 1
mov dword [ebp - method.XMLUpdater::v2::CMD5Checksum.virtual_0], vtable.XMLUpdater::v2::CMD5Checksum.0
lea ecx, [ebp - 0x458]
call fcn.00424580
push esi
call fcn.0055e7dd
add esp, 4
lea ecx, [ebp - 0x420]
call fcn.0051e9c0
mov al, byte [ebp - 0x4f1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00553cca
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x508]
mov edi, eax
push edi
push 6
push dword [ecx + 8]
mov ecx, dword [ecx + 4]
call fcn.00505c80
push edi
push str.WriteFile_failed___d_
push 0x167
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500de0
add esp, 0x18
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x4f1], 0
jmp 0x506eba
call fcn.004213b0
call fcn.0055eb27
int3