Function at 0x10004ed8
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov eax, 0x10050d7c
call fcn.100457f4
sub esp, 0x8ec
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea ecx, [esi + 0x18]
call fcn.1001174a
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push str.Toolbar
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x100050c5
mov eax, dword [esi + 8]
cmp eax, ebx
mov dword [ebp - 0x14], 0xc8
jne 0x10004f24
xor eax, eax
jmp 0x10004f2b
push eax
call fcn.10045c20
pop ecx
push 1
push dword [esi + 0xc]
push eax
push dword [esi + 8]
push dword [esi]
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x18], edi
jne 0x10004f56
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x100050c5
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xf4]
push eax
push 0x13
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x10004f82
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push dword [ebp - 0x10]
call edi
jmp 0x100050c5
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x28], al
call fcn.1002376b
lea eax, [ebp - 0xf4]
push eax
call fcn.10045c20
pop ecx
push eax
lea eax, [ebp - 0xf4]
push eax
lea ecx, [ebp - 0x28]
call fcn.100243fe
mov edi, 0x100668b4
push edi
mov dword [ebp - 4], ebx
call fcn.10045c20
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x28]
call fcn.1002359f
cmp eax, dword [0x1005750c]
push 1
setne byte [ebp + 0xb]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.1002376b
cmp byte [ebp + 0xb], bl
jne 0x10005093
cmp byte [esi + 0x15], bl
je 0x1000500a
push ebx
push SysReAllocStringLen
push 2
push ebx
push 1
push 0x40000000
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp + 8], eax
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp - 0x14]
push eax
push 0x800
lea eax, [ebp - 0x8f8]
push eax
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x10005093
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x1000509b
cmp byte [esi + 0x15], bl
mov byte [ebp + eax - 0x8f8], bl
je 0x10005052
push ebx
lea ecx, [ebp - 0x2c]
push ecx
push eax
lea eax, [ebp - 0x8f8]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x8f8]
test eax, eax
je 0x10005069
lea eax, [ebp - 0x8f8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x8f8]
push ecx
push eax
lea ecx, [esi + 0x18]
call fcn.100119e5
cmp dword [ebp - 0x14], ebx
je 0x1000509b
lea eax, [ebp - 0x14]
push eax
push 0x800
lea eax, [ebp - 0x8f8]
push eax
push dword [ebp - 0x18]
jmp 0x10005023
push dword [ebp - 0x18]
jmp 0x10004f70
cmp byte [esi + 0x15], bl
je 0x100050a9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x18]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
test eax, eax
push dword [ebp - 0x10]
je 0x10004f7b
call edi
test eax, eax
jne 0x100050ca
mov byte [esi + 0x14], bl
jmp 0x100050ce
mov byte [esi + 0x14], 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret