Function at 0x10002b70
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 0x1000c9cd
mov eax, dword fs:[0]
push eax
mov eax, 0x3324
call fcn.1000bcf0
mov eax, dword [0x1001201c]
xor eax, esp
mov dword [esp + 0x3320], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1001201c]
xor eax, esp
push eax
lea eax, [esp + 0x3338]
mov dword fs:[0], eax
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.GetMessageForSerial___n
call ebx
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 ebp, 8
mov dword [esp + 0x1c], ecx
cmp dword [0x10012478], ebp
jae 0x10002bec
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_messages__deviceserialnumber__propertyNamedeviceSerialNumbermessageType_messageType_lang_language_code_country_country_code_
lea ecx, [esp + 0x28]
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 + 0x44]
mov dword [esp + 0x3344], 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 + 0x44]
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x3348], 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 0x10002c6c
mov ecx, dword [0x10012438]
mov edx, dword [esp + 0x54]
push ecx
push edx
push eax
lea ecx, [esp + 0x30]
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._messageType_
lea ecx, [esp + 0x44]
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 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
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 0x10002ca6
mov ecx, dword [esp + 0x54]
push 0x100124ec
push ecx
push eax
lea ecx, [esp + 0x30]
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__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov edx, dword [0x10012434]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
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 esi, [esp + 0x94]
call fcn.10002700
add esp, 0x1c
push str._language_code_
lea ecx, [esp + 0x44]
mov byte [esp + 0x3344], 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__::operator_wchar_t_const__]
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
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 0x10002d0b
mov edx, dword [esp + 0x54]
mov ecx, esi
push ecx
push edx
push eax
lea ecx, [esp + 0x30]
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__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
push str._country_code_
lea ecx, [esp + 0x44]
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 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
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 0x10002d4b
mov ecx, dword [0x10012430]
test ecx, ecx
je 0x10002d4b
push ecx
mov ecx, dword [esp + 0x58]
push ecx
push eax
lea ecx, [esp + 0x30]
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 ebx
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x3c], ebp
jae 0x10002d60
lea eax, [esp + 0x28]
push eax
call ebx
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x3c], ebp
jae 0x10002d71
lea eax, [esp + 0x28]
mov edx, dword [0x10012428]
push 0
push 0x803000
push 0
push 0x1000d2dc
push str.HTTP_1.0
push eax
push 0x1000d738
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [esp + 0x24]
push ecx
push 0x1f
push eax
mov dword [0x1001242c], eax
mov dword [esp + 0x30], 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 + 0x33e]
push ecx
mov word [esp + 0x340], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push str.Accept:_application_json_r_n
lea edx, [esp + 0x338]
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 + 0x338]
push eax
call esi
push str.Authorization:_Bearer
lea ecx, [esp + 0x338]
push ecx
call esi
mov eax, dword [0x10012448]
cmp dword [0x1001245c], ebp
jae 0x10002e31
mov eax, 0x10012448
push eax
lea edx, [esp + 0x338]
push edx
call esi
push 0x1000d9a4
lea eax, [esp + 0x338]
push eax
call esi
push str.User_Agent:
lea ecx, [esp + 0x338]
push ecx
call esi
lea edi, [esp + 0x5c]
call fcn.10001670
cmp dword [eax + 0x18], ebp
jb 0x10002e6d
mov eax, dword [eax + 4]
jmp 0x10002e70
add eax, 4
push eax
lea edx, [esp + 0x338]
push edx
call esi
lea ecx, [esp + 0x5c]
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 + 0x338]
push eax
call esi
push str.Host:
lea ecx, [esp + 0x338]
push ecx
call esi
mov eax, dword [0x10012464]
cmp dword [0x10012478], ebp
jae 0x10002eb5
mov eax, 0x10012464
push eax
lea edx, [esp + 0x338]
push edx
call esi
push 0x1000d9a4
lea eax, [esp + 0x338]
push eax
call esi
push str.Connection:_keep_alive_r_n
lea ecx, [esp + 0x338]
push ecx
call esi
push str.Request_:__n
call ebx
lea edx, [esp + 0x334]
push edx
call ebx
mov ecx, dword [0x1001242c]
push 0x20000000
push 0xffffffffffffffff
lea eax, [esp + 0x33c]
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 0x10003164
push 0x7ff
lea eax, [esp + 0x1339]
push 0
push eax
mov byte [esp + 0x1340], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
xor ecx, ecx
push 0xffe
push ecx
lea edx, [esp + 0x1b3e]
push edx
mov word [esp + 0x1b40], cx
call sub.MSVCR90.dll_memset
mov edx, dword [0x1001242c]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x800
lea ecx, [esp + 0x133c]
push ecx
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x10003164
mov edx, dword [0x1001242c]
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x13c]
push ecx
push 0x13
push edx
mov dword [esp + 0x28], 0x200
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x10003000
lea ecx, [esp + 0x78]
mov byte [esp + 0x3340], 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_]
lea ecx, [esp + 0x40]
mov byte [esp + 0x3340], 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 + 0x24]
mov dword [esp + 0x3340], 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 0x100031a1
lea eax, [esp + 0x134]
push eax
call dword [sym.imp.MSVCR90.dll__wtoi]
add esp, 4
lea ecx, [esp + 0x134]
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 + 0x60]
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 + 0x134]
push edx
lea ecx, [esp + 0x60]
mov byte [esp + 0x3344], 3
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 + 0x60]
cmp dword [esp + 0x74], ebp
jae 0x1000305d
lea eax, [esp + 0x60]
push eax
call ebx
push 0x1000d760
call ebx
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 0x10003144
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x1b38]
push ecx
push eax
lea edx, [esp + 0x1340]
push edx
push ebp
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x1000d764
call ebx
lea eax, [esp + 0x1b34]
push eax
call ebx
lea ecx, [esp + 0x94]
push ecx
call fcn.100050f0
lea edx, [esp + 0x94]
push edx
lea ecx, [esp + 0x1b38]
mov byte [esp + 0x3344], 4
call fcn.10005260
lea eax, [esp + 0x94]
push eax
lea edx, [esp + 0x2b38]
mov ecx, str.message
call fcn.100053b0
lea ecx, [esp + 0x2b34]
push ecx
mov ecx, 0x10012508
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 + 0x94]
push edx
mov bl, 1
mov byte [esp + 0x3344], 3
call fcn.10005200
lea ecx, [esp + 0x5c]
mov byte [esp + 0x3340], 2
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 0x10003166
lea eax, [esp + 0x134]
push eax
call ebx
lea ecx, [esp + 0x5c]
xor bl, bl
mov byte [esp + 0x3340], 2
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 0x10003166
xor bl, bl
lea ecx, [esp + 0x78]
mov byte [esp + 0x3340], 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_]
lea ecx, [esp + 0x40]
mov byte [esp + 0x3340], 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 + 0x24]
mov dword [esp + 0x3340], 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 + 0x3338]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3320]
xor ecx, esp
call fcn.1000b132
add esp, 0x3330
ret