Function at 0x14008e490
Capabilities:
Check http status code
Connect to http server
Create http request
Get http content length
Query remote server for available data
Read data from internet
Receive data
Send data
Send http request

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1ff0]
mov eax, 0x20f0
call fcn.1400e6f00
sub rsp, rax
mov rax, qword [0x1403486d0]
xor rax, rsp
mov qword [rbp + 0x1fe0], rax
mov r13, rdx
mov rbx, rcx
xor edi, edi
mov dword [rsp + 0x54], edi
xor sil, sil
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetOpenA]
mov r12, rax
test rax, rax
je 0x14008eaf8
mov r8d, 0x1bb
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea rdx, str.setup.icloud.com
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetConnectA]
mov r15, rax
test rax, rax
je 0x14008eaae
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 0x4a00000
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea r8, str._setup_ws_1_directLoginToken
lea rdx, [0x140277f00]
mov rcx, rax
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
mov r14, rax
test rax, rax
je 0x14008ea58
mov rdi, 0xffffffffffffffff
mov r8, rdi
nop word [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x14008e580
xor eax, eax
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x14008e9f9
xor ebx, ebx
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x4c], 4
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x48]
mov edx, 0x20000013
mov rcx, r14
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x14008e9d3
mov eax, dword [rsp + 0x48]
cmp eax, 0x12e
je 0x14008e5f1
cmp eax, 0xc8
jne 0x14008e9d3
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x40]
mov edx, 0x20000005
mov rcx, r14
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x14008e9a9
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x14008eb3b
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
mov rbx, rsi
xor eax, eax
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x50], eax
nop dword [rax]
nop dword [rax + rax]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x44]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x14008e6b7
mov r8d, dword [rsp + 0x44]
test r8d, r8d
je 0x14008e6b7
mov ecx, r8d
sub rcx, rsi
add rcx, rbx
mov eax, dword [rsp + 0x40]
cmp rcx, rax
jge 0x14008e6b7
lea r9, [rsp + 0x50]
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x14008e6b7
mov eax, dword [rsp + 0x50]
add rbx, rax
cmp dword [rsp + 0x44], 0
ja 0x14008e660
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp - 0x20]
call sub.VCRUNTIME140.dll_memset
nop dword [rax + rax]
inc rdi
cmp byte [rsi + rdi], 0
jne 0x14008e6d0
mov dword [rsp + 0x28], edi
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, edi
mov r8, rsi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor esi, esi
mov qword [rbp - 0x68], rsi
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], 7
mov word [rbp - 0x68], si
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x70], 7
mov word [rsp + 0x58], si
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], 7
mov word [rbp - 0x48], si
lea r8d, [rsi + 0xa]
lea rdx, str.headerName
lea rcx, [rbp - 0x48]
call fcn.1400523d0
nop
mov ebx, 1
mov dword [rsp + 0x54], ebx
lea r8, [rbp - 0x68]
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x20]
call fcn.14008f6d0
test al, al
je 0x14008e7c5
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], si
lea r8d, [rsi + 0xb]
lea rdx, str.headerValue
lea rcx, [rsp + 0x78]
call fcn.1400523d0
nop
mov ebx, 3
mov dword [rsp + 0x54], ebx
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x20]
call fcn.14008f6d0
test al, al
je 0x14008e7c5
mov dil, 1
jmp 0x14008e7c8
xor dil, dil
test bl, 2
je 0x14008e825
and ebx, 0xfffffffd
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14008e814
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008e80f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008e80f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400e6a28
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], si
test bl, 1
je 0x14008e86d
mov rdx, qword [rbp - 0x30]
cmp rdx, 8
jb 0x14008e86d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008e868
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008e868
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400e6a28
test dil, dil
je 0x14008e8a6
lea r9, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae r9, qword [rsp + 0x58]
lea r8, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae r8, qword [rbp - 0x68]
lea rdx, [0x140271510]
mov rcx, r13
call qword [sym.imp.USER32.dll_wsprintfW]
mov sil, 1
jmp 0x14008e8e8
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008e8e5
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_find_auth_keys_in_response.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1a6
lea r9, str.D:BWA29B6E26C_BE36_0MobileMeServices_237_srcrootMobileMeServicesTrayIcon.cpp
lea r8, str.TrayIcon::GenerateAuthHeader
mov edx, 3
mov rcx, rax
call fcn.1400c23b0
xor sil, sil
mov rdx, qword [rsp + 0x70]
cmp rdx, 8
jb 0x14008e92d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008e928
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008e928
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400e6a28
xor eax, eax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], 7
mov word [rsp + 0x58], ax
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x14008ea38
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008e984
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008e984
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400e6a28
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x14008eb37
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008ea38
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_query_content_length_of_response.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1aa
jmp 0x14008ea1d
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008ea38
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_query_response_code.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1ad
jmp 0x14008ea1d
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008ea38
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_send_request_to_server.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1b0
lea r9, str.D:BWA29B6E26C_BE36_0MobileMeServices_237_srcrootMobileMeServicesTrayIcon.cpp
lea r8, str.TrayIcon::GenerateAuthHeader
mov edx, 3
mov rcx, rax
call fcn.1400c23b0
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x14008eb37
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008ea97
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_open_request_to_server.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1b4
lea r9, str.D:BWA29B6E26C_BE36_0MobileMeServices_237_srcrootMobileMeServicesTrayIcon.cpp
lea r8, str.TrayIcon::GenerateAuthHeader
mov edx, 3
mov rcx, rax
call fcn.1400c23b0
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x14008eb37
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008eaed
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_connect_to_server.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1b8
lea r9, str.D:BWA29B6E26C_BE36_0MobileMeServices_237_srcrootMobileMeServicesTrayIcon.cpp
lea r8, str.TrayIcon::GenerateAuthHeader
mov edx, 3
mov rcx, rax
call fcn.1400c23b0
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x14008eb37
call fcn.1400c1f80
cmp dword [rax + 0x78], 3
jl 0x14008eb37
call fcn.1400c1f80
lea rcx, str.ERROR:_Failed_to_open_connection_to_server.
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x1bc
lea r9, str.D:BWA29B6E26C_BE36_0MobileMeServices_237_srcrootMobileMeServicesTrayIcon.cpp
lea r8, str.TrayIcon::GenerateAuthHeader
mov edx, 3
mov rcx, rax
call fcn.1400c23b0
movzx eax, sil
mov rcx, qword [rbp + 0x1fe0]
xor rcx, rsp
call fcn.1400e6b50
mov rbx, qword [rsp + 0x2140]
add rsp, 0x20f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret