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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a758
mov eax, dword fs:[0]
push eax
sub esp, 0x4a8
mov eax, dword [0x410008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x4b0], edi
mov dword [ebp - 0x4a8], edi
mov dword [ebp - 0x4b4], edi
xorps xmm0, xmm0
mov dword [ebp - 0x4ac], 1
movq qword [edi], xmm0
mov dword [edi + 8], 0
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
push 0
push 0
push 0
push 0
mov dword [ebp - 4], 0
push str.A_WinHTTP_Example_1.0
mov dword [ebp - 0x4ac], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x498], eax
test eax, eax
je 0x4025a1
push 0x38
lea eax, [ebp - 0x48c]
mov dword [ebp - 0x490], 0x3c
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x210]
mov dword [ebp - 0x47c], pe_nt_image_headers32
mov dword [ebp - 0x480], eax
add esp, 0xc
cmp dword [esi + 0x14], 8
lea eax, [ebp - 0x410]
mov dword [ebp - 0x464], eax
mov dword [ebp - 0x460], pe_nt_image_headers32
jb 0x4021b2
mov esi, dword [esi]
lea eax, [ebp - 0x490]
push eax
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x402595
push 0
push dword [ebp - 0x478]
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x498]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x49c], eax
test eax, eax
je 0x402595
xor ecx, ecx
mov edx, 0x800000
cmp dword [ebp - 0x484], 2
cmove ecx, edx
push ecx
push 0
push 0
push 0
lea ecx, [ebp - 0x410]
push ecx
push 0x40b5c0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x494], esi
test esi, esi
jne 0x402247
push dword [ebp - 0x49c]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x498]
call esi
jmp 0x4025a1
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40257a
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40257a
xorps xmm0, xmm0
mov dword [ebp - 0x450], 0
movups xmmword [ebp - 0x434], xmm0
mov dword [ebp - 0x454], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x420], 0xf
mov byte [ebp - 0x434], 0
mov dword [ebp - 4], 1
lea eax, [ebp - 0x450]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40247b
mov ecx, dword [ebp - 0x450]
xor edi, edi
xor esi, esi
mov dword [ebp - 0x414], 0
xorps xmm0, xmm0
mov dword [ebp - 0x4a0], ecx
movq qword [ebp - 0x41c], xmm0
lea eax, [ecx + 1]
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x4a4], esi
mov dword [ebp - 0x414], esi
test eax, eax
je 0x40234c
push eax
lea ecx, [ebp - 0x41c]
call fcn.00408c50
mov esi, dword [ebp - 0x4a0]
inc esi
push esi
push edi
mov edi, dword [ebp - 0x41c]
push edi
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebp - 0x450]
lea eax, [esi + edi]
mov esi, dword [ebp - 0x414]
add esp, 0xc
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x4a4], esi
lea eax, [ebp - 0x454]
mov byte [ebp - 4], 2
push eax
push ecx
push edi
push dword [ebp - 0x494]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x402443
mov esi, dword [ebp - 0x420]
mov eax, esi
mov ecx, dword [ebp - 0x454]
mov edx, dword [ebp - 0x424]
sub eax, edx
mov dword [ebp - 0x4a0], ecx
push ecx
push edi
cmp ecx, eax
ja 0x4023c0
lea eax, [ecx + edx]
cmp esi, 0x10
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x434]
cmovae eax, dword [ebp - 0x434]
lea esi, [eax + edx]
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x4a0]
add esp, 0xc
mov byte [eax + esi], 0
jmp 0x4023d9
mov byte [ebp - 0x4a8], 0
push dword [ebp - 0x4a8]
push ecx
lea ecx, [ebp - 0x434]
call fcn.00408870
mov byte [ebp - 4], 1
test edi, edi
je 0x40242f
mov ecx, dword [ebp - 0x4a4]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x402407
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402568
push ecx
push edi
call fcn.0040984c
add esp, 8
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 0
cmp dword [ebp - 0x450], 0
mov esi, dword [ebp - 0x494]
jbe 0x40247b
jmp 0x4022b3
mov byte [ebp - 4], 1
test edi, edi
je 0x402475
sub esi, edi
mov eax, edi
cmp esi, 0x1000
jb 0x40246b
mov edi, dword [eax - 4]
add esi, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402568
push esi
push edi
call fcn.0040984c
add esp, 8
mov esi, dword [ebp - 0x494]
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x49c]
call esi
push dword [ebp - 0x498]
call esi
lea edx, [ebp - 0x434]
lea ecx, [ebp - 0x44c]
call fcn.00402c40
push ecx
lea edx, [ebp - 0x44c]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x41c]
call fcn.004029d0
mov edi, dword [ebp - 0x4b0]
mov esi, eax
add esp, 4
cmp edi, esi
je 0x4024f5
mov ecx, edi
call fcn.004072d0
mov ecx, dword [esi]
mov dword [edi], ecx
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
lea ecx, [ebp - 0x41c]
call fcn.004072d0
mov ecx, dword [ebp - 0x438]
cmp ecx, 8
jb 0x40253c
mov edx, dword [ebp - 0x44c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402532
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402568
push ecx
push edx
call fcn.0040984c
add esp, 8
mov ecx, dword [ebp - 0x420]
cmp ecx, 0x10
jb 0x4025a1
mov edx, dword [ebp - 0x434]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40256e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40256e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0040984c
add esp, 8
jmp 0x4025a1
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x49c]
call esi
push dword [ebp - 0x498]
call esi
jmp 0x4025a1
push dword [ebp - 0x498]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004096f9
mov esp, ebp
pop ebp
ret