Function at 0x50a460
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 [0x5b3fe0], ax
inc ax
movzx esi, ax
mov dword [ebp - 0x10], esi
call fcn.004f4220
test eax, eax
je 0x50a695
push 0x1000
push 4
push dword [0x5b1dac]
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.004f4220
mov esi, eax
mov ecx, eax
call dword [0x5404bc]
call esi
test eax, eax
setne cl
test eax, eax
jne 0x50a527
mov eax, dword [ebp - 4]
push eax
push edi
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 8]
push 4
push dword [0x5b1dac]
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.004f4220
mov esi, eax
mov ecx, eax
call dword [0x5404bc]
mov edi, edi
call esi
test eax, eax
setne cl
test cl, cl
je 0x50a67f
mov ecx, dword [ebp + 8]
call fcn.0050a2a0
test eax, eax
je 0x50a67f
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 0x50a67f
push 0xa0000000
push 0xffffffffffffffff
push str.Content_Type:_application_dns_message
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
cmp dword [sym.ProcessHacker.exe_WindowsVersion], 0x3e
ja 0x50a59a
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 0x50a665
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x50a665
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 0x50a662
mov dword [ebp - 0x18], ebx
call fcn.004f40e0
test eax, eax
je 0x50a662
cmp dword [ebp - 0x14], 0xffff
ja 0x50a662
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 0x50a665
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push ebx
call fcn.004f40e0
mov esi, eax
mov ecx, eax
call dword [0x5404bc]
call esi
mov eax, dword [ebp - 0x18]
test eax, eax
mov esi, dword [ebp - 0x20]
cmovne edi, eax
jmp 0x50a665
mov ebx, dword [ebp - 0xc]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test ebx, ebx
je 0x50a67f
push ebx
push 0
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 4]
test eax, eax
je 0x50a695
push eax
push 0
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc