Function at 0x566ea0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference cloudflare dns server
Set http header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
call fcn.00566d80
test al, al
jne 0x566ec5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ax, 1
lock xadd word [0x6314b4], ax
inc ax
push 0x1000
push 4
push dword [0x631034]
movzx esi, ax
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0x1000
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 1
push esi
push dword [ebp + 0x10]
mov esi, dword [0x6333b0]
mov edi, eax
push dword [ebp + 0xc]
lea eax, [ebp - 4]
mov dword [ebp - 0xc], edi
push eax
push edi
mov ecx, esi
call dword [0x5a08ec]
call esi
test eax, eax
setne cl
test eax, eax
jne 0x566f70
push edi
push eax
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword ds:[ebp - 4]
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, dword [0x6333b0]
mov edi, eax
push 1
push dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov ecx, esi
push dword [ebp + 0x10]
lea eax, [ebp - 4]
push dword [ebp + 0xc]
push eax
push edi
call dword [0x5a08ec]
call esi
test eax, eax
setne cl
test cl, cl
je 0x567249
test byte [0x62e71c], 1
mov edi, str.1.1.1.1
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x30], eax
jne 0x5670d9
mov ecx, 0x62e71c
lock bts dword [ecx], 0x1f
setb al
test al, al
je 0x566fbd
test byte [0x62e71c], 1
jne 0x5670d9
xor edx, edx
call sym.SystemInformer.exe_PhfWaitForEvent
jmp 0x5670d9
cmp dword [0x62abb0], 0x3f
push 0
sbb eax, eax
push 0
and eax, 0xfffffffc
push 0
add eax, 4
push eax
push 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [0x6333bc], eax
test eax, eax
je 0x5670cf
cmp dword [0x62abb0], 0x3f
push 4
jae 0x567003
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0xa00
push ecx
push 0x54
push eax
jmp 0x56707d
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x2800
push ecx
push 0x54
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 4
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 3
push eax
push 0x76
push dword [0x6333bc]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov eax, dword [0x62abb0]
cmp eax, 0x64
jb 0x56705f
push 4
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 1
push eax
push 0x85
push dword [0x6333bc]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov eax, dword [0x62abb0]
nop
cmp eax, 0x72
jb 0x567086
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 1
push eax
push 0xc3
push dword [0x6333bc]
lea ecx, [ecx]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 1
push eax
push 0x49
push dword [0x6333bc]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
cmp dword [0x62abb0], 0x64
jb 0x5670cf
push 0
test esi, esi
mov eax, edi
push 0x1bb
cmovne eax, esi
push eax
push dword [0x6333bc]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [0x6333c0], eax
mov ecx, 0x62e71c
call sym.SystemInformer.exe_PhfEndInitOnce
cmp dword [0x62abb0], 0x64
jae 0x567102
push 0
test esi, esi
push 0x1bb
cmovne edi, esi
push edi
push dword [0x6333bc]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [0x6333c0], eax
jmp 0x567107
mov eax, dword [0x6333c0]
test eax, eax
je 0x56723f
push 0x800000
push 0x62e714
push 0
push 0
push str._dns_query
push str.POST
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
je 0x56723f
push 0xa0000000
push 0xffffffffffffffff
push str.Content_Type:_application_dns_message
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
cmp dword [0x62abb0], 0x3e
ja 0x56716a
push 4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x1000
push eax
push 0x1f
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov eax, dword [ebp - 0x30]
push 0
push eax
push eax
push dword [ebp - 0xc]
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
nop
test eax, eax
je 0x567225
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x567225
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 8]
push eax
push edi
call sym.SystemInformer.exe_PhHttpSocketReadDataToBuffer
test al, al
je 0x567222
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x14], ebx
cmp esi, 0xffff
ja 0x567222
mov ebx, dword [ebp - 8]
movzx eax, word [ebx]
mov dh, al
mov dl, ah
movzx eax, word [ebx + 4]
mov ch, al
mov word [ebx], dx
mov cl, ah
movzx eax, word [ebx + 6]
mov word [ebx + 4], cx
mov ch, al
mov cl, ah
movzx eax, word [ebx + 8]
mov word [ebx + 6], cx
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0xa]
mov word [ebx + 8], cx
mov ch, al
mov cl, ah
mov word [ebx + 0xa], cx
cmp dx, word [ebp - 0x10]
jne 0x567225
lea eax, [ebp - 0x14]
push eax
push esi
mov esi, dword [0x6333b4]
mov ecx, esi
push ebx
call dword [0x5a08ec]
call esi
mov eax, dword ds:[ebp - 0x14]
xor ecx, ecx
test eax, eax
cmovne ecx, eax
mov dword [ebp - 0x18], ecx
jmp 0x567225
mov ebx, dword [ebp - 8]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test ebx, ebx
je 0x56723f
push ebx
push 0
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x56725c
push eax
jmp 0x56724e
test edi, edi
je 0x56725c
push edi
push 0
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc