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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
lea eax, [ebp - 0x424]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x428]
mov dword [esp + 8], eax
lea eax, [ebp - 0x224]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._parse_url
test eax, eax
je 0x40bd24
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], 0x43b44e
mov dword [esp], eax
call sym._fprintf_5
mov eax, 1
jmp 0x40c1f0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x43b464
call sym._WinHttpOpen_20
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40bd7d
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b4a0
call sym._wprintf
mov eax, 1
jmp 0x40c1f0
mov eax, dword [ebp - 0x428]
movzx eax, ax
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x224]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpConnect_16
sub esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40bde2
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b4d0
call sym._wprintf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov dword [esp + 0x18], 0x800000
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x424]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x43b506
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpOpenRequest_28
sub esp, 0x1c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40be68
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b510
call sym._wprintf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpSendRequest_28
sub esp, 0x1c
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40befa
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b550
call sym._wprintf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpReceiveResponse_8
sub esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40bf64
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b590
call sym._wprintf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x430], 0
mov dword [esp + 4], 0x43b5d6
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40bfe6
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.Failed_to_open_file_for_writing._n
mov dword [esp], eax
call sym._fprintf_5
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov dword [ebp - 0x42c], 0
lea eax, [ebp - 0x42c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpQueryDataAvailable_8
sub esp, 8
test eax, eax
jne 0x40c062
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b600
call sym._wprintf
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov eax, dword [ebp - 0x42c]
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40c0c7
mov dword [esp], 0x43b64c
call sym._wprintf
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov eax, dword [ebp - 0x42c]
add eax, 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 0x42c]
lea edx, [ebp - 0x430]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpReadData_16
sub esp, 0x10
test eax, eax
jne 0x40c172
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x43b66c
call sym._wprintf
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 1
jmp 0x40c1f0
mov eax, dword [ebp - 0x430]
mov edx, dword [ebp - 0x20]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x42c]
test eax, eax
jne 0x40bfe6
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WinHttpCloseHandle_4
sub esp, 4
mov eax, 0
leave
ret