Function at 0x180002000
Capabilities:
Prepare http request
Read http header
Receive http response
Send data
Send http request
Set http header
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x70
xor ebp, ebp
mov dword [rsp + 0x30], 0x800000
mov r15, r9
mov qword [rsp + 0x28], rbp
mov r14, r8
mov qword [rsp + 0x20], rbp
mov rdi, rdx
xor r9d, r9d
xor r8d, r8d
lea rdx, str.POST
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, qword [rsp + 0xb0]
mov rsi, rax
test rax, rax
je 0x18000229a
mov r9d, 0x20000000
or r8d, 0xffffffff
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x180002291
lea r9d, [rbp + 4]
mov dword [rsp + 0x44], 0x3100
lea r8, [rsp + 0x44]
mov rcx, rsi
lea edx, [rbp + 0x1f]
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x180002291
mov eax, dword [r15 + 8]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
xor r8d, r8d
mov dword [rsp + 0x28], eax
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x20], ebp
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x180002291
lea r9, [rsp + 0x48]
mov qword [rsp + 0x50], rbp
lea r8, [rsp + 0x50]
mov dword [rsp + 0x48], 8
lea edx, [rbp + 0x4e]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
test eax, eax
je 0x180002291
mov rax, qword [rsp + 0x50]
mov edi, dword [r14 + 8]
mov r8, qword [rax + 0x18]
cmp edi, dword [r8 + 0x78]
jne 0x180002291
mov edx, ebp
test edi, edi
je 0x180002137
mov r8, qword [r8 + 0x80]
mov r9, qword [r14]
nop dword [rax + rax]
mov ecx, edx
movzx eax, byte [r8 + rcx]
cmp byte [r9 + rcx], al
jne 0x180002220
inc edx
cmp edx, edi
jb 0x180002120
mov eax, 1
test eax, eax
je 0x180002291
mov r8d, dword [r15 + 8]
test r8d, r8d
je 0x180002164
mov rdx, qword [r15]
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
je 0x180002291
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x180002291
xor r8d, r8d
mov qword [rsp + 0x28], rbp
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x4c], 0x14
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea edx, [r8 + 5]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x180002291
movzx edx, word [rsp + 0x58]
mov edi, ebp
mov r9d, ebp
mov r8d, ebp
test dx, dx
je 0x180002291
lea eax, [rdx - 0x30]
cmp ax, 9
ja 0x180002291
lea edi, [rdi + rdi*4]
movzx eax, dx
lea edi, [rdi - 0x18]
lea edi, [rax + rdi*2]
cmp r9d, edi
ja 0x180002291
inc r8d
mov r9d, edi
movzx edx, word [rsp + r8*2 + 0x58]
test dx, dx
jne 0x1800021c1
lea eax, [rdi - 1]
cmp eax, 0xfffffffd
ja 0x180002291
test rbx, rbx
je 0x18000222d
mov edx, edi
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
jne 0x180002227
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, ebp
jmp 0x18000213c
mov qword [rbx], rax
mov dword [rbx + 8], edi
lea rdx, [rsp + 0x40]
mov rcx, rsi
mov edi, ebp
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x180002291
mov r8d, dword [rsp + 0x40]
test r8d, r8d
je 0x1800022e7
mov eax, dword [rbx + 8]
cmp edi, eax
jae 0x1800022e7
lea ecx, [r8 + rdi]
cmp ecx, eax
ja 0x180002291
cmp ecx, edi
jbe 0x180002291
mov edx, edi
xor r9d, r9d
add rdx, qword [rbx]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x180002291
add edi, dword [rsp + 0x40]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x180002241
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test rbx, rbx
je 0x1800022cb
mov rdi, qword [rbx]
mov eax, dword [rbx + 8]
mov rcx, rdi
test rdi, rdi
je 0x1800022ba
test eax, eax
je 0x1800022ba
mov ecx, eax
xor eax, eax
rep stosb byte [rdi], al
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800022c8
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], rbp
mov dword [rbx + 8], ebp
xor eax, eax
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
cmp edi, dword [rbx + 8]
jne 0x180002291
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, 1
jmp 0x1800022cd