Function at 0x140029480
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Set http header

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x5d0
mov rax, qword [0x140064010]
xor rax, rsp
mov qword [rsp + 0x5c0], rax
mov r15, r8
mov r12, rdx
mov rdi, rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x158], rdx
mov qword [rsp + 0x150], r8
mov rbx, qword [rsp + 0x638]
xor r14d, r14d
mov dword [rsp + 0x40], r14d
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], r14
mov qword [rcx + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rcx], r14b
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x78], rax
test rax, rax
je 0x1400299fa
mov rdx, r12
cmp qword [r12 + 0x18], 8
jb 0x140029522
mov rdx, qword [r12]
mov r8d, 0x1bb
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x70], rax
test rax, rax
je 0x140029a22
mov r8, r15
cmp qword [r15 + 0x18], 8
jb 0x14002954f
mov r8, qword [r15]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea rdx, str.POST
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov r13, rax
test rax, rax
je 0x140029a4a
mov r9d, 0x20000000
mov r8d, 0x1e
lea rdx, str.Content_Type:_application_json
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x140029a72
mov r8, qword [rbx + 0x10]
lea r9, [rsp + 0x1b2]
movabs r10, 0xcccccccccccccccd
nop word [rax + rax]
sub r9, 2
mov rax, r10
mul r8
shr rdx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8, rdx
test rdx, rdx
jne 0x1400295c0
lea r8, [rsp + 0x1b2]
mov rdx, r9
lea rcx, [rsp + 0x80]
call fcn.14000d860
mov dword [rsp + 0x40], 0x19
mov r9d, 0x10
lea r8, str.Content_Length:
lea rcx, [rsp + 0x80]
call fcn.14000cc80
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x50], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x60], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], 7
mov word [rax], r14w
mov dword [rsp + 0x40], 0x1b
mov r8d, 2
lea rdx, [0x140052320]
lea rcx, [rsp + 0x50]
call fcn.14000a5f0
xorps xmm0, xmm0
movups xmmword [rsp + 0x168], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x178], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x168], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x178], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], 7
mov word [rax], r14w
mov dword [rsp + 0x40], 0x1f
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140029706
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140029701
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140029701
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140049448
movdqa xmm0, xmmword [0x140054db0]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], r14w
mov rdx, qword [rsp + 0x98]
cmp rdx, 8
jb 0x140029765
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140029760
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140029760
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140049448
movdqa xmm0, xmmword [0x140054db0]
movdqu xmmword [rsp + 0x90], xmm0
mov word [rsp + 0x80], r14w
lea rdx, [rsp + 0x168]
cmp qword [rsp + 0x180], 8
cmovae rdx, qword [rsp + 0x168]
mov r9d, 0x20000000
mov r8d, dword [rsp + 0x178]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x140029a9b
mov eax, dword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x1400297c5
mov rbx, qword [rbx]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
mov r9, rbx
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140029ac3
xor edx, edx
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140029aeb
mov dword [rsp + 0x160], r14d
nop word [rax + rax]
lea r9, [rsp + 0x160]
mov r8d, 0x400
lea rdx, [rsp + 0x1c0]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1400298a1
mov eax, dword [rsp + 0x160]
test eax, eax
je 0x1400298a1
mov esi, eax
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
mov rax, rdx
sub rax, rcx
cmp rsi, rax
ja 0x140029884
lea rax, [rcx + rsi]
mov qword [rdi + 0x10], rax
mov rax, rdi
cmp rdx, 0x10
jb 0x140029867
mov rax, qword [rdi]
lea rbx, [rax + rcx]
mov r8, rsi
lea rdx, [rsp + 0x1c0]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rsi], 0
jmp 0x140029810
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x1c0]
mov rdx, rsi
mov rcx, rdi
call fcn.14000c730
jmp 0x140029810
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
mov rdx, qword [rsp + 0x180]
cmp rdx, 8
jb 0x14002990d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x168]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140029907
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140029907
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140049448
nop
jmp 0x140029927
mov rdx, qword [r12 + 0x18]
cmp rdx, 8
jb 0x140029968
mov rcx, qword [r12]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140029963
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400299ec
mov rcx, r8
call fcn.140049448
mov qword [r12 + 0x10], r14
mov qword [r12 + 0x18], 7
mov word [r12], r14w
mov rdx, qword [r15 + 0x18]
cmp rdx, 8
jb 0x1400299b6
lea rdx, [rdx*2 + 2]
mov rcx, qword [r15]
cmp rdx, 0x1000
jb 0x1400299b1
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400299f3
mov rcx, r8
call fcn.140049448
mov qword [r15 + 0x10], r14
mov qword [r15 + 0x18], 7
mov word [r15], r14w
mov rax, rdi
mov rcx, qword [rsp + 0x5c0]
xor rcx, rsp
call fcn.140048f00
add rsp, 0x5d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
lea rdx, str.Failed_to_initialize_WinHTTP.
lea rcx, [rsp + 0xa8]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0xa8]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_connect_to_host.
lea rcx, [rsp + 0xc0]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0xc0]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_open_HTTP_request.
lea rcx, [rsp + 0xd8]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0xd8]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_set_request_headers.
lea rcx, [rsp + 0xf0]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0xf0]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Failed_to_set_Content_Length_header.
lea rcx, [rsp + 0x108]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0x108]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_send_HTTP_request.
lea rcx, [rsp + 0x120]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0x120]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_receive_HTTP_response.
lea rcx, [rsp + 0x138]
call fcn.140002d90
lea rdx, [0x140060328]
lea rcx, [rsp + 0x138]
call sub.VCRUNTIME140.dll__CxxThrowException
int3