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

Disassembly:
sub esp, 0xa08
mov eax, dword [esp + 0xa2c]
mov ecx, dword [esp + 0xa30]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xa2c]
mov dword [eax], 0
mov dword [ecx], 0
mov ecx, dword [esp + 0xa28]
mov dword [edi], 0
call fcn.00405170
push 0x4000000
push 0
push 0
push 0
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1__.NET_CLR_2.0.50727__
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
test esi, esi
mov dword [esp + 0x20], esi
jne 0x404388
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa08
ret
mov edx, dword [esp + 0xa1c]
mov eax, dword [edx + 4]
test eax, eax
jne 0x40439b
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 ecx, dword [esp + 0xa20]
push 1
push 0
push 3
push 0
push 0
push ecx
push eax
push esi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x1c], ebx
jne 0x4043d3
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa08
ret
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionA]
lea edx, [esp + 0xa44]
push 4
push edx
push 2
push ebx
call esi
lea eax, [esp + 0xa48]
push 4
push eax
push 5
push ebx
call esi
lea ecx, [esp + 0xa4c]
push 4
push ecx
push 6
push ebx
call esi
mov ebp, dword [esp + 0xa34]
mov ecx, 0x413a50
test ebp, ebp
jne 0x40441b
mov ecx, 0x413a4c
mov edx, dword [esp + 0xa24]
mov eax, dword [edx + 4]
test eax, eax
jne 0x40442e
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 1
push 0x4000000
push 0
push 0
push str.HTTP_1.0
push eax
push ecx
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
test esi, esi
jne 0x40446a
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa08
ret
mov ecx, dword [esp + 0xa30]
push ebp
push ecx
push 0
push 0
push esi
mov dword [esp + 0x2c], 0
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x4046f6
mov ebp, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
mov ebx, 0x1f4
push 0x13
push esi
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], ebx
call ebp
test eax, eax
je 0x4046f2
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [esp + 0xa3c]
add esp, 4
lea edx, [esp + 0x14]
mov byte [esp + 0x24], 0
mov dword [ecx], eax
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
push 1
push esi
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], ebx
call ebp
test eax, eax
je 0x404560
lea edx, [esp + 0x24]
push str.text
push edx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x40452f
lea eax, [esp + 0x24]
push str.html
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x40453c
mov ecx, dword [esp + 0xa3c]
mov dword [ecx], 1
lea edx, [esp + 0x24]
push str.utf_8
push edx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x404560
mov eax, dword [esp + 0xa40]
mov dword [eax], 1
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
push 0x2b
push esi
mov byte [esp + 0x38], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], ebx
call ebp
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
push 5
push esi
mov byte [esp + 0x38], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], ebx
call ebp
test eax, eax
je 0x404666
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
mov ebx, eax
add esp, 4
test ebx, ebx
jbe 0x4046f2
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebp, dword [sym.imp.WININET.dll_InternetReadFile]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x21c]
push 0x800
push eax
push esi
call ebp
test eax, eax
je 0x404639
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404639
cmp dword [edi], ebx
jae 0x404639
mov ecx, dword [esp + 0xa28]
test ecx, ecx
je 0x404639
lea edx, [esp + 0x218]
push eax
push edx
call fcn.004050e0
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
add ecx, eax
lea edx, [esp + 0x218]
mov dword [edi], ecx
lea ecx, [esp + 0x10]
push ecx
push 0x800
push edx
push esi
call ebp
test eax, eax
jne 0x4045f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4046ea
mov edi, dword [edi]
test edi, edi
je 0x4046ea
cmp edi, ebx
jne 0x4046ea
mov dword [esp + 0x18], 1
jmp 0x4046f2
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebp, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x21c]
push 0x800
push ecx
push esi
call ebp
test eax, eax
je 0x4046d1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4046d1
mov ecx, dword [esp + 0xa28]
test ecx, ecx
je 0x4046d1
lea edx, [esp + 0x218]
push eax
push edx
call fcn.004050e0
mov eax, dword [esp + 0x10]
mov ebx, dword [edi]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x218]
push ecx
push 0x800
add ebx, eax
push edx
push esi
mov dword [edi], ebx
call ebp
test eax, eax
jne 0x40468d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4046ea
cmp dword [edi], 0
je 0x4046ea
mov dword [esp + 0x18], 1
jmp 0x4046f2
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x1c]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa08
ret