Function at 0x140039bd0
Capabilities:
Check http status code
Prepare http request
Read http header
Receive http response
Set http header

Disassembly:
mov r11, rsp
push rbp
push rdi
sub rsp, 0x98
mov rax, qword [0x14011e878]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov qword [r11 + 0x18], rbx
mov rdi, rdx
mov qword [r11 - 0x18], rsi
lea rdx, str.Creating_a_connection_with_the_server...
mov qword [r11 - 0x20], r12
mov r12, rcx
mov qword [r11 - 0x28], r13
xor r13d, r13d
mov qword [r11 - 0x30], r14
mov ebx, r13d
lea ecx, [r13 + 8]
call fcn.14002a430
movzx r8d, word [rdi + 0x8a0]
lea rdx, [rdi + 0x20]
mov rcx, qword [0x140174d98]
xor r9d, r9d
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
test rax, rax
mov rbp, rax
setne sil
test rax, rax
jne 0x140039c6b
call fcn.1400023f0
movzx r9d, word [rdi + 0x8a0]
lea r8, [rdi + 0x20]
lea rdx, str.Connection_to___ws__at_port__u_failed.___ws_
mov qword [rsp + 0x20], rax
lea ecx, [rbp + 8]
call fcn.14002a3c0
test sil, sil
je 0x140039f66
lea r8, str.HTTP_1.1
mov qword [rsp + 0x70], r15
lea rdx, str.Open_a_new__ws_request...
mov ecx, 8
call fcn.14002a430
mov eax, dword [rdi + 0x8a4]
lea r8, [rdi + 0x4a0]
mov dword [rsp + 0x30], eax
lea r9, str.HTTP_1.1
mov qword [rsp + 0x28], r13
mov rdx, rdi
mov rcx, rbp
mov qword [rsp + 0x20], r13
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
test rax, rax
mov rbx, rax
mov rsi, rax
setne r15b
test rax, rax
jne 0x140039d00
call fcn.1400023f0
movzx ecx, word [rdi + 0x8a0]
lea r9, [rdi + 0x20]
mov qword [rsp + 0x28], rax
lea r8, str.HTTP_1.1
mov dword [rsp + 0x20], ecx
lea rdx, str.Open__ws_request_to___ws__at_port__u_failed.___ws_
lea ecx, [rsi + 8]
call fcn.14002a3c0
test r15b, r15b
mov r15, qword [rsp + 0x70]
je 0x140039f66
lea rdx, str.Setup_the_HTTP_status_callback...
mov ecx, 8
call fcn.14002a430
xor r9d, r9d
lea rdx, [0x14003a2c0]
mov r8d, 0xffffffff
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp rax, 0xffffffffffffffff
setne r14b
jne 0x140039d5b
call fcn.1400023f0
mov r8, rax
lea rdx, str.Failed_to_set_the_HTTP_status_callback___ws_
mov ecx, 8
call fcn.14002a3c0
test r14b, r14b
je 0x140039f66
lea rdx, str.Adding_headers_to_the_request...
mov ecx, 8
call fcn.14002a430
mov r9d, 0x20000000
lea rdx, [rdi + 0xa0]
mov r8d, 0xffffffff
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
cmp eax, 1
sete r14b
je 0x140039dba
call fcn.1400023f0
mov r9, rax
lea r8, [rdi + 0xa0]
lea rdx, str.Failed_to_add_HTTP_request_headers___ws_.___ws_
mov ecx, 8
call fcn.14002a3c0
test r14b, r14b
je 0x140039f66
xorps xmm0, xmm0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
movdqu xmmword [rsp + 0x48], xmm0
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, dword [r12]
lea rdx, str.Sending_request...
mov rdi, qword [r12 + 8]
mov ecx, 8
mov qword [rsp + 0x40], rax
call fcn.14002a430
lea rax, [rsp + 0x40]
mov r9, rdi
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov dword [rsp + 0x28], ebx
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
je 0x140039e44
call fcn.1400023f0
mov r8, rax
lea rdx, str.Failed_to_sent_the_request.___ws_
mov ecx, 8
call fcn.14002a3c0
mov rbx, rsi
jmp 0x140039f84
mov rcx, qword [rsp + 0x40]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword [rsp + 0x48]
cmp eax, 0x400000
sete dil
je 0x140039e78
mov r8d, eax
lea rdx, str.The_request_to_the_server_has_failed_with_the_code_0x_X.
mov ecx, 8
call fcn.14002a3c0
mov rbx, rsi
test dil, dil
je 0x140039f84
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
cmp eax, 1
je 0x140039eb2
call fcn.1400023f0
mov r8, rax
lea rdx, str.Failed_to_receive_the_response_for_our_request.___ws_
mov ecx, 8
call fcn.14002a3c0
jmp 0x140039f84
mov rcx, qword [rsp + 0x40]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword [rsp + 0x48]
cmp eax, 0x20000
sete dil
je 0x140039ee6
mov r8d, eax
lea rdx, str.Retrieving_a_response_from_the_server_has_failed_with_the_code_0x_X.
mov ecx, 8
call fcn.14002a3c0
test dil, dil
je 0x140039f84
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x28], r13
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x58], r13d
mov edx, 0x20000013
mov dword [rsp + 0x5c], 4
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp eax, 1
je 0x140039f41
call fcn.1400023f0
mov r8, rax
lea rdx, str.Failed_to_retrieve_the_status_code_from_headers.___ws_
mov ecx, 8
call fcn.14002a3c0
jmp 0x140039f84
mov r8d, dword [rsp + 0x58]
lea rdx, str.Status_code_retrieved_from_headers:_code__u
mov ecx, 8
call fcn.14002a430
cmp dword [rsp + 0x58], 0xc8
jne 0x140039f84
mov dil, 1
jmp 0x140039f87
xorps xmm0, xmm0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
movdqu xmmword [rsp + 0x48], xmm0
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsp + 0x40], rax
xor dil, dil
mov r14, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x90]
test rbx, rbx
je 0x140039fc3
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea rdx, str.Request_handle_closed.
mov ecx, 8
call fcn.14002a430
mov rbx, qword [rsp + 0xc0]
test rbp, rbp
je 0x140039fea
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea rdx, str.Connection_handle_closed.
mov ecx, 8
call fcn.14002a430
call fcn.14002a400
movzx eax, dil
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400d51a0
add rsp, 0x98
pop rdi
pop rbp
ret