Function at 0x419850
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
lea ecx, [ebp - 8]
call fcn.00404bb0
push 0
push 0
push 0
push 0
push str.WinHttp_Get
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x419a61
push 0
push 0x1bb
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x419a48
push 0
push 0
push 0
push 0
mov edx, dword [ebp + 0x10]
push edx
push 0x4dc338
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x419a2f
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x419a16
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x419a00
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x41993d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.00437af7
add esp, 8
jmp 0x4199fe
cmp dword [ebp - 0x18], 0
jne 0x419948
jmp 0x4199fe
mov edx, dword [ebp - 0x18]
add edx, 1
push edx
call fcn.00434264
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x419978
push str.Out_of_memory_n
call fcn.00437af7
add esp, 4
jmp 0x4199fe
mov ecx, dword [ebp - 0x18]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x20]
push edx
call fcn.0043ef50
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x4199bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpReadData._n
call fcn.00437af7
add esp, 8
jmp 0x4199ce
mov ecx, dword [ebp - 0x20]
push ecx
push 0x4dc398
call fcn.00437af7
add esp, 8
mov edx, dword [ebp - 0x20]
push edx
lea ecx, [ebp - 8]
call fcn.00403e60
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.004358c5
add esp, 4
cmp dword [ebp - 0x1c], 0
jne 0x4199f4
jmp 0x4199fe
cmp dword [ebp - 0x18], 0
ja 0x419904
jmp 0x419a14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_has_occurred._n
call fcn.00437af7
add esp, 8
jmp 0x419a23
push str.Request_failed_n
call fcn.00437af7
add esp, 4
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x419a3c
push str.Invalid_request_handle_n
call fcn.00437af7
add esp, 4
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x419a55
push str.Invalid_connection_handle_n
call fcn.00437af7
add esp, 4
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x419a6e
push str.Invalid_WinHTTP_session_handle_n
call fcn.00437af7
add esp, 4
lea edx, [ebp - 8]
push edx
mov ecx, dword [ebp + 8]
call fcn.00404bd0
lea ecx, [ebp - 8]
call fcn.00403e20
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret