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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xd0
mov qword [rbp + 0x10], rcx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
lea rcx, str.A_WinHTTP_Example_Program_1.0
call sym.WinHttpOpen
mov qword [rbp - 0x38], rax
cmp qword [rbp - 0x38], 0
jne 0x402f7d
lea rcx, str.Error:_WinHttpOpen_failed._n
call sym.wprintf
mov eax, 0
jmp 0x403553
lea rdx, [0x0044ea68]
mov rcx, qword [rbp + 0x10]
call sym.wcsstr
add rax, 6
mov qword [rbp - 0x40], rax
cmp qword [rbp - 0x40], 0
jne 0x402fbe
lea rcx, str.Error:_Invalid_URL_format._n
call sym.wprintf
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov rax, qword [rbp - 0x40]
mov edx, 0x2f
mov rcx, rax
call sym.wcschr
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x402ff2
mov rcx, qword [rbp + 0x10]
call sym.wcslen
lea rdx, [rax + rax]
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
sub rax, qword [rbp - 0x40]
sar rax, 1
mov qword [rbp - 0x48], rax
mov rax, qword [rbp - 0x48]
add rax, 1
add rax, rax
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x50], rax
cmp qword [rbp - 0x50], 0
jne 0x403041
lea rcx, str.Error:_Memory_allocation_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov rcx, qword [rbp - 0x48]
mov rdx, qword [rbp - 0x40]
mov rax, qword [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call sym.wcsncpy
mov rax, qword [rbp - 0x48]
lea rdx, [rax + rax]
mov rax, qword [rbp - 0x50]
add rax, rdx
mov word [rax], 0
mov rax, qword [rbp - 0x48]
add rax, 1
add rax, rax
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x58], rax
cmp qword [rbp - 0x58], 0
jne 0x4030b8
lea rcx, str.Error:_Memory_allocation_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
jmp 0x403121
mov rax, qword [rbp - 0x18]
lea rdx, [rax + rax]
mov rax, qword [rbp - 0x50]
add rax, rdx
movzx eax, word [rax]
movzx eax, ax
mov edx, 8
mov ecx, eax
call sym.iswctype
test eax, eax
jne 0x40311c
mov rax, qword [rbp - 0x18]
lea rdx, [rax + rax]
mov rax, qword [rbp - 0x50]
lea rcx, [rdx + rax]
mov rax, qword [rbp - 0x10]
lea rdx, [rax + 1]
mov qword [rbp - 0x10], rdx
lea rdx, [rax + rax]
mov rax, qword [rbp - 0x58]
add rdx, rax
movzx eax, word [rcx]
mov word [rdx], ax
add qword [rbp - 0x18], 1
mov rax, qword [rbp - 0x18]
cmp rax, qword [rbp - 0x48]
jb 0x4030ca
mov rax, qword [rbp - 0x10]
lea rdx, [rax + rax]
mov rax, qword [rbp - 0x58]
add rax, rdx
mov word [rax], 0
mov rdx, qword [rbp - 0x58]
mov rax, qword [rbp - 0x38]
mov r9d, 0
mov r8d, 0x1bb
mov rcx, rax
call sym.WinHttpConnect
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
jne 0x4031a0
lea rcx, str.Error:_WinHttpConnect_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov rdx, qword [rbp - 8]
mov rax, qword [rbp - 0x60]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8, rdx
lea rdx, [0x0044eae6]
mov rcx, rax
call sym.WinHttpOpenRequest
mov qword [rbp - 0x68], rax
cmp qword [rbp - 0x68], 0
jne 0x40322b
lea rcx, str.Error:_WinHttpOpenRequest_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov rax, qword [rbp - 0x68]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.WinHttpSendRequest
test eax, eax
jne 0x4032b7
lea rcx, str.Error:_WinHttpSendRequest_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x68]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov rax, qword [rbp - 0x68]
mov edx, 0
mov rcx, rax
call sym.WinHttpReceiveResponse
test eax, eax
jne 0x40331e
lea rcx, str.Error:_WinHttpReceiveResponse_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x68]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
mov eax, 0
jmp 0x403553
mov dword [rbp - 0x84], 0
mov dword [rbp - 0x88], 0
mov qword [rbp - 0x70], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x30], 0
mov dword [rbp - 0x84], 0
lea rdx, [rbp - 0x84]
mov rax, qword [rbp - 0x68]
mov rcx, rax
call sym.WinHttpQueryDataAvailable
test eax, eax
jne 0x403384
lea rcx, str.Error:_WinHttpQueryDataAvailable_failed._n
call sym.wprintf
jmp 0x40347d
mov eax, dword [rbp - 0x84]
test eax, eax
je 0x40347c
mov eax, dword [rbp - 0x84]
mov eax, eax
add qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
lea rdx, [rax + 1]
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.realloc
mov qword [rbp - 0x78], rax
cmp qword [rbp - 0x78], 0
jne 0x4033e2
lea rcx, str.Error:_Memory_allocation_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.free
mov qword [rbp - 0x30], 0
jmp 0x40347d
mov rax, qword [rbp - 0x78]
mov qword [rbp - 0x30], rax
mov eax, dword [rbp - 0x84]
add eax, 1
mov ecx, eax
mov rdx, qword [rbp - 0x30]
mov rax, qword [rbp - 0x20]
add rax, rdx
mov r8, rcx
mov edx, 0
mov rcx, rax
call sym.memset
mov ecx, dword [rbp - 0x84]
mov rdx, qword [rbp - 0x30]
mov rax, qword [rbp - 0x20]
add rdx, rax
lea r8, [rbp - 0x88]
mov rax, qword [rbp - 0x68]
mov r9, r8
mov r8d, ecx
mov rcx, rax
call sym.WinHttpReadData
test eax, eax
jne 0x403460
lea rcx, str.Error:_WinHttpReadData_failed._n
call sym.wprintf
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.free
mov qword [rbp - 0x30], 0
jmp 0x40347d
mov eax, dword [rbp - 0x88]
mov eax, eax
add qword [rbp - 0x20], rax
mov eax, dword [rbp - 0x84]
test eax, eax
jne 0x403352
jmp 0x40347d
nop
mov rax, qword [rbp - 0x68]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.WinHttpCloseHandle
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.WinHttpCloseHandle
cmp qword [rbp - 0x30], 0
je 0x403536
mov rdx, qword [rbp - 0x30]
mov rax, qword [rbp - 0x20]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp - 0x20]
add rax, 1
add rax, rax
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x80], rax
cmp qword [rbp - 0x80], 0
je 0x40350c
mov rax, qword [rbp - 0x20]
add eax, 1
mov rdx, qword [rbp - 0x30]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp - 0x80]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, rdx
mov edx, 0
mov ecx, 0xfde9
mov rax, qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
call rax
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x80]
jmp 0x403553
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov eax, 0
add rsp, 0xd0
pop rbp
ret