Function at 0x180030cb0
Capabilities:
Check http status code
Connect to http server
Create http request
Make an http request with a cookie
Print debug messages
Send data
Send http request

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1780]
mov eax, 0x1880
call fcn.18004b970
sub rsp, rax
mov rax, qword [0x1800ba0e0]
xor rax, rsp
mov qword [rbp + 0x1770], rax
mov r12, r8
lea rdi, [rcx + 0x420]
mov r15, rdx
lea rbx, [rcx + 0x430]
mov rsi, rcx
or r14, 0xffffffffffffffff
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x180030d18
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsi + 0x10], 0
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x180030d2f
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsi + 8], 0
mov rcx, qword [rsi]
test rcx, rcx
je 0x180030d44
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsi], 0
xor edx, edx
mov dword [rsi + 0x18], 0
mov r8d, 0x400
lea rcx, [rsi + 0x1c]
call fcn.180050fe0
mov qword [rdi], 0
xor edx, edx
xor edi, edi
mov r8d, 0x400
mov rcx, rbx
mov qword [rsi + 0x428], rdi
call fcn.180050fe0
lea edx, [rdi + 0x2f]
mov rcx, r15
call fcn.180053728
test rax, rax
je 0x180030dae
lea rcx, [rax + 1]
mov rdx, rbx
sub rdx, rcx
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x180030da0
lea rdx, str.https:__
mov rcx, r15
call fcn.180053868
test rax, rax
je 0x180030dc9
mov dword [rsi + 0x18], 1
xor edx, edx
lea rcx, [rbp + 0xb70]
mov r8d, 0x400
call fcn.180050fe0
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], edi
lea r8, [rbp + 0xb70]
mov rdx, r15
mov rcx, rsi
call fcn.180030970
xor edx, edx
lea rcx, [rbp + 0x770]
mov r8d, 0x400
call fcn.180050fe0
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x400
call fcn.180050fe0
lea r9, [rbp + 0x770]
mov rcx, r15
lea r8, [rsp + 0x70]
lea rdx, [0x18008ab10]
cmp dword [rsi + 0x18], edi
jne 0x180030e40
lea rdx, str.http:_________n_
call fcn.180031420
movzx eax, byte [rbp + 0x770]
cmp al, byte [0x180087bb0]
jne 0x180030e60
mov eax, 0x2f
mov word [rbp + 0x770], ax
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor r8d, r8d
lea rcx, str.CMyRequest
lea edx, [r9 + 1]
call qword [sym.imp.WININET.dll_InternetOpenA]
mov qword [rsi], rax
test rax, rax
je 0x18003137f
mov r9d, 4
mov dword [rsp + 0x50], 0x1388
lea r8, [rsp + 0x50]
mov rcx, rax
lea edx, [r9 - 2]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
je 0x18003137f
movzx r8d, word [rsp + 0x40]
lea rdx, [rbp + 0xb70]
mov rcx, qword [rsi]
xor r9d, r9d
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_InternetConnectA]
mov qword [rsi + 8], rax
test rax, rax
je 0x18003137f
cmp dword [rsi + 0x18], 0
mov edi, 0x80b000
mov eax, 0x4000000
cmove edi, eax
mov ebx, edi
test r12, r12
je 0x180030f1b
lea rdx, str.Cookie:
mov rcx, r12
call fcn.180053868
test rax, rax
je 0x180030f1b
bts ebx, 0x13
mov rcx, qword [rsi + 8]
lea r8, [rbp + 0x770]
xor edi, edi
lea rdx, str.HEAD
mov qword [rsp + 0x38], rdi
xor r9d, r9d
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
mov qword [rsi + 0x10], rax
test rax, rax
je 0x18003137f
test r12, r12
je 0x180030f83
mov r8, r14
inc r8
cmp byte [r12 + r8], dil
jne 0x180030f60
mov r9d, 0xa0000000
mov rdx, r12
mov rcx, rax
call qword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
test eax, eax
je 0x18003137f
mov rcx, qword [rsi + 0x10]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], edi
xor edx, edx
call qword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x18003100d
nop dword [rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f0d
jne 0x18003137f
mov rcx, qword [rsi + 0x10]
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x48]
mov dword [rsp + 0x58], 4
mov edx, 0x1f
call qword [sym.imp.WININET.dll_InternetQueryOptionA]
mov rcx, qword [rsi + 0x10]
lea r8, [rsp + 0x48]
or dword [rsp + 0x48], 0x100
mov r9d, 4
lea edx, [r9 + 0x1b]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
mov rcx, qword [rsi + 0x10]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], edi
xor edx, edx
call qword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x180030fa0
mov rcx, qword [rsi + 0x10]
lea r9, [rsp + 0x60]
lea r8, [rsi + 0x1c]
mov dword [rsp + 0x60], 0x400
mov edx, SafeArrayUnaccessData
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x18003137f
lea rcx, [rsi + 0x1c]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea r8, [rsp + 0x44]
mov dword [rsp + 0x44], r14d
lea rdx, [rsi + 0x1c]
mov rcx, rsi
call fcn.180030ae0
mov ecx, dword [rsp + 0x44]
lea eax, [rcx - 0x12d]
cmp eax, 1
ja 0x180031219
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x400
call fcn.180050fe0
xor edx, edx
lea rcx, [rbp + 0x370]
mov r8d, 0x400
call fcn.180050fe0
mov r8d, 0x400
lea rdx, [rsi + 0x1c]
lea rcx, [rbp + 0x370]
call fcn.18005ee10
lea rdx, [0x180088480]
lea rcx, [rbp + 0x370]
call fcn.18005ef74
mov rbx, rax
test rax, rax
je 0x18003112b
nop dword [rax]
nop dword [rax + rax]
lea rdx, str.Location
mov rcx, rbx
call fcn.180053868
test rax, rax
jne 0x1800310fc
lea rdx, [0x180088480]
xor ecx, ecx
call fcn.18005ef74
mov rbx, rax
test rax, rax
jne 0x1800310d0
jmp 0x18003112b
xor edx, edx
lea rcx, [rbp + 0x1370]
mov r8d, 0x400
call fcn.180050fe0
lea r9, [rsp + 0x70]
mov rcx, rbx
lea r8, [rbp + 0x1370]
lea rdx, str.__:_:____n_
call fcn.180031420
movzx eax, byte [rsp + 0x70]
cmp al, byte [0x180087bb0]
je 0x18003137f
lea rax, [rsp + 0x70]
mov r8, r15
sub r8, rax
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x180031163
inc rax
test ecx, ecx
jne 0x180031150
test edx, edx
je 0x180031213
lea rdx, str.http:__
lea rcx, [rsp + 0x70]
call fcn.180053868
test rax, rax
jne 0x1800311e2
lea rdx, str.https:__
lea rcx, [rsp + 0x70]
call fcn.180053868
test rax, rax
jne 0x1800311e2
lea rdx, str.http:__
mov rcx, r15
call fcn.180053868
lea r9, [rsp + 0x70]
lea r8, [rbp + 0xb70]
test rax, rax
je 0x1800311d9
lea rdx, str.http:___s_s
mov rcx, r15
call fcn.1800313c0
lea rbx, [rsi + 0x430]
lea rdi, [rsi + 0x420]
jmp 0x180030d01
lea rdx, str.https:___s_s
jmp 0x1800311be
lea rax, [rsp + 0x70]
mov rdx, r15
sub rdx, rax
lea rcx, [rsp + 0x70]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1800311f2
lea rbx, [rsi + 0x430]
lea rdi, [rsi + 0x420]
jmp 0x180030d01
mov ecx, dword [rsp + 0x44]
jmp 0x180031231
cmp ecx, 0xc8
je 0x1800312a8
cmp ecx, 0xce
jne 0x18003137f
cmp ecx, 0xc8
je 0x1800312a8
cmp ecx, 0xce
jne 0x1800312e9
xor edx, edx
lea rcx, [rbp + 0x370]
mov r8d, 0x400
call fcn.180050fe0
lea r9, [rbp + 0x370]
mov rcx, rsi
lea r8, str.Content_Range
lea rdx, [rsi + 0x1c]
call fcn.180030bd0
lea rcx, [rsi + 0x420]
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x58]
lea rcx, [rbp + 0x370]
mov qword [rsp + 0x58], rdi
lea r8, [rsp + 0x48]
lea rdx, str.bytes__lld__lld__lld
call fcn.180031420
jmp 0x1800312e9
xor edx, edx
lea rcx, [rbp + 0x370]
mov r8d, 0x400
call fcn.180050fe0
lea r9, [rbp + 0x370]
mov rcx, rsi
lea r8, str.Content_Length
lea rdx, [rsi + 0x1c]
call fcn.180030bd0
lea rcx, [rbp + 0x370]
call fcn.18005ed74
mov qword [rsi + 0x420], rax
xor edx, edx
lea rcx, [rbp + 0xf70]
mov r8d, 0x400
call fcn.180050fe0
lea r9, [rbp + 0xf70]
mov rcx, rsi
lea r8, str.Content_Disposition
lea rdx, [rsi + 0x1c]
call fcn.180030bd0
test al, al
je 0x18003137b
lea rdx, str.filename
lea rcx, [rbp + 0xf70]
call fcn.180053868
mov rbx, rax
test rax, rax
je 0x18003137b
add rbx, 9
nop word [rax + rax]
inc r14
cmp byte [rbx + r14], dil
jne 0x180031340
cmp byte [rbx], 0x22
jne 0x180031355
inc rbx
sub r14, 2
xor edx, edx
lea rcx, [rsi + 0x430]
mov r8d, 0x400
call fcn.180050fe0
mov r8, r14
lea rcx, [rsi + 0x430]
mov rdx, rbx
call fcn.18005ee10
mov al, 1
jmp 0x180031381
xor al, al
mov rcx, qword [rbp + 0x1770]
xor rcx, rsp
call fcn.18004b0f0
mov rbx, qword [rsp + 0x18d8]
add rsp, 0x1880
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret