Function at 0x40a470
Capabilities:
Check http status code
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x420670
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c8
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor ebx, ebx
lea ecx, [ebp - 0x48]
push ebx
mov dword [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile_1
push 0x42d3f8
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_3
push 0x42d3f8
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString_3
push 0x42d3f8
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], ebx
call sub.MFC42.DLL_CString::CString_3
push 0x42d3f8
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString_3
lea eax, [ebp + 0xc]
lea ecx, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x34]
lea edx, [ebp - 0x18]
push ecx
lea eax, [ebp - 0x14]
push edx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push eax
push ecx
push edx
mov byte [ebp - 4], 7
call sub.MFC42.DLL_AfxParseURL
test eax, eax
jne 0x40a5e5
lea eax, [ebp + 8]
lea ecx, [ebp - 0x28]
push eax
push str.http:__
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::operator_2
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x2c]
push ecx
push edx
push eax
call sub.MFC42.DLL_AfxParseURL
test eax, eax
jne 0x40a5e5
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff9c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x1c]
push ebx
push 0x1021
push ecx
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x40a673
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff9b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0x10]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, eax
cmp ecx, ebx
mov dword [ebp - 0x50], ecx
jne 0x40a707
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff9a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
push ebx
push ebx
cmp dword [eax - 8], ebx
je 0x40a72e
mov edx, dword [ebp - 0x2c]
push edx
mov edx, dword [ebp - 0x20]
push edx
mov edx, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x34]
push eax
push edx
push ecx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x28], eax
jmp 0x40a746
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push edx
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x28], eax
cmp eax, ebx
jne 0x40a7c2
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff99
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x18]
push ebx
lea ecx, [ebp - 0x58]
push 0x84400000
push ecx
push ebx
push ebx
push edx
push ebx
push eax
mov dword [ebp - 0x58], 0x42b998
mov dword [ebp - 0x54], ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
cmp esi, ebx
jne 0x40a862
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff98
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, ebx
jne 0x40a8ef
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff97
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
push ebx
lea ecx, [ebp - 0xa0]
push eax
push ecx
push 0x13
push esi
mov dword [ebp - 0x38], 0x20
call edi
test eax, eax
jne 0x40a983
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff96
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0xa0]
push edx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
cmp eax, 0x197
je 0x40ac64
cmp eax, 0x191
je 0x40ac64
cmp eax, 0xc8
je 0x40aa28
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff95
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
push ebx
lea ecx, [ebp - 0x80]
push eax
push ecx
push 5
push esi
mov dword [ebp - 0x38], 0x20
call edi
test eax, eax
je 0x40aa4e
lea edx, [ebp - 0x80]
push edx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [ebp - 0x30], ebx
xor edi, edi
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x4d4]
push eax
mov eax, 0x400
push eax
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40aae7
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffff94
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x30], ebx
je 0x40ab24
lea ecx, [ebp - 0x60]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x4d4]
push edx
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CFile::Write
mov dword [ebp - 4], 7
call sub.MFC42.DLL_AfxTryCleanup
mov eax, dword [ebp - 0x30]
add edi, eax
cmp eax, ebx
jne 0x40aa53
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::Close
cmp esi, ebx
je 0x40abd5
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x40abdb
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x40abe5
push eax
call esi
mov eax, dword [ebp - 0x50]
cmp eax, ebx
je 0x40abef
push eax
call esi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x4c]
lea edx, [ebp - 0xd4]
push ecx
push 0x32
push edx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebp - 0x4c], ebx
jne 0x40ac64
jmp 0x40a868