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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402e1d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], ecx
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [ebp - 0x44], eax
xor esi, esi
xor eax, eax
movq qword [ebp - 0x20], xmm0
xor ebx, ebx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], eax
push eax
push eax
push eax
push eax
mov dword [ebp - 4], eax
push str.WinHTTP_Example_1.0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x40135c
push ebx
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x40136c
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x44]
push 0x4032b0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x40137c
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x40138c
push ebx
push dword [ebp - 0x2c]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x40139c
nop
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x4012e8
call edi
push eax
push str.Error__u_in_WinHttpQueryDataAvailable___u__n
call fcn.00401040
add esp, 8
mov eax, dword [ebp - 0x24]
inc eax
push eax
call fcn.0040210d
mov ecx, dword [ebp - 0x24]
add esp, 4
inc ecx
mov esi, eax
push ecx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x24]
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x40132e
call edi
push eax
push str.Error__u_in_WinHttpReadData._n
call fcn.00401040
add esp, 8
jmp 0x40133e
push dword [ebp - 0x28]
lea ecx, [ebp - 0x20]
push esi
push ebx
call fcn.00401eb0
mov ebx, dword [ebp - 0x1c]
push esi
call fcn.004020ca
add esp, 4
cmp dword [ebp - 0x24], 0
ja 0x4012c0
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
jmp 0x40139c
call edi
push eax
push str.Failed_in_WinHttpConnect___u__n
call fcn.00401040
add esp, 8
call edi
push eax
push str.Failed_in_WinHttpOpenRequest___u__n
call fcn.00401040
add esp, 8
call edi
push eax
push str.Failed_in_WinHttpSendRequest___u__n
call fcn.00401040
add esp, 8
call edi
push eax
push str.Failed_in_WinHttpReceiveResponse___u__n
call fcn.00401040
add esp, 8
cmp esi, ebx
jne 0x4013ad
push str.Failed_in_retrieving_the_PE
call fcn.00401040
add esp, 4
cmp dword [ebp - 0x30], 0
jne 0x4013c3
call edi
push eax
push str.Error__d_has_occurred._n
call fcn.00401040
add esp, 8
mov eax, dword [ebp - 0x2c]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x4013d3
push eax
call edi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4013dd
push eax
call edi
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x4013e7
push eax
call edi
sub ebx, esi
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov edi, eax
test ebx, ebx
je 0x401404
push ebx
push esi
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
test esi, esi
je 0x401437
mov ecx, dword [ebp - 0x38]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x40142d
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40142d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.004020ff
add esp, 8
mov eax, edi
mov edx, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004020bc
mov esp, ebp
pop ebp
ret