Function at 0x10026fa
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], 0x1001388
mov dword [ebp - 0x24], ebx
call sub.cmutil.dll_CmMalloc
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x10029b8
push ebx
push ebx
push ebx
push ebx
push 0x10013a4
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 0x10029b8
mov edi, dword [esi + 0x20]
cmp edi, ebx
jne 0x1002782
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x360], eax
jmp 0x10029b8
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax + 0x24]
cmp ecx, ebx
je 0x1002790
cmp byte [ecx], bl
jne 0x1002792
xor ecx, ecx
mov edx, dword [eax + 0x1c]
cmp edx, ebx
je 0x100279d
cmp byte [edx], bl
jne 0x100279f
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 0x10029b8
cmp eax, ebx
je 0x1002771
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 0x10027f9
mov eax, 0x800000
jmp 0x10027fb
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 0x10029b8
cmp eax, ebx
je 0x1002771
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 0x10029b8
cmp dword [ebp - 4], ebx
je 0x1002771
mov edi, 0x2000
push edi
call sub.cmutil.dll_CmMalloc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x10029b8
jmp 0x100293d
cmp dword [ebp - 4], ebx
je 0x1002771
cmp dword [ebp - 0xc], ebx
je 0x1002961
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 0x10029b8
cmp dword [ebp - 4], ebx
je 0x1002771
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jne 0x10029b0
cmp dword [esi + 0x13c], ebx
jne 0x100290b
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 0x10029b8
cmp dword [ebp - 4], ebx
jne 0x100290b
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 0x1002933
push dword [esi + 0x138]
push dword [esi + 0x140]
push ecx
call eax
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x10029b8
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 0x100286e
jmp 0x10029b8
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 0x1002771
mov eax, dword [ebp - 0x20]
cmp eax, 0xc8
je 0x10029a7
mov dword [esi + 0x360], eax
mov dword [ebp - 4], ebx
push 2
jmp 0x10029b2
mov dword [ebp - 4], 1
jmp 0x10029b8
push 0x70
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edi, [esi + 0x360]
cmp dword [edi], ebx
jne 0x10029d4
mov eax, dword [esi + 0x148]
cmp dword [eax], ebx
jne 0x10029d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
cmp dword [ebp - 8], ebx
je 0x10029e1
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 0x10029f4
push eax
call edi
mov dword [esi + 0x28], ebx
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x1002a01
push eax
call edi
mov dword [esi + 0x24], ebx
mov eax, dword [esi + 0x20]
cmp eax, ebx
je 0x1002a0e
push eax
call edi
mov dword [esi + 0x20], ebx
cmp dword [ebp - 4], ebx
je 0x1002a25
lea eax, [esi + 0x140]
mov esi, dword [esi + 0x13c]
cmp esi, dword [eax]
jbe 0x1002a25
mov dword [eax], esi
cmp dword [ebp - 0x10], ebx
pop edi
pop esi
pop ebx
je 0x1002a35
push dword [ebp - 0x10]
call sub.cmutil.dll_CmFree
mov eax, dword [ebp - 4]
leave
ret 4