Function at 0x180004d50
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1200
call fcn.180044190
sub rsp, rax
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rsp + 0x1238], rbx
mov qword [rsp + 0x1240], rsi
mov rax, qword [0x180060ef8]
xor rax, rsp
mov qword [rsp + 0x11f0], rax
mov r13, rcx
mov qword [rsp + 0x98], rcx
call fcn.180021808
mov rcx, rax
xor r12d, r12d
mov edx, r12d
test rax, rax
setne dl
test edx, edx
jne 0x180004dc3
mov ecx, 0x80004005
call fcn.180002080
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
lea rdx, str.Content_Type:_application_x_www_form_urlencoded_n
test rdx, 0xffffffffffff0000
jne 0x180004e0d
movzx edi, dx
mov ecx, edi
call fcn.1800219a0
test rax, rax
je 0x180004e07
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.180009b90
or rsi, 0xffffffffffffffff
jmp 0x180004e2d
or rsi, 0xffffffffffffffff
jmp 0x180004e2d
xor eax, eax
or rsi, 0xffffffffffffffff
mov rcx, rsi
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x50]
call fcn.180008c90
nop
call fcn.180021808
mov rdx, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x180004e4d
mov ecx, 0x80004005
call fcn.180002080
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, [0x180051718]
test rdx, 0xffffffffffff0000
jne 0x180004e90
movzx edi, dx
mov ecx, edi
call fcn.1800219a0
test rax, rax
je 0x180004eac
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.180009b90
jmp 0x180004eac
xor eax, eax
mov rcx, rsi
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x48]
call fcn.180008c90
nop
lea rax, vtable.CURLEncode.0
mov qword [rsp + 0xb0], rax
call fcn.180021808
mov rdx, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x180004edb
mov ecx, 0x80004005
call fcn.180002080
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea r15, [0x180051b28]
test r15, 0xffffffffffff0000
jne 0x180004f1f
movzx edi, r15w
mov ecx, edi
call fcn.1800219a0
test rax, rax
je 0x180004f3e
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.180009b90
jmp 0x180004f3e
xor eax, eax
mov rcx, rsi
mov rdi, r15
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r15
lea rcx, [rsp + 0x40]
call fcn.180008c90
nop
mov rcx, qword [r13 + 0xb8]
sub rcx, 0x18
call fcn.180008d80
add rax, 0x18
mov qword [rsp + 0xa0], rax
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x90]
call fcn.180014b10
mov r14, rax
mov rbx, qword [r13 + 0xc0]
call fcn.180021808
mov rdx, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x180004f99
mov ecx, 0x80004005
call fcn.180002080
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x78], rdi
test rbx, rbx
je 0x180004fdf
test rbx, 0xffffffffffff0000
jne 0x180004fdf
movzx ebx, bx
mov ecx, ebx
call fcn.1800219a0
test rax, rax
je 0x180004ff1
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.180009b90
mov rdi, qword [rsp + 0x78]
jmp 0x180004ff1
mov rdx, rbx
lea rcx, [rsp + 0x78]
call fcn.180007910
mov rdi, qword [rsp + 0x78]
mov rax, qword [r13 + 0xb0]
mov qword [rsp + 0x28], rax
mov rax, qword [r13 + 0xa8]
mov qword [rsp + 0x20], rax
mov r9, qword [r14]
mov r8, rdi
lea rdx, str.grant_typeauthorization_codecode_sredirect_uri_sclient_id_sclient_secret_s
lea rcx, [rsp + 0x40]
call fcn.18000a510
nop
lea rdx, [rdi - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18000503c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18000505e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov qword [rsp + 0xe8], 0xf
mov qword [rsp + 0xe0], r12
mov byte [rsp + 0xd0], 0
xor r8d, r8d
mov rdx, r15
lea rcx, [rsp + 0xc8]
call fcn.180001e30
nop
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WININET.dll_InternetOpenA]
mov qword [rsp + 0x80], rax
test rax, rax
je 0x1800051f8
mov r8d, 0x1bb
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov rdx, qword [0x180067be8]
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetConnectA]
mov rdi, rax
mov qword [rsp + 0xa8], rax
test rax, rax
je 0x1800051e3
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
xor r9d, r9d
lea r8, str._oauth2_token
lea rdx, [0x180051848]
mov rcx, rax
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
mov r14, rax
test rax, rax
je 0x1800051d3
mov rbx, qword [rsp + 0x40]
mov ecx, dword [rbx - 0x10]
mov rdx, qword [rsp + 0x50]
mov dword [rsp + 0x20], ecx
mov r9, rbx
mov r8d, dword [rdx - 0x10]
mov rcx, rax
call qword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x1800051c8
mov dword [rsp + 0x58], r12d
lea r9, [rsp + 0x58]
mov r8d, 0xfff
lea rdx, [rsp + 0x1f0]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1800051b9
mov eax, dword [rsp + 0x58]
mov byte [rsp + rax + 0x1f0], 0
xor eax, eax
mov rcx, rsi
lea rdi, [rsp + 0x1f0]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0x1f0]
lea rcx, [rsp + 0xc8]
call fcn.180008b20
cmp dword [rsp + 0x58], 0
jne 0x180005162
mov rdi, qword [rsp + 0xa8]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x1800051d8
mov rbx, qword [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x1800051e8
mov rbx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x1800051fd
mov rbx, qword [rsp + 0x40]
cmp qword [rsp + 0xe0], 0
jne 0x18000529f
cmp qword [rsp + 0xe8], 0x10
jb 0x180005224
mov rcx, qword [rsp + 0xd0]
call fcn.1800212e0
mov qword [rsp + 0xe8], 0xf
mov qword [rsp + 0xe0], r12
mov byte [rsp + 0xd0], 0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18000525b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18000527b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x180005298
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x180005727
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.1800161f0
nop
lea rcx, [rsp + 0xf0]
call fcn.18001ae40
nop
xor r9d, r9d
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0xc8]
lea rcx, [rsp + 0xf0]
call fcn.18001aeb0
test al, al
jne 0x18000538b
lea rcx, [rsp + 0xf0]
call fcn.180005760
nop
lea rcx, [rsp + 0x60]
call fcn.180016860
nop
cmp qword [rsp + 0xe8], 0x10
jb 0x180005310
mov rcx, qword [rsp + 0xd0]
call fcn.1800212e0
mov qword [rsp + 0xe8], 0xf
mov qword [rsp + 0xe0], r12
mov byte [rsp + 0xd0], 0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x180005347
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x180005367
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x180005384
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x180005727
lea rdx, str.access_token
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800174b0
test al, al
jne 0x1800053ed
lea rdx, str.access_token
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800175e0
test al, al
je 0x1800053ed
lea rdx, str.access_token
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.180016b00
mov rdx, rax
lea rcx, [r13 + 0xc8]
call fcn.1800078c0
lea rdx, str.token_type
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800174b0
test al, al
jne 0x18000544f
lea rdx, str.token_type
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800175e0
test al, al
je 0x18000544f
lea rdx, str.token_type
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.180016b00
mov rdx, rax
lea rcx, [r13 + 0xd0]
call fcn.1800078c0
lea rdx, str.refresh_token
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800174b0
test al, al
jne 0x1800054b1
lea rdx, str.refresh_token
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800175e0
test al, al
je 0x1800054b1
lea rdx, str.refresh_token
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.180016b00
mov rdx, rax
lea rcx, [r13 + 0xe0]
call fcn.1800078c0
mov dword [r13 + 0xd8], r12d
lea rdx, str.expires_in
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.1800174b0
test al, al
jne 0x18000552f
lea rdx, str.expires_in
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.180017590
test al, al
je 0x18000552f
lea rdx, str.expires_in
lea rcx, [rsp + 0x60]
call fcn.180017220
mov rcx, rax
call fcn.180016b10
mov dword [r13 + 0xd8], eax
jmp 0x18000552f
mov rax, qword [r13 + 0xc8]
cmp dword [rax - 0x10], 0
je 0x18000561f
mov rax, qword [r13 + 0xd0]
cmp dword [rax - 0x10], 0
je 0x18000561f
cmp dword [r13 + 0xd8], 0
je 0x18000561f
mov rax, qword [r13 + 0xe0]
cmp dword [rax - 0x10], 0
je 0x18000561f
lea rcx, [rsp + 0xf0]
call fcn.180005760
nop
lea rcx, [rsp + 0x60]
call fcn.180016860
nop
cmp qword [rsp + 0xe8], 0x10
jb 0x1800055a1
mov rcx, qword [rsp + 0xd0]
call fcn.1800212e0
mov qword [rsp + 0xe8], 0xf
mov qword [rsp + 0xe0], r12
mov byte [rsp + 0xd0], 0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1800055d8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1800055f8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x180005615
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, 1
jmp 0x180005727
xor eax, eax
mov rcx, rsi
mov rdi, r15
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r15
lea rcx, [r13 + 0xc8]
call fcn.180008c90
xor eax, eax
mov rcx, rsi
mov rdi, r15
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r15
lea rcx, [r13 + 0xd0]
call fcn.180008c90
xor eax, eax
mov rcx, rsi
mov rdi, r15
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r15
lea rcx, [r13 + 0xe0]
call fcn.180008c90
nop
lea rcx, [rsp + 0xf0]
call fcn.180005760
nop
lea rcx, [rsp + 0x60]
call fcn.180016860
nop
cmp qword [rsp + 0xe8], 0x10
jb 0x1800056b1
mov rcx, qword [rsp + 0xd0]
call fcn.1800212e0
mov qword [rsp + 0xe8], 0xf
mov qword [rsp + 0xe0], r12
mov byte [rsp + 0xd0], 0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1800056e8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x180005708
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x180005725
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rsp + 0x11f0]
xor rcx, rsp
call fcn.18002fe70
lea r11, [rsp + 0x1200]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret