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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a7ab
mov eax, dword fs:[0]
push eax
sub esp, 0x510
mov eax, dword [0x410008]
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 edi, edx
mov esi, ecx
push 0
push 0
push 0
push 0
push str.A_WinHTTP_Example_1.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [ebp - 0x514], ebx
test ebx, ebx
je 0x4029a8
push 0x38
lea eax, [ebp - 0x50c]
mov dword [ebp - 0x510], 0x3c
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x210]
mov dword [ebp - 0x4fc], pe_nt_image_headers32
mov dword [ebp - 0x500], eax
add esp, 0xc
cmp dword [esi + 0x14], 8
lea eax, [ebp - 0x410]
mov dword [ebp - 0x4e4], eax
mov dword [ebp - 0x4e0], pe_nt_image_headers32
jb 0x402666
mov esi, dword [esi]
lea eax, [ebp - 0x510]
push eax
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x4029a1
push 0
push dword [ebp - 0x4f8]
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
mov dword [ebp - 0x518], esi
test esi, esi
je 0x4029a1
xor ecx, ecx
mov eax, 0x800000
cmp dword [ebp - 0x504], 2
cmove ecx, eax
lea eax, [ebp - 0x410]
push ecx
push 0
push 0
push 0
push eax
push 0x40b5c0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0x51c], ebx
test ebx, ebx
jne 0x4026f3
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x514]
call esi
jmp 0x4029a8
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x402986
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x402986
push 0xb0
lea eax, [ebp - 0x4d0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x40273d
mov edi, dword [edi]
sub esp, 0xc
lea ecx, [ebp - 0x4d0]
push edi
call fcn.004070e0
mov eax, dword [ebp - 0x4d0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x4d0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4d4], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x480], 0
jne 0x4027a3
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call esi
push dword [ebp - 0x518]
call esi
push dword [ebp - 0x514]
call esi
xor bl, bl
jmp 0x402938
mov dword [ebp - 0x4d4], 0
mov dword [ebp - 0x420], 0
lea eax, [ebp - 0x4d4]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4028f6
mov ebx, dword [ebp - 0x4d4]
xor esi, esi
xorps xmm0, xmm0
mov dword [ebp - 0x414], 0
xor edi, edi
movq qword [ebp - 0x41c], xmm0
mov dword [ebp - 0x41c], esi
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x414], edi
test ebx, ebx
je 0x402834
push ebx
lea ecx, [ebp - 0x41c]
call fcn.00408c50
mov esi, dword [ebp - 0x41c]
push ebx
push edi
push esi
call sub.VCRUNTIME140.dll_memset
mov edi, dword [ebp - 0x414]
lea eax, [ebx + esi]
mov ebx, dword [ebp - 0x4d4]
add esp, 0xc
mov dword [ebp - 0x418], eax
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 1
push eax
push ebx
mov ebx, dword [ebp - 0x51c]
push esi
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4028c2
push 0
push dword [ebp - 0x420]
lea ecx, [ebp - 0x4d0]
push esi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
mov byte [ebp - 4], 0
test esi, esi
je 0x4028b3
sub edi, esi
mov eax, esi
cmp edi, 0x1000
jb 0x40288b
mov esi, dword [eax - 4]
add edi, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4028e6
push edi
push esi
call fcn.0040984c
add esp, 8
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 0
cmp dword [ebp - 0x4d4], 0
ja 0x4027b7
jmp 0x4028f6
mov byte [ebp - 4], 0
test esi, esi
je 0x4028f6
sub edi, esi
mov eax, esi
cmp edi, 0x1000
jb 0x4028ec
mov esi, dword [eax - 4]
add edi, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4028ec
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edi
push esi
call fcn.0040984c
add esp, 8
lea ecx, [ebp - 0x4cc]
call fcn.00407050
test eax, eax
jne 0x40291d
push eax
mov eax, dword [ebp - 0x4d0]
lea ecx, [ebp - 0x4d0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call esi
push dword [ebp - 0x518]
call esi
push dword [ebp - 0x514]
call esi
mov bl, 1
mov eax, dword [ebp - 0x4d0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0x4d0]
mov edx, dword [ecx + 4]
lea ecx, [edx - 0x68]
mov dword [ebp + edx - 0x4d4], ecx
lea ecx, [ebp - 0x4cc]
call fcn.004063b0
lea ecx, [ebp - 0x4c8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x468]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov al, bl
jmp 0x4029aa
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call esi
push dword [ebp - 0x518]
call esi
push dword [ebp - 0x514]
call esi
jmp 0x4029a8
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
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.004096f9
mov esp, ebp
pop ebp
ret