Function at 0x406040
Capabilities:
Connect to http server
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push 0xffffffffffffffff
push 0x407b29
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x2c], 0
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x20]
mov dword [esp + 0x428], 2
mov byte [esp + 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x459f48
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x428], 3
mov ebx, ecx
lea ecx, [esp + 0x20]
push ebx
mov dword [esp + 0x20], 0x4082c0
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4060de
mov edi, dword [esp + 0x20]
mov ecx, ebx
mov edx, ecx
mov esi, 0x459f48
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea eax, [esp + 0x430]
mov ecx, ebp
push eax
mov byte [esp + 0x428], 4
mov word [ebp + 0x58], 0
call fcn.00405b50
test eax, eax
jne 0x406150
mov ebx, dword [esp + 0x42c]
mov cl, byte [esp + 0x13]
push eax
lea esi, [ebx + 4]
mov byte [esi], cl
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x459f48
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx], 0x4082c0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x424], 5
push ecx
push 0x459f48
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov dword [esp + 0x2c], 1
jmp 0x4063ce
mov eax, dword [ebp + 0x20]
mov edi, 0x84000200
test eax, eax
jne 0x406161
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push str.https:__
push eax
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x406179
mov edi, 0x84800200
mov eax, dword [ebp + 0x34]
test eax, eax
jne 0x406185
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov dx, word [ebp + 0x58]
push 0
push 0x4400000
push 3
push 0
push 0
push edx
push eax
mov eax, dword [ebp + 0x5c]
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
test eax, eax
mov dword [ebp + 0x60], eax
je 0x406349
mov edx, dword [esp + 0x44c]
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test edx, edx
jne 0x4061c0
mov edx, esi
mov ecx, dword [ebp + 0x48]
test ecx, ecx
jne 0x4061c9
mov ecx, esi
mov esi, dword [ebp + 0x54]
push 0
push edi
push esi
push edx
push 0
push ecx
push 0x40a1d4
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
test eax, eax
mov dword [ebp + 0x64], eax
je 0x406338
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x406327
lea ecx, [esp + 0x30]
push ecx
mov ecx, ebp
call fcn.00405ff0
test eax, eax
je 0x406327
mov eax, dword [esp + 0x30]
cmp eax, 0x190
jae 0x406327
cmp eax, 0xc8
jne 0x406327
mov ecx, 0xf9
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x64]
lea edx, [esp + 0x14]
stosw word es:[edi], ax
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x38]
push 0x3e8
push eax
push ecx
mov dword [esp + 0x24], 0x3e8
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x406327
mov eax, dword [esp + 0x14]
test eax, eax
je 0x406327
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
repne scasb al, byte es:[edi]
mov eax, dword [edx]
mov edx, dword [esp + 0x24]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x4062a2
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x4062e9
mov ecx, dword [esp + 0x24]
push 0
lea ebx, [ecx + esi]
lea ecx, [esp + 0x20]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4062e9
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, esi
lea esi, [esp + 0x34]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebx
mov byte [eax + ebx], 0
mov ecx, 0xf9
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x34]
stosb byte es:[edi], al
mov eax, dword [ebp + 0x64]
push ecx
push 0x3e8
push edx
push eax
mov dword [esp + 0x24], 0x3e8
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40626e
mov ecx, dword [ebp + 0x64]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp + 0x64], 0
mov edx, dword [ebp + 0x60]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp + 0x60], 0
mov ebx, dword [esp + 0x42c]
mov al, byte [esp + 0x13]
push 0
lea edi, [ebx + 4]
mov ecx, edi
mov byte [edi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0x24]
mov dword [ebx], 0x4082c0
mov ecx, dword [edi + 8]
mov byte [esp + 0x424], 6
cmp eax, ecx
ja 0x406390
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, edi
push edx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::erase_unsigned_int__unsigned_int_]
jmp 0x40639d
sub eax, ecx
push 0
push eax
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_unsigned_int__char_]
mov esi, dword [esp + 0x20]
mov ecx, dword [ebx + 0xc]
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test esi, esi
jne 0x4063af
mov esi, eax
mov edi, dword [edi + 4]
test edi, edi
jne 0x4063b8
mov edi, eax
mov eax, ecx
mov dword [esp + 0x2c], 1
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
mov byte [esp + 0x424], 2
call fcn.00402ea0
lea ecx, [esp + 0x430]
mov byte [esp + 0x424], 1
call fcn.00402ea0
lea ecx, [esp + 0x444]
mov byte [esp + 0x424], 0
call fcn.00402ea0
mov ecx, dword [esp + 0x41c]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x418
ret 0x2c