Function at 0x413c10
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 0x4ec5e8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x5441b4]
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 0x413c5b
push eax
call edi
mov dword [esi + 0xc], ebx
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x413c68
push eax
call edi
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x413c75
push eax
call edi
mov dword [esi + 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x50ce20
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x413c99
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x50ce58
jmp 0x413ce5
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.00414390
test al, al
je 0x413cf5
lea edi, [ebp - 0x48]
call fcn.00414310
test al, al
jne 0x413cfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryContentLength
push 0x50cfd8
lea edi, [esi + 0x20]
call fcn.00406b50
add esp, 0xc
xor al, al
jmp 0x413efa
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.00414280
test al, al
je 0x413d4f
push 3
push 0x50cecc
lea eax, [ebp - 0x2c]
push eax
xor eax, eax
call fcn.0040c250
cmp eax, 0xffffffff
je 0x413d4f
push str.QueryRawHeaders404
push esi
call fcn.00414750
lea ecx, [ebp - 0x2c]
call fcn.00406760
xor al, al
jmp 0x413efa
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 0x413d8a
push 0x50cf00
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x2c]
call fcn.00406760
xor al, al
jmp 0x413efa
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 0x413ddd
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.00406760
xor al, al
jmp 0x413efa
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x413dfb
mov eax, dword [ecx]
mov edx, dword [eax]
call edx
test eax, eax
je 0x413dfb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x413dc8
push 0x100000
call fcn.004b7340
mov edi, dword [ebp - 0x38]
add esp, 4
mov dword [ebp - 0x34], eax
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x413e26
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x413ecc
mov edi, dword [ebp - 0x38]
cmp edi, 0x100000
jbe 0x413e46
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004b7789
mov edi, dword [ebp - 0x38]
push edi
call fcn.004b7340
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 0x413ecc
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x413e6e
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x413ecc
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 0x413ecc
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x4c]
jne 0x413ecc
mov ecx, dword [esi + 0x24]
add dword [ebp - 0x44], eax
test ecx, ecx
je 0x413eab
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 0x413ecc
mov edi, dword [ebp - 0x38]
test edi, edi
jne 0x413e0e
mov byte [ebp - 0x2d], 1
mov edx, dword [ebp - 0x34]
push edx
call fcn.004b7789
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x2d]
test bl, bl
jne 0x413ef0
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2c]
call fcn.00406760
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.004b6111
mov esp, ebp
pop ebp
ret 4