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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x599809
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.0051ea80
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.0051ecd0
test al, al
jne 0x5065df
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.00500ef0
add esp, 0x14
mov byte [ebp - 0x4f1], 0
jmp 0x506fe8
push dword [edi + 0xc]
mov ecx, dword [edi + 4]
push dword [edi + 8]
call fcn.00505f90
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.00556260
push 0x200
lea eax, [ebp - 0x410]
push 0
push eax
call fcn.00556260
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 0x5066c8
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.00505d90
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.WinHttpCrackUrl_failed___d___url:__s
push 0xde
jmp 0x50692e
cmp word [ebp - 0x4d8], 0
jne 0x5066ed
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.0051eb20
test al, al
jne 0x506738
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.00505d90
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_connection_failed___d___url:__s
push 0xec
jmp 0x50692e
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 0x5bb110
call fcn.0051ed20
test al, al
jne 0x506796
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.00505d90
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_GET_request_failed___d___url:__s
push 0xf5
jmp 0x50692e
push 0x40000000
push 0xffffffffffffffff
push str.Cache_Control:_no_cache
lea ecx, [ebp - 0x420]
call fcn.0051eaf0
test al, al
jne 0x5067dc
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.00500ef0
add esp, 0x1c
push 0
push 0
lea ecx, [ebp - 0x420]
call fcn.0051eee0
test al, al
jne 0x50684a
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.00505d90
cmp byte [ebp - 0x4f1], 0
mov eax, 0x5d6470
mov ecx, 0x5cac50
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.00500ef0
add esp, 0x20
mov byte [ebp - 0x4f1], 0
jmp 0x506fe8
lea ecx, [ebp - 0x420]
call fcn.0051eec0
test al, al
jne 0x506884
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.00505d90
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_receive_response_failed___d___url:__s
push 0x10b
jmp 0x50692e
lea ecx, [ebp - 0x420]
call fcn.0051ee00
mov dword [ebp - 0x4f8], eax
cmp eax, 0xc8
je 0x5068e8
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.00505d90
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.00500ef0
add esp, 0x20
mov byte [ebp - 0x4f1], 0
jmp 0x506fe8
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x43c], 0
push eax
lea ecx, [ebp - 0x420]
call fcn.0051ed60
test al, al
jne 0x50694e
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.00505d90
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.00500ef0
add esp, 0x1c
mov byte [ebp - 0x4f1], 0
jmp 0x506fe8
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.00560371
mov esi, eax
add esp, 4
mov dword [ebp - 0x510], esi
test esi, esi
jne 0x5069bb
mov ecx, dword [edi + 4]
push eax
push 2
push dword [edi + 8]
call fcn.00505d90
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.00500ef0
add esp, 0x18
mov byte [ebp - 0x4f1], 0
jmp 0x506fdf
mov eax, dword [edi + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x506a04
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.004245d0
lea eax, [ebp - 0x438]
mov ecx, 1
jmp 0x506a20
push 0x2f
push dword [ebp - 0x4c4]
lea eax, [ebp - 0x528]
push eax
call fcn.00508000
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 0x506a8e
and ecx, 0xfffffffd
mov dword [ebp - 0x4f8], ecx
lea ecx, [ebp - 0x528]
call fcn.00424600
mov ecx, dword [ebp - 0x4f8]
mov byte [ebp - 4], 4
test cl, 1
je 0x506aa2
lea ecx, [ebp - 0x438]
call fcn.00424600
cmp dword [ebp - 0x448], 0
jne 0x506b12
mov eax, dword [edi + 0x14]
cmp dword [eax], 0
je 0x506ad3
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.00500ef0
add esp, 0x14
jmp 0x506af7
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.00500ef0
add esp, 0x18
mov ecx, dword [edi + 4]
push 0
push 3
push dword [edi + 8]
call fcn.00505d90
mov byte [ebp - 0x4f1], 0
jmp 0x506fd4
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.005077c0
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 0x506bc9
mov edx, dword [eax + 0x14]
cmp edx, 8
jb 0x506b97
mov eax, dword [eax]
lea ecx, [edx*2 + 2]
cmp ecx, 0x1000
jb 0x506b81
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x50706e
mov eax, edx
push ecx
push eax
call fcn.00554242
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.00424600
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506bdf
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x506dba
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x18]
mov dword [ebp - 0x4fc], ecx
cmp byte [eax], 0
je 0x506e34
mov edx, dword [ecx + 0x10]
mov eax, SysReAllocString
sub eax, edx
mov dword [ebp - 0x4f8], edx
cmp eax, 4
jb 0x507069
cmp dword [ecx + 0x14], 8
jb 0x506c2a
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 0x506cb6
mov edi, edx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x506c7a
mov edi, SysReAllocString
jmp 0x506c84
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.00425ae0
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.00555ce0
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 0x506d3b
mov eax, dword [eax]
push ecx
push eax
call fcn.0056d8bb
add esp, 8
test eax, eax
je 0x506dab
call fcn.0055ed05
mov ecx, dword [edi + 4]
mov eax, dword [eax]
push eax
push 4
push dword [edi + 8]
mov dword [ebp - 0x504], eax
call fcn.00505d90
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506d6f
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.00500ef0
add esp, 0x1c
lea ecx, [ebp - 0x438]
call fcn.00424600
mov byte [ebp - 0x4f1], 0
jmp 0x506fd4
lea ecx, [ebp - 0x438]
mov byte [ebp - 4], 4
call fcn.00424600
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506dc5
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 0x506e76
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.00505d90
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.00500ef0
add esp, 0x18
mov byte [ebp - 0x4f1], 0
jmp 0x506fd4
cmp dword [ecx + 0x14], 8
jb 0x506e3c
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.00500ef0
mov ecx, dword [edi + 4]
add esp, 0x18
push 0
push 1
push dword [edi + 8]
call fcn.00505d90
mov byte [ebp - 0x4f1], 1
jmp 0x506fd4
lea ecx, [ebp - 0x4b4]
call fcn.0051dda0
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.0051ee90
test al, al
je 0x506f4a
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x506f4a
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 0x507016
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.00505d00
push dword [ebp - 0x414]
lea ecx, [ebp - 0x4b4]
push esi
call fcn.0051e9d0
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x50c]
lea ecx, [ebp - 0x420]
push esi
call fcn.0051ee90
test al, al
jne 0x506ec4
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x504]
push eax
lea ecx, [ebp - 0x4b4]
call fcn.0051ddf0
push dword [eax]
mov ecx, dword [edi + 0x24]
mov byte [ebp - 4], 7
call fcn.004245d0
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 0x506fb4
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.00505d90
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.00424600
push esi
call fcn.0055e8cd
add esp, 4
lea ecx, [ebp - 0x420]
call fcn.0051eaa0
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.00553daa
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.00505d90
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.00500ef0
add esp, 0x18
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x4f1], 0
jmp 0x506fca
call fcn.00421430
call fcn.0055ec17
int3