Function at 0x10002100
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 0x1000ca31
mov eax, dword fs:[0]
push eax
mov eax, 0x430c
call fcn.1000bcf0
mov eax, dword [0x1001201c]
xor eax, esp
mov dword [esp + 0x4308], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1001201c]
xor eax, esp
push eax
lea eax, [esp + 0x4320]
mov dword fs:[0], eax
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._nGetTonerProviderInfo___n
call ebp
push 0
push 0
push 0
push 0
push str.Agent
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ecx, eax
mov eax, dword [0x10012464]
mov ebx, 8
mov dword [esp + 0x1c], ecx
cmp dword [0x10012478], ebx
jae 0x1000217c
mov eax, 0x10012464
push 0
push 0
push 3
push 0x1000d2dc
push 0x1000d2dc
push 0x1bb
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
push str._scp_v1_tonerprovidermgtsvc_devicetonerproviderinfos__deviceserialnumber__propertyNamedeviceSerialNumber
lea ecx, [esp + 0x2c]
mov dword [0x10012428], 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__]
push str._deviceserialnumber_
lea ecx, [esp + 0x64]
mov dword [esp + 0x432c], 0
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__]
push 0
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x4330], 1
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::find_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___unsigned_int_const]
cmp eax, 0xffffffff
jle 0x100021fc
mov ecx, dword [0x10012438]
mov edx, dword [esp + 0x74]
push ecx
push edx
push eax
lea ecx, [esp + 0x34]
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__::replace_unsigned_int__unsigned_int__wchar_t_const__]
push str.URL:
call ebp
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x40], ebx
jae 0x10002211
lea eax, [esp + 0x2c]
push eax
call ebp
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x40], ebx
jae 0x10002222
lea eax, [esp + 0x2c]
push 0
push 0x803000
push 0
push 0x1000d2dc
push str.HTTP_1.0
push eax
mov eax, dword [0x10012428]
push 0x1000d738
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [esp + 0x28]
push ecx
push 0x1f
push eax
mov dword [0x1001242c], eax
mov dword [esp + 0x34], 0xf180
call esi
mov edx, dword [0x1001242c]
push 4
push 0x10012034
push 6
push edx
call esi
xor eax, eax
push 0xffe
push eax
lea ecx, [esp + 0x326]
push ecx
mov word [esp + 0x328], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push str.Accept:_application_json_r_n
lea edx, [esp + 0x320]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push str.Content_Type:_application_json_r_n
lea eax, [esp + 0x320]
push eax
call esi
push str.Authorization:_Bearer
lea ecx, [esp + 0x320]
push ecx
call esi
mov eax, dword [0x10012448]
cmp dword [0x1001245c], ebx
jae 0x100022e1
mov eax, 0x10012448
push eax
lea edx, [esp + 0x320]
push edx
call esi
push 0x1000d9a4
lea eax, [esp + 0x320]
push eax
call esi
push str.User_Agent:
lea ecx, [esp + 0x320]
push ecx
call esi
lea edi, [esp + 0x44]
call fcn.10001670
cmp dword [eax + 0x18], ebx
jb 0x1000231d
mov eax, dword [eax + 4]
jmp 0x10002320
add eax, 4
push eax
lea edx, [esp + 0x320]
push edx
call esi
lea ecx, [esp + 0x44]
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 + 0x320]
push eax
call esi
push str.Host:
lea ecx, [esp + 0x320]
push ecx
call esi
mov eax, dword [0x10012464]
cmp dword [0x10012478], ebx
jae 0x10002365
mov eax, 0x10012464
push eax
lea edx, [esp + 0x320]
push edx
call esi
push 0x1000d9a4
lea eax, [esp + 0x320]
push eax
call esi
push str.Connection:_keep_alive_r_n
lea ecx, [esp + 0x320]
push ecx
call esi
push str.Request_:__n
call ebp
lea edx, [esp + 0x31c]
push edx
call ebp
mov ecx, dword [0x1001242c]
push 0x20000000
push 0xffffffffffffffff
lea eax, [esp + 0x324]
push eax
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
mov edx, dword [0x1001242c]
push 0
push 0
push 0
push 0
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x100026a6
push 0x7ff
lea eax, [esp + 0x2b21]
push 0
push eax
mov byte [esp + 0x2b28], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
xor ecx, ecx
push 0xffe
push ecx
lea edx, [esp + 0x3326]
push edx
mov word [esp + 0x3328], cx
call sub.MSVCR90.dll_memset
mov edx, dword [0x1001242c]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x800
lea ecx, [esp + 0x2b24]
push ecx
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x100026a6
mov edx, dword [0x1001242c]
push 0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x124]
push ecx
push 0x13
push edx
mov dword [esp + 0x34], 0x200
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x1000249d
lea ecx, [esp + 0x60]
mov byte [esp + 0x4328], al
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_]
lea ecx, [esp + 0x28]
mov dword [esp + 0x4328], 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_]
xor al, al
jmp 0x100026d1
lea eax, [esp + 0x11c]
push eax
call dword [sym.imp.MSVCR90.dll__wtoi]
add esp, 4
lea ecx, [esp + 0x11c]
push ecx
mov ecx, 0x10012498
mov edi, eax
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__]
push str.Status_Code_:
lea ecx, [esp + 0x48]
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 edx, [esp + 0x11c]
push edx
lea ecx, [esp + 0x48]
mov byte [esp + 0x432c], 2
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__]
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x5c], ebx
jae 0x100024fa
lea eax, [esp + 0x48]
push eax
call ebp
push 0x1000d760
call ebp
mov eax, dword [0x1001242c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push eax
call esi
mov ecx, dword [0x10012428]
push ecx
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
cmp edi, 0xc8
jne 0x10002686
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x3320]
push ecx
push eax
lea edx, [esp + 0x2b28]
push edx
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x1000d764
call ebp
lea eax, [esp + 0x331c]
push eax
call ebp
lea ecx, [esp + 0x7c]
push ecx
call fcn.100050f0
lea edx, [esp + 0x7c]
push edx
lea ecx, [esp + 0x3320]
mov byte [esp + 0x432c], 3
call fcn.10005260
xor eax, eax
push 0x7fe
push eax
lea ecx, [esp + 0x2326]
push ecx
mov word [esp + 0x2328], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
push 0x7fe
push edx
lea eax, [esp + 0x1326]
push eax
mov word [esp + 0x1328], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [esp + 0x1b26]
push edx
mov word [esp + 0x1b28], cx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [esp + 0x7c]
push eax
lea edx, [esp + 0x2320]
mov ecx, str.state
call fcn.100053b0
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x1320]
mov ecx, str.connectedState
call fcn.100053b0
lea edx, [esp + 0x7c]
push edx
lea edx, [esp + 0x1b20]
mov ecx, str.messageType
call fcn.100053b0
lea eax, [esp + 0x231c]
push eax
mov ecx, 0x100124b4
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 ecx, [esp + 0x131c]
push ecx
mov ecx, 0x100124d0
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 + 0x1b1c]
push edx
mov ecx, 0x100124ec
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 eax, [esp + 0x7c]
push eax
mov bl, 1
mov byte [esp + 0x432c], 2
call fcn.10005200
mov byte [esp + 0x4328], bl
lea ecx, [esp + 0x44]
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 0x100026a8
lea ecx, [esp + 0x11c]
push ecx
call ebp
lea ecx, [esp + 0x44]
xor bl, bl
mov byte [esp + 0x4328], 1
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 0x100026a8
xor bl, bl
lea ecx, [esp + 0x60]
mov byte [esp + 0x4328], 0
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_]
lea ecx, [esp + 0x28]
mov dword [esp + 0x4328], 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_]
mov al, bl
mov ecx, dword [esp + 0x4320]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4308]
xor ecx, esp
call fcn.1000b132
add esp, 0x4318
ret