Function at 0x520ae0
Capabilities:
Prepare http request
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
xor ebx, ebx
mov ax, 1
push edi
mov dword [ebp - 0xc], ebx
xor edi, edi
lock xadd word [0x5cf80c], ax
inc ax
movzx esi, ax
mov dword [ebp - 0x10], esi
call fcn.004dfe00
test eax, eax
je 0x520d15
push 0x1000
push 4
push dword [0x5cd55c]
mov dword [ebp - 8], 0x1000
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 1
push esi
push dword [ebp + 0x10]
lea ecx, [ebp - 8]
mov dword [ebp - 4], eax
push dword [ebp + 0xc]
push ecx
push eax
call fcn.004dfe00
mov esi, eax
mov ecx, eax
call dword [0x55890c]
call esi
test eax, eax
setne cl
test eax, eax
jne 0x520ba7
mov eax, dword [ebp - 4]
push eax
push edi
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 8]
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 1
push dword [ebp - 0x10]
lea ecx, [ebp - 8]
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
push eax
call fcn.004dfe00
mov esi, eax
mov ecx, eax
call dword [0x55890c]
mov edi, edi
call esi
test eax, eax
setne cl
test cl, cl
je 0x520cff
mov ecx, dword [ebp + 8]
call fcn.00520920
test eax, eax
je 0x520cff
push 0x800000
push 0
push 0
push 0
push str._dns_query
push str.POST
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
je 0x520cff
push 0xa0000000
push 0xffffffffffffffff
push str.Content_Type:_application_dns_message
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
cmp dword [0x5c7aa8], 0x3e
ja 0x520c1a
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x1000
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov eax, dword [ebp - 8]
push 0
push eax
push eax
mov eax, dword [ebp - 4]
push eax
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x520ce5
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x520ce5
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
call sym.ProcessHacker.exe_PhHttpSocketReadDataToBuffer
lea esp, [esp]
test al, al
je 0x520ce2
mov dword [ebp - 0x18], ebx
call fcn.004dfca0
test eax, eax
je 0x520ce2
cmp dword [ebp - 0x14], 0xffff
ja 0x520ce2
mov ebx, dword [ebp - 0xc]
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 0x520ce5
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push ebx
call fcn.004dfca0
mov esi, eax
mov ecx, eax
call dword [0x55890c]
call esi
mov eax, dword [ebp - 0x18]
test eax, eax
mov esi, dword [ebp - 0x20]
cmovne edi, eax
jmp 0x520ce5
mov ebx, dword [ebp - 0xc]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test ebx, ebx
je 0x520cff
push ebx
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 4]
test eax, eax
je 0x520d15
push eax
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc