Function at 0x4d8508
Capabilities:
Get common file path
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x27d
push 0
push 0
dec ecx
jne 0x4d8511
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.00404d90
mov eax, dword [ebp + 0xc]
call fcn.00404d90
xor eax, eax
push ebp
push 0x4d8a1e
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 4]
call fcn.00404978
push 3
push 0
mov ecx, dword [ebp - 0x14]
mov edx, 0x393
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0x38]
lea ecx, [ebp - 0x10]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004d7ffc
cmp byte [ebx + 0x69], 2
jne 0x4d863f
lea edx, [ebp - 0x13c0]
mov eax, dword [ebp + 0xc]
call fcn.0040a014
cmp dword [ebp - 0x13c0], 0
jne 0x4d85a3
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
call fcn.00404bec
jmp 0x4d85ae
lea eax, [ebp - 0x10]
mov edx, dword [ebp + 0xc]
call fcn.00404978
push 0
mov eax, dword [ebp - 0x10]
call fcn.00404da0
mov edx, eax
lea eax, [ebp - 0x13c4]
call fcn.00404ad8
mov eax, dword [ebp - 0x13c4]
push eax
mov eax, dword [ebp - 4]
call fcn.00404da0
mov edx, eax
lea eax, [ebp - 0x13c8]
call fcn.00404ad8
mov edx, dword [ebp - 0x13c8]
mov eax, ebx
pop ecx
call fcn.004d8200
test al, al
je 0x4d8636
mov edx, dword [ebp - 0x10]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x48]
cmp byte [ebp + 8], 0
je 0x4d862d
lea edx, [ebp - 0x13cc]
mov eax, dword [ebp - 0x10]
call fcn.00408fa4
mov edx, dword [ebp - 0x13cc]
mov eax, 0x4d8a3c
call fcn.00404ee4
test eax, eax
jne 0x4d862d
mov eax, dword [ebp - 0x10]
call fcn.004d7a4c
mov byte [ebp - 5], 1
jmp 0x4d89db
mov byte [ebp - 5], 0
jmp 0x4d89db
mov eax, dword [ebx + 0x64]
push eax
lea eax, [ebp - 0x13d0]
push eax
mov ecx, dword [ebx + 0x60]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004d80f8
mov edx, dword [ebp - 0x13d0]
lea eax, [ebp - 4]
call fcn.00404978
cmp byte [ebx + 0x69], 0
jne 0x4d86e6
cmp dword [ebx + 0x40], 0
je 0x4d869d
cmp byte [ebx + 0x110], 0
jne 0x4d869d
lea ecx, [ebp - 0x28]
mov edx, dword [ebx + 0x40]
mov eax, ebx
call fcn.004d7ed4
mov eax, dword [ebp - 0x28]
call fcn.00404da0
push eax
push esi
call sub.wininet.dll_FtpSetCurrentDirectoryA
mov byte [ebx + 0x110], 1
push 0
push 0x84000000
lea eax, [ebp - 0x13bc]
push eax
mov eax, dword [ebp - 0x10]
call fcn.00404da0
mov edi, eax
push edi
push esi
call sub.wininet.dll_FtpFindFirstFileA
test eax, eax
je 0x4d86c6
push eax
call sub.wininet.dll_InternetCloseHandle
mov eax, dword [ebp - 0x139c]
mov dword [ebp - 0x24], eax
push 0
push 2
push 0x80000000
push edi
push esi
call sub.wininet.dll_FtpOpenFileA
mov esi, eax
jmp 0x4d8780
mov edi, 0x84000100
cmp byte [ebx + 0x144], 0
je 0x4d86fa
or edi, 0x400000
cmp byte [ebx + 0x145], 0
je 0x4d8709
or edi, 0x20000000
push 0
push edi
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00404da0
push eax
push esi
call sub.wininet.dll_InternetOpenUrlA
mov esi, eax
mov dword [ebp - 0x1c], 4
xor eax, eax
mov dword [ebp - 0x20], eax
test esi, esi
je 0x4d8780
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000013
push esi
call sub.wininet.dll_HttpQueryInfoA
cmp dword [ebp - 0x24], 0x12c
jb 0x4d8780
push 6
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x13d4]
call fcn.0040982c
mov ecx, dword [ebp - 0x13d4]
mov edx, 0x394
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0x38]
jmp 0x4d89db
test esi, esi
jne 0x4d879c
push 2
push 1
mov ecx, dword [ebp - 0x14]
mov edx, 0x395
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0x38]
jmp 0x4d89db
lea ecx, [ebp - 0x13d8]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004d7ffc
mov ecx, dword [ebp - 0x13d8]
lea eax, [ebp - 0x10]
mov edx, dword [ebp + 0xc]
call fcn.00404bec
lea eax, [ebp - 0x112f]
push eax
push 0
push 0x4d8a44
mov eax, dword [ebx + 0x140]
call fcn.00404da0
push eax
call sub.kernel32.dll_GetTempFileNameA
lea eax, [ebp - 0x13dc]
lea edx, [ebp - 0x112f]
mov ecx, 0x105
call fcn.00404b50
mov edx, dword [ebp - 0x13dc]
lea eax, [ebp - 0x127c]
call fcn.00402f84
mov edx, 1
lea eax, [ebp - 0x127c]
call fcn.004033cc
call fcn.00402924
mov dword [ebp - 0xc], 0x1000
cmp byte [ebx + 0x69], 1
jne 0x4d884d
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], 4
xor eax, eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000005
push esi
call sub.wininet.dll_HttpQueryInfoA
xor eax, eax
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x29], 0
mov byte [ebp - 0x2a], 0
jmp 0x4d8906
mov eax, dword [0x512408]
mov eax, dword [eax]
call fcn.00496fa0
lea eax, [ebp - 0xc]
push eax
push 0x1000
lea eax, [ebp - 0x102a]
push eax
push esi
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x4d888e
mov byte [ebp - 0x2a], 1
jmp 0x4d8916
cmp dword [ebp - 0xc], 0
jbe 0x4d88b8
cmp dword [ebp - 0xc], 0x1000
ja 0x4d88b8
push 0
lea edx, [ebp - 0x102a]
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x127c]
call fcn.004030e0
call fcn.00402924
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp word [ebx + 0x8a], 0
je 0x4d88e1
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, ebx
mov eax, dword [ebx + 0x8c]
call dword [ebx + 0x88]
cmp word [ebx + 0xaa], 0
je 0x4d88fc
lea ecx, [ebp - 0x29]
mov edx, ebx
mov eax, dword [ebx + 0xac]
call dword [ebx + 0xa8]
cmp dword [ebp - 0xc], 0
jbe 0x4d8906
mov byte [ebp - 5], 1
cmp dword [ebp - 0xc], 0
jbe 0x4d8916
cmp byte [ebp - 0x29], 0
je 0x4d885f
push esi
call sub.wininet.dll_InternetCloseHandle
lea eax, [ebp - 0x127c]
call fcn.00403100
call fcn.00402924
mov al, byte [ebp - 0x29]
mov byte [ebx + 0x171], al
mov al, byte [ebp - 0x29]
or al, byte [ebp - 0x2a]
je 0x4d895f
lea edx, [ebp - 0x13e0]
lea eax, [ebp - 0x112f]
call fcn.0040a3c4
mov eax, dword [ebp - 0x13e0]
call fcn.00409e90
mov byte [ebp - 5], 0
jmp 0x4d89db
mov eax, dword [ebp - 0x10]
call fcn.00409d68
test al, al
je 0x4d8973
mov eax, dword [ebp - 0x10]
call fcn.00409e90
lea edx, [ebp - 0x13e4]
lea eax, [ebp - 0x112f]
call fcn.0040a3c4
mov eax, dword [ebp - 0x13e4]
mov edx, dword [ebp - 0x10]
call fcn.00409ea8
mov edx, dword [ebp - 0x10]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x48]
cmp byte [ebp + 8], 0
je 0x4d89db
lea edx, [ebp - 0x13ec]
mov eax, dword [ebp - 0x10]
call fcn.0040a04c
mov eax, dword [ebp - 0x13ec]
lea edx, [ebp - 0x13e8]
call fcn.00408fa4
mov eax, dword [ebp - 0x13e8]
mov edx, 0x4d8a3c
call fcn.00404cec
je 0x4d89db
mov eax, dword [ebp - 0x10]
call fcn.004d7a4c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d8a25
lea eax, [ebp - 0x13ec]
mov edx, 0xc
call fcn.00404904
lea eax, [ebp - 0x28]
call fcn.004048e0
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00404904
lea eax, [ebp - 4]
call fcn.004048e0
lea eax, [ebp + 0xc]
call fcn.004048e0
ret