Function at 0x100249a
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
xor ebx, ebx
push 0x801
mov esi, eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x28], 0x1001398
mov dword [ebp - 0x24], ebx
call sub.cmutil.dll_CmMalloc
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x1002758
push ebx
push ebx
push ebx
push ebx
push 0x10013b4
mov dword [esi + 0x360], ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
push 4
lea ecx, [ebp - 0xc]
push ecx
push 0x46
push eax
mov dword [esi + 0x20], eax
mov dword [ebp - 0xc], 1
call dword [sym.imp.WININET.dll_InternetSetOptionA]
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x1002758
mov edi, dword [esi + 0x20]
cmp edi, ebx
jne 0x1002522
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x360], eax
jmp 0x1002758
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax + 0x24]
cmp ecx, ebx
je 0x1002530
cmp byte [ecx], bl
jne 0x1002532
xor ecx, ecx
mov edx, dword [eax + 0x1c]
cmp edx, ebx
je 0x100253d
cmp byte [edx], bl
jne 0x100253f
xor edx, edx
push ebx
push ebx
push 3
push ecx
xor ecx, ecx
mov cx, word [eax + 0x18]
push edx
push ecx
push dword [eax + 0x10]
push edi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ecx, dword [esi + 0x148]
mov dword [esi + 0x24], eax
cmp dword [ecx], ebx
jne 0x1002758
cmp eax, ebx
je 0x1002511
mov eax, dword [esi + 0x1c]
push dword [eax + 0x2c]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esi + 0x1c]
push dword [eax + 0x34]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0xc], 4
jne 0x1002599
mov eax, 0x800000
jmp 0x100259b
xor eax, eax
push ebx
or eax, 0x84000000
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push dword [ebp - 0x10]
push ebx
push dword [esi + 0x24]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ecx, dword [esi + 0x148]
mov dword [esi + 0x28], eax
cmp dword [ecx], ebx
jne 0x1002758
cmp eax, ebx
je 0x1002511
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x1002758
cmp dword [ebp - 4], ebx
je 0x1002511
mov edi, 0x2000
push edi
call sub.cmutil.dll_CmMalloc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1002758
jmp 0x10026dd
cmp dword [ebp - 4], ebx
je 0x1002511
cmp dword [ebp - 0xc], ebx
je 0x1002701
push ebx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x1002758
cmp dword [ebp - 4], ebx
je 0x1002511
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jne 0x1002750
cmp dword [esi + 0x13c], ebx
jne 0x10026ab
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 0x140]
push eax
push 0x20000005
push dword [esi + 0x28]
mov dword [ebp - 0x18], 4
mov dword [ebp - 0x14], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x1002758
cmp dword [ebp - 4], ebx
jne 0x10026ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x360], eax
mov eax, dword [ebp - 0xc]
add dword [esi + 0x13c], eax
mov eax, dword [esi + 0x134]
cmp eax, ebx
mov ecx, dword [esi + 0x13c]
je 0x10026d3
push dword [esi + 0x138]
push dword [esi + 0x140]
push ecx
call eax
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x1002758
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 8]
push dword [esi + 0x28]
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
je 0x100260e
jmp 0x1002758
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x20000013
push dword [esi + 0x28]
mov dword [ebp - 0x18], 4
mov dword [ebp - 0x14], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1002511
mov eax, dword [ebp - 0x20]
cmp eax, 0xc8
je 0x1002747
mov dword [esi + 0x360], eax
mov dword [ebp - 4], ebx
push 2
jmp 0x1002752
mov dword [ebp - 4], 1
jmp 0x1002758
push 0x70
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edi, [esi + 0x360]
cmp dword [edi], ebx
jne 0x1002774
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x1002774
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
cmp dword [ebp - 8], ebx
je 0x1002781
push dword [ebp - 8]
call sub.cmutil.dll_CmFree
mov eax, dword [esi + 0x28]
cmp eax, ebx
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x1002794
push eax
call edi
mov dword [esi + 0x28], ebx
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x10027a1
push eax
call edi
mov dword [esi + 0x24], ebx
mov eax, dword [esi + 0x20]
cmp eax, ebx
je 0x10027ae
push eax
call edi
mov dword [esi + 0x20], ebx
cmp dword [ebp - 4], ebx
je 0x10027c5
lea eax, [esi + 0x140]
mov esi, dword [esi + 0x13c]
cmp esi, dword [eax]
jbe 0x10027c5
mov dword [eax], esi
cmp dword [ebp - 0x10], ebx
pop edi
pop esi
pop ebx
je 0x10027d5
push dword [ebp - 0x10]
call sub.cmutil.dll_CmFree
mov eax, dword [ebp - 4]
leave
ret 4