Function at 0x414030
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:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4448ae
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2aac
call fcn.004409c0
mov eax, dword [0x469034]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2a48], edx
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x2a34], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2a40], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2a30], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x2a4c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x2a44], esi
mov dword [ebp - 0x2a50], eax
xor ebx, ebx
lea ecx, [ebp - 0x2a2c]
mov dword [ebp - 4], ebx
call fcn.00401585
mov edx, esi
lea ecx, [ebp - 0x534]
call fcn.0040fb3a
mov edi, eax
cmp dword [edi + 0x14], 8
jb 0x4140c9
mov edi, dword [edi]
lea ecx, [ebp - 0x2a2c]
call fcn.00401d18
push edi
lea ecx, [ebp - 0x2a2c]
call fcn.004017a7
push ebx
push 1
lea ecx, [ebp - 0x534]
mov dword [ebp - 0x2a3c], eax
call fcn.0040253d
push ebx
push ebx
push ebx
push ebx
push 0x44a260
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [ebp - 0x2a60], edi
mov byte [ebp - 4], 1
test edi, edi
jne 0x41418c
mov ebx, dword [ebp - 0x2a34]
cmp dword [ebx + 0x14], 0x10
jb 0x414121
mov ebx, dword [ebx]
cmp dword [esi + 0x14], 0x10
jb 0x414129
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push esi
push dword [ebp - 0x2a48]
lea eax, [ebp - 0x564]
push str.InternetOpen_failed_for__s_http:___s_s__Error_Code:__d
push eax
call fcn.0040fd09
add esp, 0x18
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0x10
jb 0x414158
mov eax, dword [eax]
mov dword [ebp - 0x2a38], eax
lea eax, [ebp - 0x2a38]
push eax
lea ecx, [ebp - 0x2a70]
call dword [sym.imp.MSVCR110.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::runtime_error.0
push 0x45bfd4
lea eax, [ebp - 0x2a70]
push eax
call sub.MSVCR110.dll__CxxThrowException
mov dword [ebp - 0x2a54], ebx
mov byte [ebp - 4], 3
cmp dword [ebp - 0x2a3c], 0
je 0x4141d0
push ebx
push ebx
push 3
push ebx
push ebx
push dword [ebp - 0x5e0]
lea eax, [ebp - 0x29ea]
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
push ebx
mov dword [ebp - 0x2a38], ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x2a54], ebx
jmp 0x41421a
mov edx, esi
lea ecx, [ebp - 0x534]
call fcn.0040fb3a
cmp dword [eax + 0x14], 8
jb 0x4141e5
mov eax, dword [eax]
push 1
push ebx
push 3
push ebx
push ebx
push 0x50
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
push ebx
mov dword [ebp - 0x2a38], ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0
push 1
lea ecx, [ebp - 0x534]
mov dword [ebp - 0x2a54], ebx
call fcn.0040253d
push 0x50
pop eax
test ebx, ebx
jne 0x4142ad
cmp dword [ebp - 0x2a3c], ebx
je 0x414234
movzx eax, word [ebp - 0x5e0]
mov ebx, dword [ebp - 0x2a34]
cmp dword [ebx + 0x14], 0x10
jb 0x414242
mov ebx, dword [ebx]
cmp dword [esi + 0x14], 0x10
jb 0x41424a
mov esi, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push esi
push dword [ebp - 0x2a48]
lea eax, [ebp - 0x564]
push str.InternetConnect_failed_for__s_http:___s_s__Error_Code:__d__Port_Number:__d
push eax
call fcn.0040fd09
add esp, 0x1c
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x41427a
mov eax, dword [eax]
mov dword [ebp - 0x2a38], eax
lea eax, [ebp - 0x2a38]
push eax
lea ecx, [ebp - 0x2a94]
call dword [sym.imp.MSVCR110.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::runtime_error.0
push 0x45bfd4
lea eax, [ebp - 0x2a94]
jmp 0x414186
push dword [ebp - 0x2a48]
lea ecx, [ebp - 0x58c]
call fcn.0040221e
mov edx, dword [ebp - 0x2a34]
lea ecx, [ebp - 0x5a4]
mov byte [ebp - 4], 5
call fcn.0040fb3a
mov esi, eax
lea edx, [ebp - 0x58c]
lea ecx, [ebp - 0x5bc]
mov byte [ebp - 4], 6
call fcn.0040fb3a
cmp dword [esi + 0x14], 8
jb 0x4142f2
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x4142fa
mov eax, dword [eax]
push 1
push 0x20400010
push 0
push 0
push 0
push esi
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x2a64], esi
push 0
push 1
lea ecx, [ebp - 0x5bc]
call fcn.0040253d
push 0
push 1
lea ecx, [ebp - 0x5a4]
call fcn.0040253d
lea ecx, [ebp - 0x58c]
mov byte [ebp - 4], 9
call fcn.00402286
test esi, esi
jne 0x4143c7
mov ebx, dword [ebp - 0x2a34]
cmp dword [ebx + 0x14], 0x10
jb 0x414357
mov ebx, dword [ebx]
mov esi, dword [ebp - 0x2a44]
cmp dword [esi + 0x14], 0x10
jb 0x414365
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push esi
push dword [ebp - 0x2a48]
lea eax, [ebp - 0x564]
push str.HttpOpenRequest_failed_for__s_http:___s_s__Error_Code:__d
push eax
call fcn.0040fd09
add esp, 0x18
mov byte [ebp - 4], 0xa
cmp dword [eax + 0x14], 0x10
jb 0x414394
mov eax, dword [eax]
mov dword [ebp - 0x2a44], eax
lea eax, [ebp - 0x2a44]
push eax
lea ecx, [ebp - 0x2aac]
call dword [sym.imp.MSVCR110.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::runtime_error.0
push 0x45bfd4
lea eax, [ebp - 0x2aac]
jmp 0x414186
mov eax, dword [ebp - 0x2a30]
test eax, eax
je 0x41446a
push eax
lea eax, [ebp - 0x54c]
push str.Content_Type:__s_r_n
push eax
call fcn.0040fd09
add esp, 0xc
push str.HttpAddRequestHeaders_failed
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 0xb
call fcn.0040221e
lea edx, [ebp - 0x54c]
lea ecx, [ebp - 0x564]
mov byte [ebp - 4], 0xc
call fcn.0040fb3a
mov byte [ebp - 4], 0xd
cmp dword [eax + 0x14], 8
jb 0x41441f
mov eax, dword [eax]
push 0x20000000
push dword [ebp - 0x53c]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
jne 0x414441
lea ecx, [ebp - 0x534]
call fcn.00433a4b
push 0
push 1
lea ecx, [ebp - 0x564]
call fcn.0040253d
lea ecx, [ebp - 0x534]
call fcn.00402286
lea ecx, [ebp - 0x54c]
mov byte [ebp - 4], 9
call fcn.00402286
mov ecx, dword [ebp - 0x2a40]
lea eax, [ebp - 0x564]
push eax
call dword [sym.imp.MSVCP110.dll_public:_class_std::fpos_int____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
mov ecx, dword [eax + 8]
add ecx, dword [eax]
push 2
push 0
mov dword [ebp - 0x2a30], ecx
mov ecx, dword [ebp - 0x2a40]
push 0
call dword [sym.imp.MSVCP110.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
mov ecx, dword [ebp - 0x2a40]
lea eax, [ebp - 0x564]
push eax
call dword [sym.imp.MSVCP110.dll_public:_class_std::fpos_int____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
mov ecx, dword [eax + 8]
add ecx, dword [eax]
xor eax, eax
sub ecx, dword [ebp - 0x2a30]
push eax
push eax
mov dword [ebp - 0x2a34], ecx
mov ecx, dword [ebp - 0x2a40]
push eax
call dword [sym.imp.MSVCP110.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
mov eax, dword [ebp - 0x2a34]
test eax, eax
jne 0x41451d
push str.HttpSendRequest_failed
lea ecx, [ebp - 0x534]
call fcn.0040221e
xor eax, eax
push eax
push eax
push eax
push eax
push esi
mov byte [ebp - 4], 0xe
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x414509
lea ecx, [ebp - 0x534]
call fcn.00433a4b
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 9
call fcn.00402286
jmp 0x41469e
push eax
call dword [sym.imp.MSVCR110.dll_malloc]
mov ebx, eax
pop ecx
mov dword [ebp - 0x2a3c], ebx
mov ecx, dword [ebp - 0x2a40]
push 0
push dword [ebp - 0x2a34]
mov byte [ebp - 4], 0xf
push ebx
call dword [sym.imp.MSVCP110.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___long_long___int64__]
push 0xa
pop ecx
xor eax, eax
lea edi, [ebp - 0x574]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x2a34]
xor edi, edi
push edi
push edi
mov dword [ebp - 0x558], eax
push edi
lea eax, [ebp - 0x574]
push eax
push esi
mov dword [ebp - 0x574], 0x28
call dword [sym.imp.WININET.dll_HttpSendRequestExW]
test eax, eax
jne 0x4145b7
lea eax, [ebp - 0x2a30]
push eax
lea ecx, [ebp - 0x2a88]
mov dword [ebp - 0x2a30], str.HttpSendRequestEx_failed
call dword [sym.imp.MSVCR110.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::runtime_error.0
push 0x45bfd4
lea eax, [ebp - 0x2a88]
jmp 0x414186
push str.InternetWriteFile_failed
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 0x10
call fcn.0040221e
lea eax, [ebp - 0x2a30]
push eax
push dword [ebp - 0x2a34]
mov byte [ebp - 4], 0x11
push ebx
push esi
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x4145f3
lea ecx, [ebp - 0x534]
call fcn.00433a4b
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 0x10
call fcn.00402286
mov eax, dword [ebp - 0x2a34]
cmp dword [ebp - 0x2a30], eax
je 0x414647
lea eax, [ebp - 0x2a44]
push eax
lea ecx, [ebp - 0x2a7c]
mov dword [ebp - 0x2a44], str.Failed_to_upload_content
call dword [sym.imp.MSVCR110.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::runtime_error.0
push 0x45bfd4
lea eax, [ebp - 0x2a7c]
jmp 0x414186
push str.HttpEndRequest_failed
lea ecx, [ebp - 0x534]
mov dword [ebp - 4], 0xf
call fcn.0040221e
push edi
push edi
push edi
push esi
mov byte [ebp - 4], 0x13
call dword [sym.imp.WININET.dll_HttpEndRequestW]
test eax, eax
jne 0x41467b
lea ecx, [ebp - 0x534]
call fcn.00433a4b
lea ecx, [ebp - 0x534]
call fcn.00402286
push ebx
mov byte [ebp - 4], 9
call dword [sym.imp.MSVCR110.dll_free]
mov ebx, dword [ebp - 0x2a38]
mov edi, dword [ebp - 0x2a60]
pop ecx
push str.HttpQueryInfo_HTTP_QUERY_STATUS_CODE_failed
lea ecx, [ebp - 0x534]
mov dword [ebp - 0x2a30], 4
call fcn.0040221e
push 0
lea eax, [ebp - 0x2a30]
push eax
lea eax, [ebp - 0x2a58]
push eax
push 0x20000013
push esi
mov byte [ebp - 4], 0x14
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4146e7
lea ecx, [ebp - 0x534]
call fcn.00433a4b
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 9
call fcn.00402286
and dword [ebp - 0x2a5c], 0
push 0
lea eax, [ebp - 0x2a30]
push eax
lea eax, [ebp - 0x2a5c]
push eax
push 0x20000005
push esi
mov dword [ebp - 0x2a30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0
lea eax, [ebp - 0x2a30]
push eax
lea eax, [ebp - 0x11c]
push eax
push 0x36
push esi
mov dword [ebp - 0x2a30], 0x100
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x41479e
lea eax, [ebp - 0x11c]
push eax
call fcn.004010d9
pop ecx
mov ecx, dword [ebp - 0x2a4c]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004029ec
mov ecx, dword [ebp - 0x2a4c]
mov eax, dword [ecx + 0x10]
add eax, 0xfffffffe
push eax
push 1
lea eax, [ebp - 0x564]
push eax
call fcn.004100a9
mov ecx, dword [ebp - 0x2a4c]
push eax
call fcn.0040224d
lea ecx, [ebp - 0x564]
call fcn.00402286
jmp 0x4147b3
mov eax, dword [ebp - 0x2a4c]
and dword [eax + 0x10], 0
cmp dword [eax + 0x14], 0x10
jb 0x4147b0
mov eax, dword [eax]
mov byte [eax], 0
push 0
push 0
lea eax, [ebp - 0x2a38]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
neg eax
sbb eax, eax
and dword [ebp - 0x2a38], eax
je 0x414855
push str.InternetReadFile_failed
lea ecx, [ebp - 0x534]
call fcn.0040221e
lea eax, [ebp - 0x2a3c]
push eax
push 0x400
lea eax, [ebp - 0x51c]
push eax
push esi
mov byte [ebp - 4], 0x15
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x414812
lea ecx, [ebp - 0x534]
call fcn.00433a4b
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 9
call fcn.00402286
mov ecx, dword [ebp - 0x2a50]
push 0
push dword [ebp - 0x2a3c]
lea eax, [ebp - 0x51c]
push eax
call dword [sym.imp.MSVCP110.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
push dword [ebp - 0x2a5c]
lea ecx, [ebp + 0x24]
push dword [ebp - 0x2a3c]
call fcn.00415ff7
jmp 0x4147b3
cmp dword [ebp - 0x2a58], 0xc8
je 0x41494a
push 0
lea eax, [ebp - 0x2a50]
push eax
lea eax, [ebp - 0x51c]
push eax
push 0x14
push esi
mov dword [ebp - 0x2a50], 0x200
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x414910
and dword [ebp - 0x53c], 0
xor eax, eax
mov word [ebp - 0x54c], ax
lea eax, [ebp - 0x51c]
push eax
lea ecx, [ebp - 0x54c]
mov dword [ebp - 0x538], 7
call fcn.0040caa4
lea edx, [ebp - 0x54c]
lea ecx, [ebp - 0x564]
mov byte [ebp - 4], 0x16
call fcn.0040fac2
mov byte [ebp - 4], 0x17
cmp dword [eax + 0x14], 0x10
jb 0x4148dd
mov eax, dword [eax]
mov dword [ebp - 0x2a30], eax
lea eax, [ebp - 0x2a30]
push eax
lea ecx, [ebp - 0x2aa0]
call dword [sym.imp.MSVCR110.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::runtime_error.0
push 0x45bfd4
lea eax, [ebp - 0x2aa0]
jmp 0x414186
push dword [ebp - 0x2a58]
lea eax, [ebp - 0x564]
push str.statusCode___d
push eax
call fcn.0040fd09
add esp, 0xc
push eax
lea ecx, [ebp - 0x2ab8]
mov byte [ebp - 4], 0x18
call fcn.00420810
push 0x45bfd4
lea eax, [ebp - 0x2ab8]
jmp 0x414186
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
push edi
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x24]
call fcn.0040c7f6
mov eax, 0xc8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0043d698
leave
ret