Function at 0x140021160
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov dword [rsp + 0x20], 0
mov r14, rcx
mov ebp, edx
mov rdi, r8
mov rsi, r9
xor r8d, r8d
xor r9d, r9d
xor edx, edx
lea rcx, str.WinHTTP_cccccc_1.0
mov dword [rsp + 0x48], 0
call sub.WINHTTP.dll_WinHttpOpen
mov r13, rax
test rax, rax
je 0x1400217db
mov rcx, qword [0x1400c14a0]
mov r8d, 0xa
lea rdx, str.hahaahahaa
call fcn.1400b17d0
mov rbx, qword [0x1400c14a0]
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov r12, qword [rbx + rax + 0xf0]
test r12, r12
je 0x14002178d
cmp byte [r12 + 0x38], 0
je 0x140021590
movsx edx, byte [r12 + 0x43]
mov rcx, qword [0x1400c14a0]
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
mov rdx, r14
xor r9d, r9d
movzx r8d, bp
mov rcx, r13
call sub.WINHTTP.dll_WinHttpConnect
mov r14, rax
test rax, rax
je 0x1400217c9
mov rcx, qword [0x1400c14a0]
mov r8d, 8
lea rdx, str.success1
call fcn.1400b17d0
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov r12, qword [rbx + rax + 0xf0]
test r12, r12
je 0x14002178d
cmp byte [r12 + 0x38], 0
je 0x1400215c8
movsx edx, byte [r12 + 0x43]
mov rcx, qword [0x1400c14a0]
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
xor r9d, r9d
mov r8, rsi
mov rcx, r14
mov dword [rsp + 0x30], 0x800000
lea rdx, [0x1400bc070]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call sub.WINHTTP.dll_WinHttpOpenRequest
mov r12, rax
test rax, rax
je 0x140021792
mov r9d, 4
lea r8, [rsp + 0x4c]
mov edx, 0x1f
mov rcx, rax
mov dword [rsp + 0x4c], 0x3100
call sub.WINHTTP.dll_WinHttpSetOption
mov rcx, qword [0x1400c14a0]
mov r8d, 8
lea rdx, str.success2
call fcn.1400b17d0
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov r15, qword [rbx + rax + 0xf0]
test r15, r15
je 0x14002178d
cmp byte [r15 + 0x38], 0
je 0x140021600
movsx edx, byte [r15 + 0x43]
mov rcx, qword [0x1400c14a0]
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x30], 0
mov rcx, r12
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call sub.WINHTTP.dll_WinHttpSendRequest
mov rcx, qword [0x1400c14a0]
mov edx, eax
mov esi, eax
call fcn.140077d20
mov r15, rax
mov rax, qword [rax]
mov rax, qword [rax - 0x18]
mov rbp, qword [r15 + rax + 0xf0]
test rbp, rbp
je 0x14002178d
cmp byte [rbp + 0x38], 0
je 0x140021638
movsx edx, byte [rbp + 0x43]
mov rcx, r15
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
test esi, esi
je 0x1400217b7
mov rcx, qword [0x1400c14a0]
mov r8d, 8
lea rdx, str.success3
call fcn.1400b17d0
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov r15, qword [rbx + rax + 0xf0]
test r15, r15
je 0x14002178d
cmp byte [r15 + 0x38], 0
je 0x140021670
movsx edx, byte [r15 + 0x43]
mov rcx, qword [0x1400c14a0]
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
xor edx, edx
mov rcx, r12
call sub.WINHTTP.dll_WinHttpReceiveResponse
mov rcx, qword [0x1400c14a0]
mov edx, eax
mov esi, eax
call fcn.140077d20
mov r15, rax
mov rax, qword [rax]
mov rax, qword [rax - 0x18]
mov rbp, qword [r15 + rax + 0xf0]
test rbp, rbp
je 0x14002178d
cmp byte [rbp + 0x38], 0
je 0x1400216a8
movsx edx, byte [rbp + 0x43]
mov rcx, r15
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
test esi, esi
je 0x1400217d2
mov rcx, qword [0x1400c14a0]
mov r8d, 8
lea rdx, str.success4
call fcn.1400b17d0
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov r15, qword [rbx + rax + 0xf0]
test r15, r15
je 0x14002178d
cmp byte [r15 + 0x38], 0
je 0x1400216e0
movsx edx, byte [r15 + 0x43]
mov rcx, qword [0x1400c14a0]
lea rbp, [rsp + 0x48]
xor r15d, r15d
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
mov qword [rsp + 0x20], rbp
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], 0
mov edx, 0x16
mov rcx, r12
call sub.WINHTTP.dll_WinHttpQueryHeaders
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140021750
test esi, esi
je 0x1400217c0
mov rcx, qword [0x1400c14a0]
mov r8d, 8
lea rdx, str.success5
call fcn.1400b17d0
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov rbx, qword [rbx + rax + 0xf0]
test rbx, rbx
je 0x14002178d
cmp byte [rbx + 0x38], 0
je 0x140021718
movsx edx, byte [rbx + 0x43]
mov rcx, qword [0x1400c14a0]
call fcn.140075c60
mov rcx, rax
call fcn.140075e50
mov rcx, r15
call sub.msvcrt.dll_wcslen
mov rdx, r15
mov rcx, rdi
lea r8, [rax + rax]
call sub.msvcrt.dll_memcpy
mov rcx, r15
call fcn.1400b7290
mov rcx, r12
call sub.WINHTTP.dll_WinHttpCloseHandle
mov rcx, r14
call sub.WINHTTP.dll_WinHttpCloseHandle
mov rcx, r13
call sub.WINHTTP.dll_WinHttpCloseHandle
nop
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r12
call fcn.14002d620
mov rax, qword [r12]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x1400211f5
mov rcx, r12
call rax
movsx edx, al
jmp 0x1400211f5
mov rcx, r12
call fcn.14002d620
mov rax, qword [r12]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x14002126a
mov rcx, r12
call rax
movsx edx, al
jmp 0x14002126a
mov rcx, r15
call fcn.14002d620
mov rax, qword [r15]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x14002131a
mov rcx, r15
call rax
movsx edx, al
jmp 0x14002131a
mov rcx, rbp
call fcn.14002d620
mov rax, qword [rbp]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x140021390
mov rcx, rbp
call rax
movsx edx, al
jmp 0x140021390
mov rcx, r15
call fcn.14002d620
mov rax, qword [r15]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x1400213e9
mov rcx, r15
call rax
movsx edx, al
jmp 0x1400213e9
mov rcx, rbp
call fcn.14002d620
mov rax, qword [rbp]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x140021440
mov rcx, rbp
call rax
movsx edx, al
jmp 0x140021440
mov rcx, r15
call fcn.14002d620
mov rax, qword [r15]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x140021499
mov rcx, r15
call rax
movsx edx, al
jmp 0x140021499
mov rcx, rbx
call fcn.14002d620
mov rax, qword [rbx]
mov edx, 0xa
lea rcx, [0x14002dac0]
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x14002152e
mov rcx, rbx
call rax
movsx edx, al
jmp 0x14002152e
mov ecx, dword [rsp + 0x48]
and rcx, 0xfffffffffffffffe
call fcn.1400b72c0
mov qword [rsp + 0x20], rbp
mov edx, 0xffff
mov rcx, r12
mov qword [rsp + 0x28], 0
mov r8, qword [rsp + 0xc0]
mov r9, rax
mov r15, rax
call sub.WINHTTP.dll_WinHttpQueryHeaders
mov esi, eax
jmp 0x1400214e7
call fcn.1400b82f0
lea rdx, str.error2
mov rcx, qword [0x1400c14a0]
call fcn.1400b48b0
mov rcx, rax
call fcn.1400b2780
mov ecx, 1
call sub.msvcrt.dll_exit
lea rdx, str.error3
jmp 0x140021799
lea rdx, str.error5
jmp 0x140021799
lea rdx, str.error1
jmp 0x140021799
lea rdx, str.error4
jmp 0x140021799
lea rdx, str.error
jmp 0x140021799