Function at 0x4156e0
Capabilities:
Delete file
Initialize winhttp library
Print debug messages
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f0d98
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x54b1b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov esi, edx
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xc]
xor ebx, ebx
mov dword [ebp - 0x3c], ecx
cmp eax, ebx
je 0x41572b
push eax
call edi
mov dword [esi + 0xc], ebx
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x415738
push eax
call edi
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x415745
push eax
call edi
mov dword [esi + 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x512358
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x415769
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x512390
jmp 0x4157b5
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [esi + 0x14]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov eax, dword [ebp - 0x34]
push eax
xor ecx, ecx
mov edx, esi
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
call fcn.00415eb0
test al, al
je 0x4157c5
lea edi, [ebp - 0x48]
call fcn.00415e20
test al, al
jne 0x4157cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryContentLength
push 0x512690
lea edi, [esi + 0x20]
call fcn.00407bd0
add esp, 0xc
xor al, al
jmp 0x415a0e
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
lea edx, [ebp - 0x2c]
push edx
mov edi, esi
mov dword [ebp - 4], ebx
call fcn.00415d90
test al, al
je 0x41581f
push 3
push 0x512404
lea eax, [ebp - 0x2c]
push eax
xor eax, eax
call fcn.004071a0
cmp eax, 0xffffffff
je 0x41581f
push str.QueryRawHeaders404
push esi
call fcn.00416270
lea ecx, [ebp - 0x2c]
call fcn.004077e0
xor al, al
jmp 0x415a0e
mov ecx, dword [ebp - 0x3c]
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x415865
push 0x512438
push esi
call fcn.00416270
push 0x512464
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x2c]
call fcn.004077e0
xor al, al
jmp 0x415a0e
mov edx, dword [ebp - 0x48]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push edx
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push ebx
call edi
mov ecx, dword [esi + 0xc]
lea eax, [ebp - 0x38]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x4158c3
push str.DownLoadFile.WinHttpQueryDataAvailable_1
push esi
call fcn.00416270
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2c]
call fcn.004077e0
xor al, al
jmp 0x415a0e
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x4158ec
mov eax, dword [ecx]
mov edx, dword [eax]
call edx
test eax, eax
je 0x4158ec
push str.DownLoadFile.
push esi
call fcn.00416270
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x4158ae
push 0x100000
call fcn.004bb5e0
mov edi, dword [ebp - 0x38]
add esp, 4
mov dword [ebp - 0x34], eax
nop
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x415918
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x4159c0
mov edi, dword [ebp - 0x38]
cmp edi, 0x100000
jbe 0x415938
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004bba29
mov edi, dword [ebp - 0x38]
push edi
call fcn.004bb5e0
add esp, 8
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 0xc]
lea edx, [ebp - 0x40]
push edx
push edi
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4159c7
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x415960
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x4159c0
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x34]
push 0
lea ecx, [ebp - 0x4c]
push ecx
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4159d5
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x4c]
jne 0x4159d5
mov ecx, dword [esi + 0x24]
add dword [ebp - 0x44], eax
test ecx, ecx
je 0x41599d
mov eax, dword [esi + 0x10]
mov edx, dword [ecx]
mov edx, dword [edx]
push eax
mov eax, dword [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x48]
push eax
call edx
mov ecx, dword [esi + 0xc]
lea eax, [ebp - 0x38]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4159ce
mov edi, dword [ebp - 0x38]
test edi, edi
jne 0x415900
mov byte [ebp - 0x2d], 1
jmp 0x4159e0
push str.DownLoadFile.
jmp 0x4159da
push str.DownLoadFile.WinHttpReadData
jmp 0x4159da
push str.DownLoadFile.WinHttpQueryDataAvailable_2
jmp 0x4159da
push str.DownLoadFile.WriteFile
push esi
call fcn.00416270
mov edx, dword [ebp - 0x34]
push edx
call fcn.004bba29
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x2d]
test bl, bl
jne 0x415a04
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2c]
call fcn.004077e0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ba3af
mov esp, ebp
pop ebp
ret 4