Function at 0x140004f90
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Send data
Send http request
Set http header

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x148
mov rax, qword [0x140036010]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x44], 0
mov dword [rsp + 0xd0], 0
mov dword [rsp + 0xc8], 0
mov dword [rsp + 0xb8], 0
mov byte [rsp + 0x40], 1
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, [0x14002fb78]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jne 0x140005059
lea r8, [0x14002fba0]
lea rdx, [0x14002fbb8]
lea rcx, str._s__s_WinHttpOpen_error_r_n
call fcn.14000bdf0
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
jmp 0x14000572d
mov rax, qword [rsp + 0x160]
add rax, 0x48
xor r9d, r9d
mov rcx, qword [rsp + 0x160]
movzx r8d, word [rcx + 0x458]
mov rdx, rax
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
jne 0x1400050bc
lea r8, [0x14002fc08]
lea rdx, [0x14002fc20]
lea rcx, str._s__s_WinHttpOpen_WinHttpConnect_r_n
call fcn.14000bdf0
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
jmp 0x14000572d
mov rax, qword [rsp + 0x160]
add rax, 0x250
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x160]
add rcx, 8
call fcn.140005a60
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, qword [rsp + 0x80]
mov r8, rcx
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x14000514f
lea r8, str.HttpProto::httpRequest
lea rdx, str.C:Usersljglocust_clientclienthttp.cpp
lea rcx, str._s__s_WinHttpOpen_WinHttpOpenRequest_r_n
call fcn.14000bdf0
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
jmp 0x14000572d
mov dword [rsp + 0xcc], 3
mov r9d, 4
lea r8, [rsp + 0xcc]
mov edx, 0x76
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov dword [rsp + 0x44], eax
lea rdx, [0x14002fabc]
lea rcx, [rsp + 0x110]
call fcn.140005b60
nop
lea rdx, [rsp + 0x110]
mov rcx, qword [rsp + 0x160]
call fcn.140004d90
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x44], eax
lea rcx, [rsp + 0xf0]
call fcn.140005bf0
nop
lea r8, [rsp + 0xf0]
mov edx, dword [rsp + 0x170]
mov rcx, qword [rsp + 0x160]
call fcn.140004d20
lea rcx, [rsp + 0xf0]
call fcn.140005a60
xor r9d, r9d
mov r8d, 0xffffffff
mov rdx, rax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jne 0x14000523c
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x48], al
lea rcx, [rsp + 0xf0]
call fcn.140005b30
nop
lea rcx, [rsp + 0x110]
call fcn.140005b30
movzx eax, byte [rsp + 0x48]
jmp 0x14000572d
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x170]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jne 0x1400052a9
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x49], al
lea rcx, [rsp + 0xf0]
call fcn.140005b30
nop
lea rcx, [rsp + 0x110]
call fcn.140005b30
movzx eax, byte [rsp + 0x49]
jmp 0x14000572d
cmp qword [rsp + 0x168], 0
je 0x140005333
cmp dword [rsp + 0x170], 0
je 0x140005333
mov edx, dword [rsp + 0x170]
mov rcx, qword [rsp + 0x168]
call fcn.14000c0c0
lea r9, [rsp + 0xd0]
mov r8d, dword [rsp + 0x170]
mov rdx, qword [rsp + 0x168]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpWriteData]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jne 0x140005333
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x4a], al
lea rcx, [rsp + 0xf0]
call fcn.140005b30
nop
lea rcx, [rsp + 0x110]
call fcn.140005b30
movzx eax, byte [rsp + 0x4a]
jmp 0x14000572d
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jne 0x14000537e
mov byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x4b], al
lea rcx, [rsp + 0xf0]
call fcn.140005b30
nop
lea rcx, [rsp + 0x110]
call fcn.140005b30
movzx eax, byte [rsp + 0x4b]
jmp 0x14000572d
mov edx, 0x18
lea rcx, [rsp + 0xd8]
call fcn.1400027a0
lea rcx, [rsp + 0xd8]
call fcn.140005a20
nop
mov dword [rsp + 0x64], 0
lea rdx, [rsp + 0xc8]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0xc8], 0
jbe 0x140005543
cmp dword [rsp + 0x44], 0
je 0x140005543
mov dword [rsp + 0x50], 0x1000
mov ecx, 0x1000
call fcn.14000e09c
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0xc0], rax
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0xd8]
call fcn.1400058a0
cmp dword [rsp + 0x44], 0
je 0x140005543
cmp dword [rsp + 0xc8], 0
jbe 0x140005543
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0xc8], eax
jbe 0x140005461
lea r9, [rsp + 0xb8]
mov r8d, dword [rsp + 0x50]
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov dword [rsp + 0x44], eax
jmp 0x140005488
lea r9, [rsp + 0xb8]
mov r8d, dword [rsp + 0xc8]
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
je 0x140005499
cmp dword [rsp + 0xb8], 0
ja 0x14000549e
jmp 0x140005543
mov eax, dword [rsp + 0xb8]
mov rcx, qword [rsp + 0xc0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xc0], rax
mov eax, dword [rsp + 0xb8]
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0xb8]
mov ecx, dword [rsp + 0x64]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x64], eax
cmp dword [rsp + 0x50], 0
jg 0x140005527
mov dword [rsp + 0x50], 0x1000
mov ecx, 0x1000
call fcn.14000e09c
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0xc0], rax
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0xd8]
call fcn.1400058a0
lea rdx, [rsp + 0xc8]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov dword [rsp + 0x44], eax
jmp 0x140005415
lea rcx, [rsp + 0xd8]
call fcn.140005870
test rax, rax
jbe 0x1400056bd
cmp dword [rsp + 0x64], 0
jle 0x1400056bd
mov rax, qword [rsp + 0x160]
cmp qword [rax + 0x470], 0
je 0x1400055b2
mov rax, qword [rsp + 0x160]
mov rax, qword [rax + 0x470]
mov qword [rsp + 0x98], rax
mov edx, 1
mov rcx, qword [rsp + 0x98]
call fcn.14000e068
mov rax, qword [rsp + 0x160]
mov qword [rax + 0x470], 0
lea rcx, [rsp + 0xd8]
call fcn.140005870
imul rax, rax, 0x1000
add rax, 0x10
mov rcx, rax
call fcn.14000e09c
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x160]
mov rcx, qword [rsp + 0xa0]
mov qword [rax + 0x470], rcx
mov rax, qword [rsp + 0x160]
mov rax, qword [rax + 0x470]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x160]
mov ecx, dword [rsp + 0x64]
mov dword [rax + 0x468], ecx
mov dword [rsp + 0x60], 0
jmp 0x14000562b
mov eax, dword [rsp + 0x60]
inc eax
mov dword [rsp + 0x60], eax
movsxd rax, dword [rsp + 0x60]
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0xd8]
call fcn.140005870
mov rcx, qword [rsp + 0xa8]
cmp rcx, rax
jae 0x1400056bd
movsxd rax, dword [rsp + 0x60]
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.140005840
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rax]
mov ecx, 0x1000
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x78]
add rax, 0x1000
mov qword [rsp + 0x78], rax
movsxd rax, dword [rsp + 0x60]
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.140005840
mov rax, qword [rax]
mov qword [rsp + 0xb0], rax
mov edx, 1
mov rcx, qword [rsp + 0xb0]
call fcn.14000e068
jmp 0x140005621
cmp qword [rsp + 0x68], 0
je 0x1400056d0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x70], 0
je 0x1400056e3
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x58], 0
je 0x1400056f6
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x4c], al
lea rcx, [rsp + 0xd8]
call fcn.140005a00
nop
lea rcx, [rsp + 0xf0]
call fcn.140005b30
nop
lea rcx, [rsp + 0x110]
call fcn.140005b30
movzx eax, byte [rsp + 0x4c]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.14000db20
add rsp, 0x148
pop rdi
pop rsi
ret