Function at 0x415b40
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 0x4f1f48
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x54c1b4]
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 0x415b8b
push eax
call edi
mov dword [esi + 0xc], ebx
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x415b98
push eax
call edi
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x415ba5
push eax
call edi
mov dword [esi + 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x513580
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x415bc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5135b8
jmp 0x415c15
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.00416460
test al, al
je 0x415c25
lea edi, [ebp - 0x48]
call fcn.004163e0
test al, al
jne 0x415c2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryContentLength
push 0x5138b8
lea edi, [esi + 0x20]
call fcn.00407fa0
add esp, 0xc
xor al, al
jmp 0x415e6e
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.00416350
test al, al
je 0x415c7f
push 3
push 0x51362c
lea eax, [ebp - 0x2c]
push eax
xor eax, eax
call fcn.00407570
cmp eax, 0xffffffff
je 0x415c7f
push str.QueryRawHeaders404
push esi
call fcn.00416d20
lea ecx, [ebp - 0x2c]
call fcn.00407bb0
xor al, al
jmp 0x415e6e
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 0x415cc5
push 0x513660
push esi
call fcn.00416d20
push 0x51368c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x2c]
call fcn.00407bb0
xor al, al
jmp 0x415e6e
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 0x415d23
push str.DownLoadFile.WinHttpQueryDataAvailable_1
push esi
call fcn.00416d20
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.00407bb0
xor al, al
jmp 0x415e6e
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x415d4c
mov eax, dword [ecx]
mov edx, dword [eax]
call edx
test eax, eax
je 0x415d4c
push str.DownLoadFile.
push esi
call fcn.00416d20
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x415d0e
push 0x100000
call fcn.004bc710
mov edi, dword [ebp - 0x38]
add esp, 4
mov dword [ebp - 0x34], eax
nop
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x415d78
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x415e20
mov edi, dword [ebp - 0x38]
cmp edi, 0x100000
jbe 0x415d98
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004bcb59
mov edi, dword [ebp - 0x38]
push edi
call fcn.004bc710
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 0x415e27
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x415dc0
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x415e20
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 0x415e35
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x4c]
jne 0x415e35
mov ecx, dword [esi + 0x24]
add dword [ebp - 0x44], eax
test ecx, ecx
je 0x415dfd
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 0x415e2e
mov edi, dword [ebp - 0x38]
test edi, edi
jne 0x415d60
mov byte [ebp - 0x2d], 1
jmp 0x415e40
push str.DownLoadFile.
jmp 0x415e3a
push str.DownLoadFile.WinHttpReadData
jmp 0x415e3a
push str.DownLoadFile.WinHttpQueryDataAvailable_2
jmp 0x415e3a
push str.DownLoadFile.WriteFile
push esi
call fcn.00416d20
mov edx, dword [ebp - 0x34]
push edx
call fcn.004bcb59
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x2d]
test bl, bl
jne 0x415e64
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2c]
call fcn.00407bb0
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.004bb4e3
mov esp, ebp
pop ebp
ret 4