Function at 0x10001c40
Capabilities:
Check http status code
Connect to http server
Create http request
Print debug messages
Read data from internet
Receive data
Send data
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x1000ca79
mov eax, dword fs:[0]
push eax
mov eax, 0x32ec
call fcn.1000bcf0
mov eax, dword [0x1001201c]
xor eax, esp
mov dword [esp + 0x32e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1001201c]
xor eax, esp
push eax
lea eax, [esp + 0x3300]
mov dword fs:[0], eax
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.GetToken___n
call ebp
push 0
push 0
push 0
push 0
push str.Agent
mov byte [esp + 0x2b], 1
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp dword [0x10012478], 8
mov ebx, eax
mov eax, dword [0x10012464]
jae 0x10001cb9
mov eax, 0x10012464
push 0
push 0
push 3
push 0x1000d2dc
push 0x1000d2dc
push 0x1bb
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetConnectW]
push 0
push 0x803000
push 0
push 0x1000d2dc
push str.HTTP_1.0
push str._scp_v1_idmmgtsvc_token_grant_typeclient_credentials
push str.POST
push eax
mov dword [0x10012428], eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [esp + 0x20]
push ecx
push 0x1f
push eax
mov dword [0x1001242c], eax
mov dword [esp + 0x2c], 0xf180
call esi
mov edx, dword [0x1001242c]
push 4
push 0x10012034
push 6
push edx
call esi
mov eax, dword [0x1001242c]
push 4
push 0x10012034
push 8
push eax
call esi
mov ecx, dword [0x1001242c]
push 4
push 0x10012034
push 6
push ecx
call esi
mov edx, dword [0x1001242c]
push 4
push 0x10012034
push 2
push edx
call esi
mov eax, dword [0x1001242c]
push 4
push 0x10012034
push 5
push eax
call esi
mov ecx, dword [0x1001242c]
push 4
push 0x10012034
push 7
push ecx
call esi
mov edx, dword [0x1001242c]
push 4
push 0x10012034
push 5
push edx
call esi
xor eax, eax
push 0xffe
push eax
lea ecx, [esp + 0x306]
push ecx
mov word [esp + 0x308], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push str.Accept:_application_json_r_n
lea edx, [esp + 0x300]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push str.Content_Type:_application_x_www_form_urlencoded_r_n
lea eax, [esp + 0x300]
push eax
call esi
push str.Authorization:_Basic
lea ecx, [esp + 0x300]
push ecx
call esi
push str.RXBtQXRvQ2xpZW50OjFlNjE1NWRlLWVjMzktNDdkOC04YmE0LWUzYjE1Y2QyNmViZA
lea edx, [esp + 0x300]
push edx
call esi
push 0x1000d9a4
lea eax, [esp + 0x300]
push eax
call esi
push str.User_Agent:
lea ecx, [esp + 0x300]
push ecx
call esi
lea edi, [esp + 0x24]
call fcn.10001670
mov edi, 8
cmp dword [eax + 0x18], edi
jb 0x10001e36
mov eax, dword [eax + 4]
jmp 0x10001e39
add eax, 4
push eax
lea edx, [esp + 0x300]
push edx
call esi
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push 0x1000d9a4
lea eax, [esp + 0x300]
push eax
call esi
push str.Host:
lea ecx, [esp + 0x300]
push ecx
call esi
mov eax, dword [0x10012464]
cmp dword [0x10012478], edi
jae 0x10001e7e
mov eax, 0x10012464
push eax
lea edx, [esp + 0x300]
push edx
call esi
push 0x1000d9a4
lea eax, [esp + 0x300]
push eax
call esi
push str.Connection:_keep_alive_r_n
lea ecx, [esp + 0x300]
push ecx
call esi
push str.Request_:__n
call ebp
lea edx, [esp + 0x2fc]
push edx
call ebp
mov ecx, dword [0x1001242c]
push 0x20000000
push 0xffffffffffffffff
lea eax, [esp + 0x304]
push eax
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
mov edx, dword [0x1001242c]
xor esi, esi
push esi
push esi
push esi
push esi
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x100020b5
push 0x7ff
lea eax, [esp + 0x1301]
push esi
push eax
mov byte [esp + 0x1308], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0xffe
lea edx, [esp + 0x1b02]
xor ecx, ecx
push esi
push edx
mov word [esp + 0x1b08], cx
call sub.MSVCR90.dll_memset
mov edx, dword [0x1001242c]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x800
lea ecx, [esp + 0x1304]
push ecx
push edx
mov dword [esp + 0x28], esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x100020c9
mov edx, dword [0x1001242c]
push esi
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x104]
push ecx
push 0x13
push edx
mov dword [esp + 0x34], 0x200
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x10001f88
xor al, al
jmp 0x100020d2
lea eax, [esp + 0xfc]
push eax
call dword [sym.imp.MSVCR90.dll__wtoi]
add esp, 4
push str.Status_Code_:
lea ecx, [esp + 0x44]
mov edi, eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea ecx, [esp + 0xfc]
push ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x330c], esi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::append_wchar_t_const__]
cmp dword [esp + 0x58], 8
mov eax, dword [esp + 0x44]
jae 0x10001fd2
lea eax, [esp + 0x44]
push eax
call ebp
push 0x1000d760
call ebp
mov edx, dword [0x1001242c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call esi
mov eax, dword [0x10012428]
push eax
call esi
push ebx
call esi
cmp edi, 0xc8
jne 0x1000208f
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x1b00]
push ecx
push eax
lea edx, [esp + 0x1308]
push edx
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x1afc]
push eax
call ebp
lea ecx, [esp + 0x5c]
push ecx
call fcn.100050f0
lea edx, [esp + 0x5c]
push edx
lea ecx, [esp + 0x1b00]
mov byte [esp + 0x330c], 1
call fcn.10005260
lea eax, [esp + 0x5c]
push eax
lea edx, [esp + 0x2b00]
mov ecx, str.token
call fcn.100053b0
lea ecx, [esp + 0x2afc]
push ecx
mov ecx, 0x10012444
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
lea edx, [esp + 0x5c]
push edx
mov byte [esp + 0x330c], 0
call fcn.10005200
jmp 0x1000209e
lea eax, [esp + 0xfc]
push eax
call ebp
mov byte [esp + 0x17], 0
lea ecx, [esp + 0x40]
mov dword [esp + 0x3308], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x100020ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2ee2
jne 0x100020c9
push str.Timeout
call ebp
mov byte [esp + 0x17], 0
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x3300]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x32e8]
xor ecx, esp
call fcn.1000b132
add esp, 0x32f8
ret