Function at 0x40ea50
Capabilities:
Check http status code
Connect to http server
Create http request
Delete file
Read data from internet
Receive data
Send data
Send http request
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422978
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4b8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], esi
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0x10]
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esi + 0x1c8], eax
jne 0x40eab6
push ebx
push 0xcf
mov ecx, esi
call fcn.0040f140
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x1d4], ebx
je 0x40eace
mov eax, dword [esi + 0x20]
push ebx
push ebx
push 0x8001
push eax
jmp 0x40f064
push 0x40f220
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
cmp eax, 0xffffffff
jne 0x40eafd
push ebx
push 0xcf
mov ecx, esi
call fcn.0040f140
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x1d4], ebx
je 0x40eb15
mov ecx, dword [esi + 0x20]
push ebx
push ebx
push 0x8001
push ecx
jmp 0x40f064
mov eax, dword [esi + 0x68]
cmp dword [eax - 8], ebx
je 0x40eb43
mov edi, dword [esi + 0x1c4]
mov ecx, dword [esi + 0x6c]
mov edx, dword [esi + 0x1b4]
push esi
push ebx
push edi
push ecx
mov ecx, dword [esi + 0x1c8]
push eax
mov ax, word [esi + 0x1c0]
push eax
push edx
push ecx
jmp 0x40eb64
mov edx, dword [esi + 0x1c4]
mov cx, word [esi + 0x1c0]
mov eax, dword [esi + 0x1b4]
push esi
push ebx
push edx
mov edx, dword [esi + 0x1c8]
push ebx
push ebx
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ecx, eax
mov dword [esi + 0x1cc], eax
cmp ecx, ebx
jne 0x40eb94
push ebx
push 0xd0
mov ecx, esi
call fcn.0040f140
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x1d4], ebx
je 0x40ebac
mov eax, dword [esi + 0x20]
push ebx
push ebx
push 0x8001
push eax
jmp 0x40f064
mov eax, dword [esi + 0x1b8]
push esi
lea edx, [ebp - 0x44]
push 0x84400000
push edx
push ebx
push ebx
push eax
push ebx
push ecx
mov dword [ebp - 0x44], 0x42f190
mov dword [ebp - 0x40], ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [esi + 0x1d0], eax
jne 0x40ebf9
push ebx
push 0xd0
mov ecx, esi
call fcn.0040f140
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 [esi + 0x1d4]
push ebx
cmp ecx, ebx
push ebx
je 0x40ec13
mov eax, dword [esi + 0x20]
push 0x8001
push eax
jmp 0x40f064
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, ebx
je 0x40eccc
mov edi, dword [sym.imp.WININET.dll_InternetErrorDlg]
mov eax, dword [esi + 0x1d0]
lea ecx, [ebp - 0x24]
push ebx
lea edx, [ebp - 0x70]
push ecx
push edx
push 0x13
push eax
mov dword [ebp - 0x24], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40ecea
lea ecx, [ebp - 0x70]
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
cmp eax, 0x197
je 0x40ec70
cmp eax, 0x191
jne 0x40ed07
mov ecx, dword [esi + 0x1d0]
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0xc4]
push 0x32
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebp - 0x20], ebx
jne 0x40ec70
cmp esi, ebx
jne 0x40ec97
xor eax, eax
jmp 0x40ec9a
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x1d0]
push ebx
push 7
push 0x2eee
push edx
push eax
call edi
cmp eax, 0x2f00
jne 0x40ed2c
mov eax, dword [esi + 0x1d0]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40ec2a
push ebx
push 0xd0
mov ecx, esi
call fcn.0040f140
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xd1
mov ecx, esi
call fcn.0040f1f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xc8
je 0x40ed2c
push eax
push 0xd2
mov ecx, esi
call fcn.0040f140
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xcd
mov ecx, esi
call fcn.0040f260
lea ecx, [ebp - 0x24]
push ebx
lea edx, [ebp - 0x90]
mov dword [0x431100], ebx
mov dword [0x431c68], ebx
mov eax, dword [esi + 0x1d0]
push ecx
push edx
push 5
push eax
mov dword [ebp - 0x24], 0x20
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40ed9a
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x20], 1
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov ebx, eax
mov ecx, esi
mov dword [ebp - 0x14], ebx
push ebx
mov dword [0x431100], ebx
call fcn.0040f340
mov eax, dword [0x430bf8]
mov edi, dword [sym.imp.MSVCRT.dll__mbscmp]
push str.ONLINE
push eax
call edi
add esp, 8
test eax, eax
je 0x40edc8
mov eax, dword [0x430bf8]
push str.FILEDL
push eax
call edi
add esp, 8
test eax, eax
jne 0x40ede2
push ebx
call sub.MFC42.DLL_operatornew
mov dword [0x431c40], eax
mov dword [eax], 0
add esp, 4
mov dword [0x431c2c], ebx
push 0xd5
mov ecx, esi
call fcn.0040f260
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], eax
xor eax, eax
push str.ONLINE
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], eax
mov eax, dword [0x430bf8]
push eax
call edi
add esp, 8
test eax, eax
je 0x40eecc
mov eax, dword [esi + 0x64]
mov edx, dword [esi + 0x1dc]
lea ecx, [esi + 0x1dc]
push 0
push 0x1021
push eax
call dword [edx + 0x28]
test eax, eax
jne 0x40eecc
lea ecx, [ebp - 0x18]
call fcn.00421016
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x18]
push 0x42e4ec
push eax
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea ecx, [ebp - 0x14]
call fcn.00421016
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
push ecx
push 0xc6
push edx
mov byte [ebp - 4], 1
call sub.MFC42.DLL_AfxFormatString1
mov eax, dword [ebp - 0x14]
push 0
push 0
push eax
call sub.MFC42.DLL_AfxMessageBox
push 2
mov ecx, esi
call sub.MFC42.DLL_CDialog::EndDialog
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
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 [esi + 0x64]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [ebp - 0x1c]
mov eax, 0x400
push ecx
push eax
mov eax, dword [esi + 0x1d0]
lea edx, [ebp - 0x4c4]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40ef53
push eax
push 0xd3
mov ecx, esi
call fcn.0040f140
mov eax, dword [0x430bf8]
push str.ONLINE
push eax
call edi
add esp, 8
test eax, eax
je 0x40ef33
mov eax, dword [0x430bf8]
push str.FILEDL
push eax
call edi
add esp, 8
test eax, eax
jne 0x40f06a
mov ecx, dword [0x431c40]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
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 - 0x1c]
test eax, eax
je 0x40f020
mov eax, dword [esi + 0x1d4]
test eax, eax
jne 0x40f00b
lea ecx, [ebp - 0x50]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov eax, dword [0x430bf8]
push str.ONLINE
mov dword [ebp - 4], 2
push eax
mov byte [ebp - 4], 3
call edi
add esp, 8
test eax, eax
je 0x40f0f9
mov eax, dword [0x430bf8]
push str.FILEDL
push eax
call edi
add esp, 8
test eax, eax
je 0x40f0f9
mov eax, dword [ebp - 0x1c]
mov edx, dword [esi + 0x1dc]
lea ecx, [esi + 0x1dc]
push eax
lea eax, [ebp - 0x4c4]
push eax
call dword [edx + 0x40]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxTryCleanup
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
mov edx, dword [0x431c68]
add ecx, eax
add edx, eax
mov eax, dword [ebp - 0x20]
mov dword [0x431c68], edx
push ebx
push eax
lea edx, [ebp - 0x38]
lea eax, [ebp - 0x2c]
push edx
mov edx, dword [ebp - 0x3c]
push eax
mov dword [ebp - 0x28], ecx
push ecx
lea ecx, [ebp - 0x34]
push ecx
push edx
mov ecx, esi
call fcn.0040f390
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40f020
mov eax, dword [esi + 0x1d4]
test eax, eax
je 0x40eed8
mov eax, dword [0x430bf8]
push str.ONLINE
push eax
call edi
add esp, 8
test eax, eax
je 0x40f043
mov eax, dword [esi + 0x1dc]
lea ecx, [esi + 0x1dc]
call dword [eax + 0x54]
mov eax, dword [esi + 0x1d4]
test eax, eax
je 0x40f057
mov ecx, dword [esi + 0x64]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esi + 0x20]
push 0
push 0
push 0x8001
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp eax, dword [ebp - 0x1c]
jae 0x40efc9
mov ebx, dword [0x431c40]
mov ecx, dword [ebp - 0x18]
mov dl, byte [ebp + eax - 0x4c4]
mov byte [ebx + ecx], dl
mov ebx, dword [ebp - 0x14]
inc ecx
inc eax
mov dword [ebp - 0x18], ecx
jmp 0x40f0fb