Function at 0x4af5e0
Capabilities:
Check http status code
Delete file
Get common file path
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x286
push 0
push 0
dec ecx
jne 0x4af5e9
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404d44
mov eax, dword [ebp + 0xc]
call fcn.00404d44
xor eax, eax
push ebp
push 0x4afe1c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 4]
call fcn.0040492c
push 3
push 0
mov ecx, dword [ebp - 0x20]
mov edx, 0x393
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0x38]
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004aefe4
cmp byte [ebx + 0x69], 2
jne 0x4af778
lea edx, [ebp - 0x13d0]
mov eax, dword [ebp + 0xc]
call fcn.00409a58
cmp dword [ebp - 0x13d0], 0
jne 0x4af67b
lea eax, [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
call fcn.00404ba0
jmp 0x4af686
lea eax, [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
call fcn.0040492c
push 0
mov eax, dword [ebp - 0x1c]
call fcn.00404d54
mov edx, eax
lea eax, [ebp - 0x13d4]
call fcn.00404a8c
mov eax, dword [ebp - 0x13d4]
push eax
mov eax, dword [ebp - 4]
call fcn.00404d54
mov edx, eax
lea eax, [ebp - 0x13d8]
call fcn.00404a8c
mov edx, dword [ebp - 0x13d8]
mov eax, ebx
pop ecx
call fcn.004af2ec
test al, al
je 0x4af76f
mov edx, dword [ebp - 0x1c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp byte [ebp + 8], 0
je 0x4af709
lea edx, [ebp - 0x13dc]
mov eax, dword [ebp - 0x1c]
call fcn.00408d8c
mov edx, dword [ebp - 0x13dc]
mov eax, 0x4afe38
call fcn.00404e98
test eax, eax
jne 0x4af709
mov eax, dword [ebp - 0x1c]
call fcn.004ae9c0
cmp byte [ebp + 8], 0
je 0x4af766
lea edx, [ebp - 0x13e0]
mov eax, dword [ebp - 0x1c]
call fcn.00408d8c
mov edx, dword [ebp - 0x13e0]
mov eax, 0x4afe38
call fcn.00404e98
test eax, eax
je 0x4af766
push 3
push 0
mov ecx, dword [ebp - 0x1c]
mov edx, 0x3c5
mov eax, ebx
mov esi, dword [eax]
call dword [esi + 0x38]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
call fcn.004ab35c
cmp byte [ebx + 0x189], 0
jne 0x4af766
mov eax, dword [ebp - 0x1c]
call fcn.00404d54
push eax
call sub.kernel32.dll_DeleteFileA
mov byte [ebp - 5], 1
jmp 0x4afdcc
mov byte [ebp - 5], 0
jmp 0x4afdcc
mov eax, dword [ebx + 0x64]
push eax
lea eax, [ebp - 0x13e4]
push eax
mov ecx, dword [ebx + 0x60]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004af1e4
mov edx, dword [ebp - 0x13e4]
lea eax, [ebp - 4]
call fcn.0040492c
cmp byte [ebx + 0x69], 0
jne 0x4af82c
cmp dword [ebx + 0x40], 0
je 0x4af7da
cmp byte [ebx + 0x118], 0
jne 0x4af7da
lea ecx, [ebp - 0x38]
mov edx, dword [ebx + 0x40]
mov eax, ebx
call fcn.004aeeb4
mov eax, dword [ebp - 0x38]
call fcn.00404d54
push eax
push esi
call sub.wininet.dll_FtpSetCurrentDirectoryA
mov byte [ebx + 0x118], 1
push 0
push 0x84000000
lea eax, [ebp - 0x13cc]
push eax
mov eax, dword [ebp - 0x1c]
call fcn.00404d54
mov edi, eax
push edi
push esi
call sub.wininet.dll_FtpFindFirstFileA
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4af80b
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_InternetCloseHandle
mov eax, dword [ebp - 0x13ac]
mov dword [ebp - 0x34], eax
push 0
push 2
push 0x80000000
push edi
push esi
call sub.wininet.dll_FtpOpenFileA
mov dword [ebp - 0x24], eax
jmp 0x4afa84
mov edi, 0x84000100
cmp byte [ebx + 0x14c], 0
je 0x4af840
or edi, 0x400000
cmp byte [ebx + 0x14d], 0
je 0x4af84f
or edi, 0x20000000
cmp byte [ebx + 0x198], 0
jne 0x4af8ed
cmp dword [ebx + 0x70], 0
je 0x4af86c
cmp dword [ebx + 0x4c], 0
jne 0x4af8ed
lea eax, [ebp - 0x10]
mov edx, dword [ebx + 0x70]
call fcn.0040492c
lea eax, [ebp - 0x14]
mov edx, dword [ebx + 0x4c]
call fcn.0040492c
lea ecx, [ebp - 0x13ec]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004af0e0
mov ecx, dword [ebp - 0x13ec]
lea eax, [ebp - 0x13e8]
mov edx, 0x4afe48
call fcn.00404ba0
mov eax, dword [ebp - 0x13e8]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x10]
call fcn.004abafc
test al, al
jne 0x4af8d7
push 0
push 0
mov ecx, 0x4afe5c
mov edx, 0x3bc
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0x38]
jmp 0x4afdcc
lea eax, [ebx + 0x70]
mov edx, dword [ebp - 0x10]
call fcn.004048e8
lea eax, [ebx + 0x4c]
mov edx, dword [ebp - 0x14]
call fcn.004048e8
cmp dword [ebx + 0x70], 0
jne 0x4af8f9
cmp dword [ebx + 0x4c], 0
je 0x4af944
push 0x4afe80
push dword [ebx + 0x70]
push 0x4afea0
push dword [ebx + 0x4c]
lea eax, [ebp - 0x13f4]
mov edx, 3
call fcn.00404c14
mov eax, dword [ebp - 0x13f4]
lea edx, [ebp - 0x13f0]
call fcn.004ab7b0
push dword [ebp - 0x13f0]
push 0x4afeac
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00404c14
jmp 0x4af94c
lea eax, [ebp - 0xc]
call fcn.00404894
push 0
push edi
mov eax, dword [ebp - 0xc]
call fcn.00404b54
push eax
mov eax, dword [ebp - 0xc]
call fcn.00404d54
push eax
mov eax, dword [ebp - 4]
call fcn.00404d54
push eax
push esi
call sub.wininet.dll_InternetOpenUrlA
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], 4
xor eax, eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x24], 0
je 0x4afa84
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x20000013
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp dword [ebp - 0x34], 0x191
jne 0x4afa4c
cmp byte [ebx + 0x198], 1
jne 0x4afa4c
lea eax, [ebp - 0x10]
mov edx, dword [ebx + 0x70]
call fcn.0040492c
lea eax, [ebp - 0x14]
mov edx, dword [ebx + 0x4c]
call fcn.0040492c
lea ecx, [ebp - 0x13fc]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004af0e0
mov ecx, dword [ebp - 0x13fc]
lea eax, [ebp - 0x13f8]
mov edx, 0x4afe48
call fcn.00404ba0
mov eax, dword [ebp - 0x13f8]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x10]
call fcn.004abafc
test al, al
je 0x4afa32
lea eax, [ebx + 0x70]
mov edx, dword [ebp - 0x10]
call fcn.004048e8
lea eax, [ebx + 0x4c]
mov edx, dword [ebp - 0x14]
call fcn.004048e8
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_InternetCloseHandle
jmp 0x4af8ed
push 0
push 0
mov ecx, 0x4afe5c
mov edx, 0x3bc
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0x38]
jmp 0x4afdcc
cmp dword [ebp - 0x34], 0x12c
jb 0x4afa84
push 6
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x34]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1400]
call fcn.00409330
mov ecx, dword [ebp - 0x1400]
mov edx, 0x394
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0x38]
jmp 0x4afdcc
cmp dword [ebp - 0x24], 0
jne 0x4afaa2
push 2
push 1
mov ecx, dword [ebp - 0x20]
mov edx, 0x395
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0x38]
jmp 0x4afdcc
lea ecx, [ebp - 0x1404]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004aefe4
mov ecx, dword [ebp - 0x1404]
lea eax, [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
call fcn.00404ba0
lea eax, [ebp - 0x113f]
push eax
push 0
push 0x4afeb4
mov eax, dword [ebx + 0x148]
call fcn.00404d54
push eax
call sub.kernel32.dll_GetTempFileNameA
lea eax, [ebp - 0x1408]
lea edx, [ebp - 0x113f]
mov ecx, 0x105
call fcn.00404b04
mov edx, dword [ebp - 0x1408]
lea eax, [ebp - 0x128c]
call fcn.00402f40
mov edx, 1
lea eax, [ebp - 0x128c]
call fcn.0040334c
call fcn.00402914
mov dword [ebp - 0x18], 0x1000
cmp byte [ebx + 0x69], 1
jne 0x4afb56
xor eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], 4
xor eax, eax
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x20000005
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_HttpQueryInfoA
xor esi, esi
mov byte [ebp - 0x39], 0
mov byte [ebp - 0x3a], 0
jmp 0x4afbf5
mov eax, dword [0x4bf908]
mov eax, dword [eax]
call fcn.0046f444
lea eax, [ebp - 0x18]
push eax
push 0x1000
lea eax, [ebp - 0x103a]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x4afb94
mov byte [ebp - 0x3a], 1
jmp 0x4afc05
cmp dword [ebp - 0x18], 0
jbe 0x4afbbe
cmp dword [ebp - 0x18], 0x1000
ja 0x4afbbe
push 0
lea edx, [ebp - 0x103a]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x128c]
call fcn.0040309c
call fcn.00402914
add esi, dword [ebp - 0x18]
cmp word [ebx + 0x8a], 0
je 0x4afbe1
push esi
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, ebx
mov eax, dword [ebx + 0x8c]
call dword [ebx + 0x88]
lea edx, [ebp - 0x39]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x48]
cmp dword [ebp - 0x18], 0
jbe 0x4afbf5
mov byte [ebp - 5], 1
cmp dword [ebp - 0x18], 0
jbe 0x4afc05
cmp byte [ebp - 0x39], 0
je 0x4afb65
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_InternetCloseHandle
lea eax, [ebp - 0x128c]
call fcn.004030bc
call fcn.00402914
mov al, byte [ebp - 0x39]
mov byte [ebx + 0x179], al
mov al, byte [ebp - 0x39]
or al, byte [ebp - 0x3a]
je 0x4afc8a
lea edx, [ebp - 0x140c]
lea eax, [ebp - 0x113f]
call fcn.00409e20
mov eax, dword [ebp - 0x140c]
call fcn.00409968
test al, al
jne 0x4afc81
lea edx, [ebp - 0x1414]
lea eax, [ebp - 0x113f]
call fcn.00409e20
mov ecx, dword [ebp - 0x1414]
lea eax, [ebp - 0x1410]
mov edx, 0x4afec4
call fcn.00404ba0
mov eax, dword [ebp - 0x1410]
call fcn.004ad67c
mov byte [ebp - 5], 0
jmp 0x4afdcc
mov eax, dword [ebp - 0x1c]
call fcn.0040983c
test al, al
je 0x4afcc4
mov eax, dword [ebp - 0x1c]
call fcn.00409968
test al, al
jne 0x4afcc4
mov byte [ebp - 5], 0
lea eax, [ebp - 0x1418]
mov ecx, dword [ebp - 0x1c]
mov edx, 0x4afec4
call fcn.00404ba0
mov eax, dword [ebp - 0x1418]
call fcn.004ad67c
lea edx, [ebp - 0x141c]
lea eax, [ebp - 0x113f]
call fcn.00409e20
mov eax, dword [ebp - 0x141c]
mov edx, dword [ebp - 0x1c]
call fcn.00409980
test al, al
jne 0x4afd2a
mov byte [ebp - 5], 0
push 0x4afee4
lea edx, [ebp - 0x1424]
lea eax, [ebp - 0x113f]
call fcn.00409e20
push dword [ebp - 0x1424]
push 0x4aff04
push dword [ebp - 0x1c]
lea eax, [ebp - 0x1420]
mov edx, 4
call fcn.00404c14
mov eax, dword [ebp - 0x1420]
call fcn.004ad67c
mov edx, dword [ebp - 0x1c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp byte [ebp + 8], 0
je 0x4afd73
lea edx, [ebp - 0x142c]
mov eax, dword [ebp - 0x1c]
call fcn.00409a90
mov eax, dword [ebp - 0x142c]
lea edx, [ebp - 0x1428]
call fcn.00408d8c
mov eax, dword [ebp - 0x1428]
mov edx, 0x4afe38
call fcn.00404ca0
je 0x4afd73
mov eax, dword [ebp - 0x1c]
call fcn.004ae9c0
cmp byte [ebp + 8], 0
je 0x4afdcc
lea edx, [ebp - 0x1434]
mov eax, dword [ebp - 0x1c]
call fcn.00409a90
mov eax, dword [ebp - 0x1434]
lea edx, [ebp - 0x1430]
call fcn.00408d8c
mov eax, dword [ebp - 0x1430]
mov edx, 0x4afe38
call fcn.00404ca0
jne 0x4afdcc
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
call fcn.004ab35c
cmp byte [ebx + 0x189], 0
jne 0x4afdcc
mov eax, dword [ebp - 0x1c]
call fcn.00404d54
push eax
call sub.kernel32.dll_DeleteFileA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4afe23
lea eax, [ebp - 0x1434]
mov edx, 0x1a
call fcn.004048b8
lea eax, [ebp - 0x38]
call fcn.00404894
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004048b8
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.004048b8
lea eax, [ebp - 4]
call fcn.00404894
lea eax, [ebp + 0xc]
call fcn.00404894
ret