Function at 0x41e3ac
Capabilities:
Check http status code
Check if file exists
Get file attributes
Read data from internet
Receive data

Disassembly:
push 0x3c
mov eax, 0x42286a
call fcn.0042156f
mov edi, dword [ebp + 8]
mov esi, edi
mov dword [edi + 0x8c], 0
call fcn.0041dc58
lea ebx, [edi + 0x88]
push ebx
lea ecx, [edi + 0x84]
push ecx
lea ecx, [edi + 0x80]
push ecx
lea edx, [edi + 0x70]
lea esi, [edi + 8]
mov eax, dword [esi]
push edx
push eax
call sub.mfc90u.dll_AfxParseURL
test eax, eax
jne 0x41e46b
push 0x438cc8
push str.IDS_HTTP
lea eax, [ebp - 0x38]
push eax
mov ecx, 0x4a0f68
call dword [sym.imp.K9PCUhelper.dll_public:_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______thiscall_CMainApp::LoadStringW_wchar_t_const___wchar_t_const__]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
push esi
push ecx
mov ecx, eax
call fcn.00406488
pop ecx
pop ecx
push eax
mov ecx, esi
mov byte [ebp - 4], 1
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x30]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov esi, dword [esi]
push ebx
lea eax, [edi + 0x84]
push eax
lea eax, [edi + 0x80]
push eax
lea eax, [edi + 0x70]
push eax
push esi
call sub.mfc90u.dll_AfxParseURL
test eax, eax
jne 0x41e46b
xor eax, eax
call fcn.004215db
ret 4
mov eax, dword [edi + 0xc]
xor ebx, ebx
cmp dword [eax - 0xc], ebx
je 0x41e502
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
cmp eax, ebx
je 0x41e49f
cmp dword [edi + 0x54], ebx
ja 0x41e498
cmp dword [edi + 0x50], ebx
jbe 0x41e49f
mov ecx, 0x3021
jmp 0x41e4a4
mov ecx, 0x1021
mov eax, dword [edi + 0xc]
push ebx
push ecx
lea esi, [edi + 0x90]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x28]
test eax, eax
jne 0x41e4dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_FAIL_FILE_OPEN
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
jmp 0x41e461
mov dword [ebp - 4], 2
mov eax, dword [esi]
push ebx
push dword [edi + 0x54]
mov ecx, esi
push dword [edi + 0x50]
mov byte [edi + 0x68], 1
call dword [eax + 0x30]
push dword [edi + 0x54]
mov eax, dword [esi]
push dword [edi + 0x50]
mov ecx, esi
call dword [eax + 0x34]
or dword [ebp - 4], 0xffffffff
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
test eax, eax
je 0x41e461
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
test eax, eax
je 0x41e461
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
test eax, eax
je 0x41e461
mov dword [ebp - 0x1c], ebx
mov dword [ebp + 8], ebx
cmp dword [edi + 0x60], ebx
je 0x41e54c
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test eax, eax
je 0x41e461
cmp dword [edi + 0x64], ebx
je 0x41e567
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
test eax, eax
je 0x41e461
mov dword [ebp - 0x1c], 1
mov eax, dword [edi]
push 0x1388
mov ecx, edi
call dword [eax + 0x4c]
mov eax, dword [edi]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, edi
call dword [eax + 0x28]
push 4
pop esi
mov dword [ebp - 4], esi
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx - 0xc]
push ebx
mov eax, ecx
neg eax
push ebx
sbb eax, eax
push ecx
and eax, edx
push eax
push dword [edi + 0x7c]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
cmp eax, ebx
jne 0x41e61d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x2f0c
jne 0x41e7cd
cmp dword [ebp + 8], ebx
jne 0x41e7cd
mov ecx, edi
cmp dword [edi + 0x44], ebx
je 0x41e616
mov eax, dword [edi]
call dword [eax + 0x14]
test eax, eax
je 0x41e7cd
mov dword [ebp + 8], 1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x41e573
call fcn.0041e391
jmp 0x41e5cc
mov eax, dword [edi + 0x7c]
push ebx
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x24]
push ecx
push 0x20000013
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x3c], esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x41e7f4
mov eax, dword [ebp - 0x24]
mov esi, 0x197
cmp eax, esi
je 0x41e656
lea ecx, [esi - 6]
cmp eax, ecx
jne 0x41e6a2
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 5
push dword [edi + 0x5c]
lea eax, [ebp - 0x20]
push eax
call fcn.0041ed8e
test al, al
je 0x41e808
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 0x5c]
push dword [ebp - 0x20]
push dword [edi + 0x7c]
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebp - 0x2c], ebx
jne 0x41e674
mov byte [ebp - 4], 4
push dword [ebp - 0x20]
call dword [sym.imp.MSVCR90.dll_free]
mov eax, dword [ebp - 0x24]
pop ecx
mov ecx, 0x191
cmp eax, esi
jne 0x41e6c9
cmp dword [edi + 0x3c], ebx
jne 0x41e6fe
push esi
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_INVALID_HTTP_RESPONSE
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x20]
jmp 0x41e7e6
cmp eax, ecx
jne 0x41e730
mov eax, dword [edi + 0x1c]
cmp dword [eax - 0xc], ebx
je 0x41e6f5
cmp dword [ebp - 0x1c], ebx
jne 0x41e6f5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
test eax, eax
je 0x41e7e6
mov dword [ebp - 0x1c], 1
jmp 0x41e5db
cmp dword [edi + 0x40], ebx
je 0x41e82e
mov eax, dword [edi]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, edi
mov dword [ebp - 0x28], ebx
call dword [eax + 0x2c]
test eax, eax
jne 0x41e5db
cmp dword [ebp - 0x28], ebx
je 0x41e7e6
push dword [ebp - 0x28]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_ABORTING_TRANSFER
jmp 0x41e7d9
cmp eax, 0xc8
je 0x41e742
cmp eax, 0xce
jne 0x41e834
mov eax, dword [edi]
push str.IDS_HTTPDOWNLOAD_GETTING_FILE_INFORMATION
mov ecx, edi
call dword [eax + 0x30]
push dword [edi + 0x7c]
lea esi, [ebp - 0x48]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp + 8], ebx
call fcn.0041ecbc
pop ecx
test eax, eax
je 0x41e77b
push dword [ebp - 0x44]
mov eax, dword [edi]
push dword [ebp - 0x48]
mov ecx, edi
mov dword [ebp + 8], 1
call dword [eax + 0x40]
mov eax, dword [edi]
push str.IDS_HTTPDOWNLOAD_RETRIEVING_FILE
mov ecx, edi
call dword [eax + 0x30]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 6
push dword [edi + 0x5c]
lea eax, [ebp - 0x1c]
push eax
call fcn.0041ed8e
test al, al
jne 0x41e83a
push 0xe
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_GENERIC_ERROR
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
push dword [ebp - 0x1c]
jmp 0x41e825
push esi
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_FAIL_CONNECT_SERVER
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x41e461
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_INVALID_SERVER_RESPONSE
jmp 0x41e7d9
push 0xe
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_GENERIC_ERROR
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
push dword [ebp - 0x20]
call dword [sym.imp.MSVCR90.dll_free]
pop ecx
jmp 0x41e7e6
push ecx
jmp 0x41e6ac
push eax
jmp 0x41e6ac
xor esi, esi
mov dword [ebp - 0x30], ebx
lea eax, [ebp - 0x18]
push eax
push dword [edi + 0x5c]
push dword [ebp - 0x1c]
push dword [edi + 0x7c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41e901
cmp dword [ebp - 0x18], ebx
je 0x41e8ca
push dword [ebp - 0x18]
mov eax, dword [edi]
push dword [ebp - 0x1c]
mov ecx, edi
call dword [eax + 0x48]
test eax, eax
je 0x41e93a
fldz
add esi, dword [ebp - 0x18]
fcomp qword [edi + 0x48]
adc dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], esi
fnstsw ax
test ah, 5
jp 0x41e8ca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
fild dword [ebp - 0x38]
test eax, eax
jge 0x41e8a2
fadd qword [0x43da40]
fild qword [ebp - 0x34]
fdiv st(1)
fcom qword [edi + 0x48]
fnstsw ax
test ah, 0x41
jne 0x41e8c6
fmul st(1)
fdiv qword [edi + 0x48]
fsubrp st(1)
call fcn.00421656
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41e8ca
fstp st(1)
fstp st(0)
mov ecx, dword [edi + 0x50]
add ecx, dword [ebp - 0x48]
mov edx, dword [edi + 0x54]
adc edx, dword [ebp - 0x44]
mov eax, dword [edi]
push edx
push ecx
push dword [ebp + 8]
mov ecx, edi
push dword [ebp - 0x30]
push esi
call dword [eax + 0x44]
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
je 0x41e8fc
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x3c]
test eax, eax
je 0x41e83f
xor ebx, ebx
inc ebx
jmp 0x41e920
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push str.IDS_HTTPDOWNLOAD_ERROR_READFILE
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCR90.dll_free]
pop ecx
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, ebx
jmp 0x41e463
push 0xfffffffffffffff6
pop ebx
jmp 0x41e920