Function at 0x10004942
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, 0x10042284
call fcn.10035ae0
sub esp, 0x8ec
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea ecx, [esi + 0x18]
call fcn.100032fc
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 0x10004b2c
mov eax, dword [esi + 8]
mov dword [ebp - 0x14], 0xc8
cmp eax, ebx
jne 0x1000498e
xor eax, eax
jmp 0x10004995
push eax
call fcn.10035bc0
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
push ebx
cmp edi, ebx
mov dword [ebp - 0x18], edi
jne 0x100049be
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x10004b2c
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 0x100049e9
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push dword [ebp - 0x10]
call edi
jmp 0x10004b2c
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x28], al
call fcn.100149cc
lea eax, [ebp - 0xf4]
push eax
call fcn.10035bc0
pop ecx
push eax
lea eax, [ebp - 0xf4]
push eax
lea ecx, [ebp - 0x28]
call fcn.10015611
mov edi, 0x100548d8
mov dword [ebp - 4], ebx
push edi
call fcn.10035bc0
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x28]
call fcn.1001482c
cmp eax, dword [0x10047530]
push 1
lea ecx, [ebp - 0x28]
setne byte [ebp + 0xb]
or dword [ebp - 4], 0xffffffff
call fcn.100149cc
cmp byte [ebp + 0xb], bl
jne 0x10004afa
cmp byte [esi + 0x15], bl
je 0x10004a71
push ebx
push SysReAllocString
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
lea eax, [ebp - 0x8f8]
push 0x800
push eax
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x10004afa
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x10004b02
cmp byte [esi + 0x15], bl
mov byte [ebp + eax - 0x8f8], bl
je 0x10004ab9
lea ecx, [ebp - 0x2c]
push ebx
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 0x10004ad0
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.10003387
cmp dword [ebp - 0x14], ebx
je 0x10004b02
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x8f8]
push 0x800
push eax
push dword [ebp - 0x18]
jmp 0x10004a8a
push dword [ebp - 0x18]
jmp 0x100049d7
cmp byte [esi + 0x15], bl
je 0x10004b10
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
push dword [ebp - 0x10]
test eax, eax
je 0x100049e2
call edi
test eax, eax
jne 0x10004b31
mov byte [esi + 0x14], bl
jmp 0x10004b35
mov byte [esi + 0x14], 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret