Function at 0x1004a9e
Capabilities:
Create http request
Delete file
Download and write a file
Get common file path
Read .ini file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
xor edi, edi
cmp eax, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], 0x104
je 0x1004afd
cmp byte [eax], bl
je 0x1004afd
push edi
call sub.cmutil.dll_CmFree
mov eax, dword [ebp - 4]
inc eax
push eax
call sub.cmutil.dll_CmMalloc
mov edi, eax
cmp edi, ebx
je 0x1004afd
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, ebx
je 0x1004b30
mov ecx, dword [ebp - 4]
cmp eax, ecx
jbe 0x1004b38
cmp eax, 0x100000
mov dword [ebp - 4], eax
jbe 0x1004ac8
mov esi, dword [ebp + 0xc]
push edi
call sub.cmutil.dll_CmFree
cmp dword [ebp - 8], ebx
jne 0x1004b26
cmp dword [ebp - 0x18], ebx
je 0x1004b1d
mov eax, dword [esi]
cmp eax, ebx
je 0x1004b1d
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [esi]
call sub.cmutil.dll_CmFree
mov dword [esi], ebx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1004afd
add ecx, 0x18
push ecx
call sub.cmutil.dll_CmMalloc
cmp eax, ebx
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
je 0x1004b00
push eax
push ebx
push 0x10016b8
push edi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1004b00
mov eax, dword [esi]
cmp byte [eax], bl
je 0x1004b00
push edi
call sub.cmutil.dll_CmFree
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
push dword [esi]
xor edi, edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x1004c55
push ebx
push ebx
push ebx
push ebx
push 0x1001688
mov dword [ebp - 0x18], 1
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x1004c32
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x1004c32
mov esi, 0x400
push esi
call sub.cmutil.dll_CmMalloc
mov edi, eax
cmp edi, ebx
je 0x1004c38
mov dword [ebp + 8], ebx
lea eax, [ebp - 4]
push eax
push esi
push edi
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1004c38
cmp dword [ebp - 4], ebx
jne 0x1004bfc
xor eax, eax
inc eax
mov dword [ebp - 8], eax
mov dword [ebp + 8], eax
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1004c2d
cmp dword [ebp + 8], ebx
je 0x1004bdb
mov eax, dword [ebp + 0xc]
push dword [eax]
push esi
push edi
push 0x1001670
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
test eax, eax
jne 0x1004c38
mov dword [ebp - 8], ebx
jmp 0x1004c38
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x1004c48
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x14], ebx
je 0x1004c52
push dword [ebp - 0x14]
call esi
mov esi, dword [ebp + 0xc]
cmp dword [ebp - 0x10], ebx
je 0x1004b00
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004b00