Function at 0x570c59
Capabilities:
Delete file
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
push 0xa0
mov eax, 0x58ae4a
call fcn.00531c83
mov edi, ecx
xor ebx, ebx
lea edx, [ebp + 8]
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x90]
mov esi, ebx
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0x18], ebx
call fcn.00404604
push ebx
push ebx
push ebx
push ebx
push str.CallHandler
mov byte [ebp - 4], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [ebp - 0xac], ecx
test ecx, ecx
jne 0x570cb4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x570ebd
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0x48]
push ebx
cmovae eax, dword [ebp - 0x48]
push 0x50
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0xa8], ecx
test ecx, ecx
jne 0x570ce3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x570eab
cmp dword [ebp - 0x64], 8
lea eax, [ebp - 0x78]
push ebx
cmovae eax, dword [ebp - 0x78]
push ebx
push ebx
push ebx
push eax
push 0x5c30a0
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0xa4], ebx
test ebx, ebx
jne 0x570d1a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor bl, bl
jmp 0x570e9f
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
jne 0x570e89
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x570e89
add edi, 0x1c
cmp dword [edi + 0x14], 8
jb 0x570d50
mov eax, dword [edi]
jmp 0x570d52
mov eax, edi
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa0], eax
cmp eax, 0xffffffff
je 0x570e89
xor eax, eax
mov dword [ebp - 0x9c], eax
and dword [ebp - 0x94], 0
lea eax, [ebp - 0x94]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x570e56
mov eax, dword [ebp - 0x94]
inc eax
push eax
call fcn.0041559f
mov dword [ebp - 0x98], eax
pop ecx
test eax, eax
je 0x570e4d
mov ecx, dword [ebp - 0x94]
inc ecx
push ecx
push 0
push eax
call fcn.0054ae60
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x94]
push dword [ebp - 0x98]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x570e56
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp - 0x94]
push dword [ebp - 0x98]
push dword [ebp - 0xa0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x570e5e
mov eax, dword [ebp - 0x9c]
add eax, dword [ebp - 0x14]
push 0
push eax
push 0x3e80
push dword [0x5fb350]
mov dword [ebp - 0x9c], eax
call dword [sym.imp.USER32.dll_PostMessageW]
push dword [ebp - 0x98]
call fcn.004155a8
cmp dword [ebp - 0x94], 0
pop ecx
ja 0x570d82
jmp 0x570e5e
and dword [ebp - 0x94], 0
jmp 0x570e5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0xa0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x9c], 0x10000
mov bl, 1
jae 0x570e93
cmp dword [edi + 0x14], 8
jb 0x570e80
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x570e91
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor bl, bl
push dword [ebp - 0xa4]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0xa8]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0xac]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test bl, bl
jne 0x570f10
xor ebx, ebx
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xac], esp
push 0x5c2fd4
call fcn.004036c4
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0xa8], esp
push 0x5c2d2e
call fcn.004036c4
sub esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
push str.winHttpDownload
call fcn.004036c4
mov dl, bl
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.00571a9e
add esp, 0x48
jmp 0x570f14
xor ebx, ebx
mov esi, ebx
lea ecx, [ebp - 0x90]
call fcn.0040495a
push ebx
push 1
lea ecx, [ebp + 8]
call fcn.00403a16
mov eax, esi
call fcn.00531c2d
ret 0x18